Files
RGKT/rg-09112127/css/indexDetail.css
2025-10-10 19:44:14 +08:00

1015 lines
22 KiB
CSS

/* 原始CSS样式保持不变 */
:root {
--antd-color-8: #ad6800;
--antd-color-7: #d48806;
--antd-color-6: #faad14;
--antd-color-5: #ffc53d;
--antd-color-4: #ffd666;
--antd-color-3: #ffe58f;
--antd-color-2: #fff1b8;
}
html,
body,
.container {
margin: 0;
padding: 0;
width: 100vw;
height: 100vh;
overflow: hidden;
/* background: #eff2f9; */
background-image: url(../asset/bg.png);
background-repeat: no-repeat;
background-size: 100%;
}
.container-header {
position: fixed;
top: 0px;
left: 0px;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
background-color: rgba(255, 255, 255, 0.9);
box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 10px;
z-index: 1000;
padding: 10px 20px;
}
.container-header-logo {
display: flex;
align-items: center;
}
.container-header-nav {
display: flex;
margin-right: 50px;
}
.container-header-nav>div {
text-align: center;
margin-right: 10px;
color: rgb(0, 0, 0);
font-weight: 500;
font-size: 16px;
text-decoration: none;
padding: 5px 20px;
border-radius: 20px;
transition: 0.3s;
border: 1px solid transparent;
cursor: pointer;
}
.container-header-nav>div:hover {
border: 1px solid #999;
}
.container-header-nav>div.active {
background-color: transparent;
color: #000;
border: 1px solid #000;
}
.breadcrumb {
position: fixed;
top: 75px;
left: 0;
right: 0;
/* background: #eff2f9; */
backdrop-filter: blur(10px);
padding: 15px 20px;
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
z-index: 999;
font-family: inherit;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
animation: slideInDown 0.6s ease-out;
}
@keyframes slideInDown {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.breadcrumb-content {
color: #6c757d;
font-size: 18px;
font-weight: 500;
display: flex;
align-items: center;
justify-content: space-between;
max-width: 1400px;
margin: 0 auto;
padding: 0 20px;
}
.breadcrumb-content a {
color: var(--antd-color-6);
text-decoration: none;
font-weight: 600;
position: relative;
padding: 4px 8px;
border-radius: 6px;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.breadcrumb-content a::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
width: 0;
height: 2px;
background: var(--antd-color-6);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
transform: translateX(-50%);
}
.breadcrumb-content a:hover::after {
width: 80%;
}
.search-container {
position: relative;
}
.search-input {
padding: 8px 35px 8px 12px;
border: 2px solid #ddd;
border-radius: 20px;
outline: none;
width: 150px;
font-size: 14px;
background: rgba(255, 255, 255, 0.9);
transition: all 0.3s ease;
color: #333;
}
.search-input::placeholder {
color: #999;
}
.breadcrumb-path {
display: flex;
align-items: center;
}
.breadcrumb-path a {
color: #000; /* 默认黑色 */
text-decoration: none;
font-weight: 500;
position: relative;
padding: 4px 8px;
border-radius: 6px;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.breadcrumb-path a:hover {
color: #faad14;
}
.breadcrumb-path a.active {
color: #faad14; /* 选中状态为 #faad14 */
font-weight: 600;
}
.breadcrumb-path span {
margin: 0 8px;
opacity: 0.6;
color: #666;
}
/* 搜索框样式 */
.search-container {
position: relative;
}
.search-input {
padding: 8px 35px 8px 12px;
border: 2px solid #ddd;
border-radius: 20px;
outline: none;
width: 150px;
font-size: 14px;
background: rgba(255, 255, 255, 0.9);
transition: all 0.3s ease;
color: #333;
}
.search-input::placeholder {
color: #999;
}
.search-input:focus {
border-color: #faad14;
box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.1);
width: 180px;
}
.search-icon {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
width: 16px;
height: 16px;
pointer-events: none;
opacity: 0.6;
color: #666;
}
.search-input:focus + .search-icon {
opacity: 1;
color: #faad14;
}
/* 主要内容区域 */
.main-content {
display: flex;
margin: 140px auto 20px auto;
height: calc(100vh - 160px);
font-family: inherit;
max-width: 1400px;
padding: 0 20px;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
animation: fadeInUp 0.8s ease-out;
overflow: hidden;
}
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* 左侧边栏 */
.sidebar {
width: 280px;
background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
border-right: 1px solid rgba(233, 236, 239, 0.3);
overflow-y: auto;
border-radius: 12px 0 0 12px;
animation: slideInLeft 0.6s ease-out 0.2s both;
}
@keyframes slideInLeft {
from {
opacity: 0;
transform: translateX(-20px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
.sidebar-title {
padding: 20px;
font-size: 18px;
font-weight: 700;
color: #343a40;
border-bottom: 1px solid rgba(233, 236, 239, 0.5);
background: linear-gradient(90deg, var(--antd-color-6), var(--antd-color-8));
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
position: relative;
}
.sidebar-title::after {
content: '';
position: absolute;
bottom: 0;
left: 20px;
right: 20px;
height: 3px;
background: linear-gradient(90deg, var(--antd-color-6), var(--antd-color-8));
border-radius: 2px;
}
.sidebar-menu {
list-style: none;
padding: 10px 0;
margin: 0;
}
.sidebar-menu li {
margin: 5px 10px;
border-radius: 8px;
overflow: hidden;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-menu li:hover {
transform: translateX(5px);
}
.sidebar-menu li a {
display: block;
padding: 15px 20px;
color: #343a40;
text-decoration: none;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
font-size: 14px;
font-weight: 500;
border-radius: 8px;
position: relative;
overflow: hidden;
}
.sidebar-menu li a::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-menu li a:hover::before {
left: 100%;
}
.sidebar-menu li a:hover {
background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
color: var(--antd-color-6);
box-shadow: 0 2px 10px rgba(0, 123, 255, 0.1);
}
.sidebar-menu li.active a {
background: linear-gradient(135deg, var(--antd-color-5), var(--antd-color-7));
color: white;
font-weight: 600;
box-shadow: 0 4px 15px var(--antd-color-2);
}
/* 右侧内容区域 */
.content-area {
flex: 1;
padding: 20px;
overflow-y: auto;
background: transparent;
animation: slideInRight 0.6s ease-out 0.4s both;
}
@keyframes slideInRight {
from {
opacity: 0;
transform: translateX(20px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
/* 筛选区域 */
.filter-section {
background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
padding: 25px;
border-radius: 12px;
margin-bottom: 25px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
backdrop-filter: blur(10px);
animation: fadeInScale 0.6s ease-out 0.6s both;
position: relative;
overflow: hidden;
}
@keyframes fadeInScale {
from {
opacity: 0;
transform: scale(0.95);
}
to {
opacity: 1;
transform: scale(1);
}
}
.filter-section::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: linear-gradient(90deg, var(--antd-color-6), var(--antd-color-8), var(--antd-color-4));
}
.filter-row {
display: flex;
align-items: center;
margin-bottom: 20px;
flex-wrap: wrap;
animation: slideInUp 0.5s ease-out forwards;
}
@keyframes slideInUp {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.filter-row:last-child {
margin-bottom: 0;
}
.filter-label {
min-width: 80px;
font-weight: 700;
color: #343a40;
margin-right: 20px;
font-size: 15px;
position: relative;
}
.filter-label::after {
content: '';
position: absolute;
right: -10px;
top: 50%;
width: 2px;
height: 20px;
background: linear-gradient(to bottom, var(--antd-color-6), transparent);
transform: translateY(-50%);
}
.filter-tags {
display: flex;
flex-wrap: wrap;
gap: 12px;
}
.filter-tag {
padding: 8px 18px;
background: linear-gradient(145deg, #ffffff, #f8f9fa);
color: #6c757d;
border: 2px solid transparent;
border-radius: 25px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.filter-tag::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.filter-tag:hover::before {
left: 100%;
}
.filter-tag:hover {
transform: translateY(-2px);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
border-color: var(--antd-color-6);
}
.filter-tag.active {
background: linear-gradient(135deg, var(--antd-color-5), var(--antd-color-7));
color: white;
border-color: var(--antd-color-6);
box-shadow: 0 4px 20px var(--antd-color-3);
transform: translateY(-1px);
}
/* 教材展示区域 - 学期卡片 */
.materials-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
gap: 30px;
animation: staggerFadeIn 0.8s ease-out 0.8s both;
}
@keyframes staggerFadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.material-card {
background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
border-radius: 12px;
padding: 30px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
cursor: pointer;
position: relative;
overflow: hidden;
border: 1px solid rgba(255, 255, 255, 0.2);
animation: cardSlideIn 0.6s ease-out forwards;
}
@keyframes cardSlideIn {
from {
opacity: 0;
transform: translateY(20px) scale(0.95);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
.material-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: linear-gradient(90deg, var(--antd-color-6), var(--antd-color-8));
transform: scaleX(0);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.material-card:hover::before {
transform: scaleX(1);
}
.material-card:hover {
transform: translateY(-8px) scale(1.02);
box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}
.material-cover {
display: flex;
align-items: center;
margin-bottom: 25px;
}
.material-image {
width: 130px;
height: 160px;
border-radius: 12px;
margin-right: 25px;
position: relative;
overflow: hidden;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
/* 添加默认的渐变背景 */
background-color: var(--antd-color-2);
background-image: linear-gradient(135deg, var(--antd-color-3) 0%, var(--antd-color-5) 100%);
}
.material-image::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 50px;
height: 50px;
background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg>') center/contain no-repeat;
opacity: 0.4;
pointer-events: none;
z-index: 1;
}
/* 当背景图片加载成功时,隐藏默认图标 */
.material-image[style*="background-image: url"]::before {
display: none;
}
.material-image::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(135deg, transparent 60%, rgba(0, 123, 255, 0.1));
opacity: 0;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.material-card:hover .material-image::after {
opacity: 1;
}
.material-card:hover .material-image {
transform: scale(1.05);
}
.material-info h3 {
margin: 0 0 15px 0;
font-size: 20px;
font-weight: 700;
color: #343a40;
line-height: 1.4;
background: linear-gradient(135deg, var(--antd-color-7), var(--antd-color-5));
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.material-meta {
display: flex;
align-items: center;
gap: 15px;
font-size: 14px;
color: #6c757d;
font-weight: 500;
}
.material-meta span {
display: flex;
align-items: center;
gap: 8px;
padding: 4px 10px;
background: rgba(0, 123, 255, 0.1);
border-radius: 15px;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.material-meta span:hover {
background: rgba(0, 123, 255, 0.2);
transform: scale(1.05);
}
.material-meta .icon {
width: 16px;
height: 16px;
background: linear-gradient(135deg, var(--antd-color-6), var(--antd-color-4));
border-radius: 50%;
}
.course-stats {
font-size: 15px;
color: #6c757d;
margin-top: 18px;
font-weight: 500;
padding: 10px 15px;
background: linear-gradient(135deg, rgba(0, 123, 255, 0.05), rgba(108, 117, 125, 0.05));
border-radius: 8px;
border-left: 4px solid var(--antd-color-6);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.material-card:hover .course-stats {
background: linear-gradient(135deg, rgba(0, 123, 255, 0.1), rgba(108, 117, 125, 0.1));
transform: translateX(5px);
}
/* 新增:课程列表展示区域 - 课程卡片 */
.course-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 20px;
animation: staggerFadeIn 0.8s ease-out 0.8s both;
}
/* 返回按钮样式 */
.back-button {
grid-column: 1 / -1;
display: flex;
align-items: center;
gap: 10px;
padding: 12px 20px;
background: linear-gradient(135deg, var(--antd-color-5), var(--antd-color-7));
color: white;
border-radius: 25px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 4px 15px var(--antd-color-3);
margin-bottom: 20px;
width: fit-content;
}
.back-button:hover {
transform: translateY(-2px);
box-shadow: 0 6px 25px var(--antd-color-3);
background: linear-gradient(135deg, var(--antd-color-7), var(--antd-color-5));
}
.back-button svg {
width: 18px;
height: 18px;
}
/* 课程卡片样式 - 比学期卡片更小 */
.course-card {
background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
border-radius: 10px;
padding: 20px;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
cursor: pointer;
position: relative;
overflow: hidden;
border: 1px solid rgba(255, 255, 255, 0.2);
animation: courseCardSlideIn 0.5s ease-out forwards;
}
@keyframes courseCardSlideIn {
from {
opacity: 0;
transform: translateY(15px) scale(0.95);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
.course-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 3px;
background: linear-gradient(90deg, var(--antd-color-6), var(--antd-color-8));
transform: scaleX(0);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.course-card:hover::before {
transform: scaleX(1);
}
.course-card:hover {
transform: translateY(-5px) scale(1.02);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}
.course-card.disabled {
opacity: 0.6;
cursor: pointer;
}
.course-card.disabled:hover {
transform: none;
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
.course-cover {
display: flex;
flex-direction: column;
height: 100%;
}
.course-image {
width: 100%;
height: 120px;
border-radius: 8px;
margin-bottom: 15px;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
background-color: var(--antd-color-2);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
overflow: hidden;
/* 添加默认的渐变背景,当图片加载失败时显示 */
background-image: linear-gradient(135deg, var(--antd-color-3) 0%, var(--antd-color-5) 100%);
}
.course-image::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 40px;
height: 40px;
background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14,2 14,8 20,8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10,9 9,9 8,9"/></svg>') center/contain no-repeat;
opacity: 0.3;
pointer-events: none;
}
/* 当背景图片加载成功时,隐藏默认图标 */
.course-image[style*="background-image: url"]::before {
display: none;
}
.course-image::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(135deg, transparent 60%, rgba(250, 173, 20, 0.1));
opacity: 0;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.course-card:hover .course-image::after {
opacity: 1;
}
.course-card:hover .course-image {
transform: scale(1.02);
}
.course-info {
flex: 1;
display: flex;
flex-direction: column;
}
.course-info h4 {
margin: 0 0 10px 0;
font-size: 16px;
font-weight: 600;
color: #343a40;
line-height: 1.3;
background: linear-gradient(135deg, var(--antd-color-7), var(--antd-color-5));
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.course-description {
margin: 0 0 12px 0;
font-size: 13px;
color: #6c757d;
line-height: 1.4;
flex: 1;
}
.course-meta {
margin-bottom: 12px;
}
.course-id {
font-size: 12px;
color: #999;
background: rgba(0, 123, 255, 0.1);
padding: 3px 8px;
border-radius: 10px;
display: inline-block;
}
.course-action {
font-size: 13px;
color: #6c757d;
font-weight: 500;
padding: 8px 12px;
background: linear-gradient(135deg, rgba(250, 173, 20, 0.05), rgba(108, 117, 125, 0.05));
border-radius: 6px;
border-left: 3px solid var(--antd-color-6);
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
text-align: center;
}
.course-card:hover .course-action {
background: linear-gradient(135deg, rgba(250, 173, 20, 0.1), rgba(108, 117, 125, 0.1));
transform: translateY(-1px);
}
/* 空课程样式 */
.empty-course {
grid-column: 1 / -1;
text-align: center;
padding: 60px 20px;
color: #6c757d;
}
.empty-content h3 {
margin: 0 0 10px 0;
font-size: 20px;
color: #343a40;
}
.empty-content p {
margin: 0;
font-size: 14px;
opacity: 0.8;
}
/* 自定义滚动条 */
.sidebar::-webkit-scrollbar,
.content-area::-webkit-scrollbar {
width: 6px;
}
.sidebar::-webkit-scrollbar-track,
.content-area::-webkit-scrollbar-track {
background: rgba(248, 249, 250, 0.5);
border-radius: 3px;
}
.sidebar::-webkit-scrollbar-thumb,
.content-area::-webkit-scrollbar-thumb {
background: linear-gradient(135deg, var(--antd-color-6), var(--antd-color-8));
border-radius: 3px;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar::-webkit-scrollbar-thumb:hover,
.content-area::-webkit-scrollbar-thumb:hover {
background: linear-gradient(135deg, var(--antd-color-8), var(--antd-color-4));
}
/* 响应式优化 */
@media (max-width: 768px) {
.main-content {
flex-direction: column;
margin: 120px 10px 10px 10px;
height: calc(100vh - 130px);
}
.sidebar {
width: 100%;
height: auto;
border-right: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 12px 12px 0 0;
}
.materials-grid {
grid-template-columns: 1fr;
gap: 20px;
}
.course-grid {
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 15px;
}
.material-cover {
flex-direction: column;
text-align: center;
}
.material-image {
margin-right: 0;
margin-bottom: 15px;
}
}
/* 加载动画 */
@keyframes pulse {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
.loading {
animation: pulse 1.5s ease-in-out infinite;
}