Files
hsa/Html/apps/static/css/dashboard.css
2025-10-22 19:45:56 +08:00

530 lines
9.3 KiB
CSS

/* Reset some default styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Body & Page Background */
body {
font-family: 'Arial', sans-serif;
background-color: #f5f5f5;
}
/* 页眉导航栏 */
.navbar {
display: flex;
justify-content: space-between;
align-items: center;
background-color: #2575fc;
color: white;
border-radius: 10px;
margin-bottom: 30px;
}
.navbar .logo h1 {
font-size: 24px;
font-weight: bold;
}
.navbar-links a {
color: white;
text-decoration: none;
margin: 0 15px;
font-size: 16px;
transition: color 0.3s;
}
.navbar-links a:hover {
color: #f1c40f;
}
.navbar .avatar img {
width: 40px;
height: 40px;
border-radius: 50%;
border: 2px solid white;
}
/* Dashboard 主体部分 */
:root {
--primary-blue: #6A9FB5;
--secondary-blue: #8BB4C5;
--light-blue: #E1F0F7;
--accent-blue: #4A7B9D;
--text-dark: #2C3E50;
--text-light: #7F8C8D;
--card-shadow: 0 4px 12px rgba(106, 159, 181, 0.15);
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #F9FBFD;
color: var(--text-dark);
line-height: 1.6;
}
/* 导航栏样式 */
.navbar {
background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
padding: 0.8rem 1rem;
}
.navbar-brand {
font-weight: 700;
font-size: 1.5rem;
color: white !important;
}
.nav-link {
color: rgba(255, 255, 255, 0.9) !important;
font-weight: 500;
padding: 0.5rem 1rem !important;
transition: all 0.3s ease;
border-radius: 4px;
}
.nav-link:hover,
.nav-link.active {
color: white !important;
background-color: rgba(255, 255, 255, 0.15);
}
.user-avatar {
width: 36px;
height: 36px;
border-radius: 50%;
border: 2px solid rgba(255, 255, 255, 0.7);
object-fit: cover;
}
/* 学习路径区域 */
.learning-path-section {
background: linear-gradient(135deg, var(--light-blue), #D4E9F2);
padding: 2rem 0;
border-radius: 0 0 20px 20px;
margin-bottom: 2rem;
}
.section-title {
color: var(--accent-blue);
font-weight: 600;
margin-bottom: 1.5rem;
position: relative;
padding-bottom: 0.5rem;
font-size: 28px;
}
.section-title:after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 60px;
height: 3px;
background-color: var(--primary-blue);
border-radius: 2px;
}
/* 专业选择器样式优化 */
.major-selector {
position: relative;
margin-bottom: 2rem;
}
.major-selector label {
font-weight: 600;
color: var(--accent-blue);
margin-bottom: 0.5rem;
display: block;
}
.major-selector select {
appearance: none;
background-color: white;
border: 2px solid var(--primary-blue);
border-radius: 8px;
padding: 0.75rem 1.5rem;
font-size: 1rem;
color: var(--text-dark);
width: 100%;
max-width: 300px;
cursor: pointer;
transition: all 0.3s ease;
}
.major-selector select:focus {
outline: none;
box-shadow: 0 0 0 3px rgba(106, 159, 181, 0.3);
border-color: var(--accent-blue);
}
.major-selector::after {
content: '\f078';
font-family: 'Font Awesome 5 Free';
font-weight: 900;
position: absolute;
top: 50%;
right: 1rem;
transform: translateY(-50%);
pointer-events: none;
color: var(--primary-blue);
}
/* 学习路径图样式 - 横向流程图 */
.path-flow {
background-color: white;
border-radius: 12px;
padding: 2rem;
box-shadow: var(--card-shadow);
overflow-x: auto;
position: relative;
}
.path-container {
display: flex;
min-width: 900px;
position: relative;
}
.path-step {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
padding: 0 1rem;
}
.step-connector {
position: absolute;
top: 40px;
left: -50%;
width: 100%;
height: 2px;
background-color: var(--primary-blue);
z-index: 1;
}
.step-node {
width: 80px;
height: 80px;
border-radius: 50%;
background-color: var(--light-blue);
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 1rem;
position: relative;
z-index: 2;
transition: all 0.3s ease;
cursor: pointer;
}
.step-node:hover {
transform: scale(1.05);
background-color: var(--primary-blue);
}
.step-node:hover .step-icon {
color: white;
}
.step-icon {
font-size: 1.8rem;
color: var(--accent-blue);
}
.step-content {
text-align: center;
width: 100%;
}
.step-title {
font-weight: 600;
margin-bottom: 0.5rem;
color: var(--accent-blue);
}
.step-courses {
font-size: 0.9rem;
color: var(--text-light);
margin-bottom: 0.5rem;
}
.step-progress {
height: 6px;
background-color: #e9ecef;
border-radius: 3px;
overflow: hidden;
margin-bottom: 0.5rem;
}
.step-progress-bar {
height: 100%;
background-color: var(--primary-blue);
border-radius: 3px;
transition: width 0.5s ease;
}
.step-status {
font-size: 0.8rem;
color: var(--text-light);
}
.step-completed .step-node {
background-color: var(--primary-blue);
}
.step-completed .step-icon {
color: white;
}
.step-active .step-node {
background-color: var(--accent-blue);
box-shadow: 0 0 0 4px rgba(74, 123, 157, 0.3);
}
.step-active .step-icon {
color: white;
}
/* 课程详情面板 */
.course-panel {
display: none;
background-color: white;
border-radius: 12px;
padding: 1.5rem;
box-shadow: var(--card-shadow);
margin-top: 1.5rem;
}
.course-panel.active {
display: block;
}
.panel-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
padding-bottom: 0.5rem;
border-bottom: 1px solid #e9ecef;
}
.panel-title {
font-weight: 600;
color: var(--accent-blue);
margin: 0;
}
.close-panel {
background: none;
border: none;
font-size: 1.2rem;
color: var(--text-light);
cursor: pointer;
}
.course-list {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1rem;
}
.course-item {
display: flex;
align-items: center;
padding: 0.75rem;
border-radius: 8px;
border: 1px solid #e9ecef;
transition: all 0.3s ease;
}
.course-item:hover {
border-color: var(--primary-blue);
box-shadow: 0 2px 8px rgba(106, 159, 181, 0.15);
}
.course-check {
margin-right: 0.75rem;
color: #28a745;
}
.course-info {
flex: 1;
}
.course-name {
font-weight: 500;
margin-bottom: 0.25rem;
}
.course-duration {
font-size: 0.8rem;
color: var(--text-light);
}
.course-action {
margin-left: 0.75rem;
}
/* 搜索区域 */
.search-section {
padding: 2rem 0;
}
.search-container {
background-color: white;
border-radius: 12px;
padding: 1.5rem;
box-shadow: var(--card-shadow);
}
/* 课程卡片样式 */
.course-card {
border: none;
border-radius: 12px;
box-shadow: var(--card-shadow);
transition: all 0.3s ease;
margin-bottom: 1.5rem;
overflow: hidden;
background-color: white;
}
.course-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(106, 159, 181, 0.2);
}
.course-img {
height: 160px;
object-fit: cover;
width: 100%;
}
.course-category {
display: inline-block;
background-color: var(--light-blue);
color: var(--accent-blue);
font-size: 0.8rem;
padding: 0.3rem 0.8rem;
border-radius: 20px;
margin-bottom: 0.8rem;
}
.course-title {
font-weight: 600;
color: var(--text-dark);
margin-bottom: 0.5rem;
font-size: 1.1rem;
line-height: 1.4;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.course-instructor {
color: var(--text-light);
font-size: 0.9rem;
margin-bottom: 0.5rem;
}
.course-meta {
display: flex;
justify-content: space-between;
color: var(--text-light);
font-size: 0.85rem;
margin-bottom: 1rem;
}
.course-rating {
color: #FFC107;
}
.btn-view {
background-color: white;
color: var(--primary-blue);
border: 1px solid var(--primary-blue);
font-weight: 500;
transition: all 0.3s ease;
}
.btn-view:hover {
background-color: var(--light-blue);
color: var(--accent-blue);
}
.btn-enroll {
background-color: var(--primary-blue);
color: white;
font-weight: 500;
transition: all 0.3s ease;
}
.btn-enroll:hover {
background-color: var(--accent-blue);
color: white;
}
/* 页脚样式 */
.footer {
background-color: var(--text-dark);
color: white;
padding: 2.5rem 0 1.5rem;
margin-top: 3rem;
}
.footer-heading {
font-size: 1.1rem;
font-weight: 600;
margin-bottom: 1.2rem;
color: white;
}
.footer-links {
list-style: none;
padding: 0;
}
.footer-links li {
margin-bottom: 0.5rem;
}
.footer-links a {
color: #BDC3C7;
text-decoration: none;
transition: color 0.2s;
}
.footer-links a:hover {
color: white;
}
/* 响应式调整 */
@media (max-width: 768px) {
.path-container {
min-width: 700px;
}
.step-node {
width: 60px;
height: 60px;
}
.step-icon {
font-size: 1.4rem;
}
.step-title {
font-size: 0.9rem;
}
.course-list {
grid-template-columns: 1fr;
}
}