483 lines
8.2 KiB
Plaintext
483 lines
8.2 KiB
Plaintext
/* pages/courses/courses.wxss */
|
|
.container {
|
|
background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
|
|
min-height: 100vh;
|
|
/* 底部留出TabBar的空间 */
|
|
padding-bottom: calc(env(safe-area-inset-bottom) + 150rpx);
|
|
}
|
|
|
|
/* 搜索栏 */
|
|
.search-bar {
|
|
display: flex;
|
|
padding: 20rpx 30rpx;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
gap: 20rpx;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.15);
|
|
}
|
|
|
|
.search-input-wrap {
|
|
flex: 1;
|
|
position: relative;
|
|
animation: slideInLeft 0.5s ease-out;
|
|
}
|
|
|
|
@keyframes slideInLeft {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateX(-20rpx);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateX(0);
|
|
}
|
|
}
|
|
|
|
.search-input {
|
|
width: 100%;
|
|
height: 70rpx;
|
|
background-color: rgba(255, 255, 255, 0.95);
|
|
border-radius: 35rpx;
|
|
padding: 0 50rpx 0 30rpx;
|
|
font-size: 28rpx;
|
|
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.search-input:focus {
|
|
background-color: #ffffff;
|
|
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.12);
|
|
}
|
|
|
|
.search-icon {
|
|
position: absolute;
|
|
right: 30rpx;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
font-size: 32rpx;
|
|
color: #999999;
|
|
transition: color 0.3s ease;
|
|
}
|
|
|
|
.clear-icon {
|
|
position: absolute;
|
|
right: 30rpx;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
font-size: 32rpx;
|
|
color: #999999;
|
|
width: 40rpx;
|
|
height: 40rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: linear-gradient(135deg, #E0E0E0 0%, #BDBDBD 100%);
|
|
border-radius: 50%;
|
|
font-size: 24rpx;
|
|
box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.1);
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.clear-icon:active {
|
|
transform: translateY(-50%) scale(0.9);
|
|
box-shadow: 0 1rpx 3rpx rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.filter-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10rpx;
|
|
padding: 0 30rpx;
|
|
background: rgba(255, 255, 255, 0.25);
|
|
color: #ffffff;
|
|
border-radius: 35rpx;
|
|
font-size: 28rpx;
|
|
backdrop-filter: blur(10rpx);
|
|
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
|
|
transition: all 0.3s ease;
|
|
animation: slideInRight 0.5s ease-out;
|
|
}
|
|
|
|
@keyframes slideInRight {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateX(20rpx);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateX(0);
|
|
}
|
|
}
|
|
|
|
.filter-btn:active {
|
|
background: rgba(255, 255, 255, 0.35);
|
|
transform: scale(0.95);
|
|
}
|
|
|
|
.filter-icon {
|
|
font-size: 32rpx;
|
|
}
|
|
|
|
/* 分类标签 */
|
|
.category-scroll {
|
|
white-space: nowrap;
|
|
background-color: #ffffff;
|
|
padding: 20rpx 0;
|
|
border-bottom: 1rpx solid #f0f0f0;
|
|
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
|
|
}
|
|
|
|
.category-list {
|
|
display: inline-flex;
|
|
padding: 0 30rpx;
|
|
gap: 20rpx;
|
|
}
|
|
|
|
.category-item {
|
|
display: inline-block;
|
|
padding: 14rpx 32rpx;
|
|
background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
|
|
color: #666666;
|
|
border-radius: 30rpx;
|
|
font-size: 26rpx;
|
|
font-weight: 500;
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.06);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.category-item::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: linear-gradient(135deg, rgba(74, 144, 226, 0.1) 0%, rgba(102, 126, 234, 0.1) 100%);
|
|
opacity: 0;
|
|
transition: opacity 0.3s ease;
|
|
}
|
|
|
|
.category-item:active::before {
|
|
opacity: 1;
|
|
}
|
|
|
|
.category-item.active {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: #ffffff;
|
|
box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3);
|
|
transform: translateY(-2rpx);
|
|
}
|
|
|
|
.category-item.active::before {
|
|
opacity: 0;
|
|
}
|
|
|
|
/* 筛选面板 */
|
|
.filter-panel {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
z-index: 200;
|
|
pointer-events: none;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.filter-panel.show {
|
|
pointer-events: auto;
|
|
}
|
|
|
|
.filter-panel::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
opacity: 0;
|
|
transition: opacity 0.3s ease;
|
|
backdrop-filter: blur(4rpx);
|
|
}
|
|
|
|
.filter-panel.show::before {
|
|
opacity: 1;
|
|
}
|
|
|
|
.filter-content {
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
background-color: #ffffff;
|
|
border-radius: 30rpx 30rpx 0 0;
|
|
padding: 40rpx 30rpx;
|
|
transform: translateY(100%);
|
|
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.filter-panel.show .filter-content {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
/* 课程列表 */
|
|
.course-list {
|
|
padding: 20rpx 30rpx;
|
|
}
|
|
|
|
.result-count {
|
|
font-size: 26rpx;
|
|
color: #999999;
|
|
margin-bottom: 20rpx;
|
|
animation: fadeIn 0.5s ease-out;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; }
|
|
to { opacity: 1; }
|
|
}
|
|
|
|
.course-card {
|
|
background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
|
|
border-radius: 20rpx;
|
|
padding: 30rpx;
|
|
margin-bottom: 20rpx;
|
|
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
position: relative;
|
|
overflow: hidden;
|
|
animation: slideInUp 0.5s ease-out both;
|
|
}
|
|
|
|
.course-card:nth-child(1) { animation-delay: 0.05s; }
|
|
.course-card:nth-child(2) { animation-delay: 0.1s; }
|
|
.course-card:nth-child(3) { animation-delay: 0.15s; }
|
|
.course-card:nth-child(4) { animation-delay: 0.2s; }
|
|
.course-card:nth-child(5) { animation-delay: 0.25s; }
|
|
|
|
@keyframes slideInUp {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(20rpx);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.course-card::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 6rpx;
|
|
height: 100%;
|
|
background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
|
|
opacity: 0;
|
|
transition: opacity 0.3s ease;
|
|
}
|
|
|
|
.course-card:active {
|
|
transform: scale(0.98);
|
|
box-shadow: 0 8rpx 24rpx rgba(102, 126, 234, 0.15);
|
|
}
|
|
|
|
.course-card:active::before {
|
|
opacity: 1;
|
|
}
|
|
|
|
/* 筛选面板 */
|
|
.filter-panel {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
z-index: 200;
|
|
display: none;
|
|
}
|
|
|
|
.filter-panel.show {
|
|
display: block;
|
|
}
|
|
|
|
.filter-content {
|
|
position: absolute;
|
|
top: 200rpx;
|
|
left: 30rpx;
|
|
right: 30rpx;
|
|
background-color: #ffffff;
|
|
border-radius: 16rpx;
|
|
padding: 40rpx;
|
|
}
|
|
|
|
.filter-item {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: 30rpx;
|
|
}
|
|
|
|
.filter-label {
|
|
font-size: 28rpx;
|
|
color: #333333;
|
|
margin-right: 20rpx;
|
|
}
|
|
|
|
.picker-value {
|
|
flex: 1;
|
|
padding: 20rpx;
|
|
background-color: #F5F5F5;
|
|
border-radius: 8rpx;
|
|
font-size: 28rpx;
|
|
}
|
|
|
|
.filter-actions {
|
|
display: flex;
|
|
gap: 20rpx;
|
|
margin-top: 40rpx;
|
|
}
|
|
|
|
.reset-btn, .confirm-btn {
|
|
flex: 1;
|
|
height: 80rpx;
|
|
line-height: 80rpx;
|
|
border-radius: 40rpx;
|
|
font-size: 28rpx;
|
|
}
|
|
|
|
.reset-btn {
|
|
background-color: #F5F5F5;
|
|
color: #666666;
|
|
}
|
|
|
|
.confirm-btn {
|
|
background-color: #4A90E2;
|
|
color: #ffffff;
|
|
}
|
|
|
|
/* 课程列表 */
|
|
.course-list {
|
|
padding: 20rpx 30rpx;
|
|
}
|
|
|
|
.result-count {
|
|
font-size: 26rpx;
|
|
color: #999999;
|
|
margin-bottom: 20rpx;
|
|
}
|
|
|
|
.count-number {
|
|
color: #4A90E2;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.course-card {
|
|
background-color: #ffffff;
|
|
border-radius: 16rpx;
|
|
padding: 30rpx;
|
|
margin-bottom: 20rpx;
|
|
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.06);
|
|
}
|
|
|
|
.course-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
margin-bottom: 20rpx;
|
|
}
|
|
|
|
.course-title {
|
|
flex: 1;
|
|
font-size: 32rpx;
|
|
font-weight: bold;
|
|
color: #333333;
|
|
}
|
|
|
|
.favorite-btn {
|
|
padding: 10rpx;
|
|
}
|
|
|
|
.favorite-icon {
|
|
font-size: 36rpx;
|
|
}
|
|
|
|
.course-info {
|
|
margin-bottom: 20rpx;
|
|
}
|
|
|
|
.info-row {
|
|
display: flex;
|
|
margin-bottom: 12rpx;
|
|
font-size: 26rpx;
|
|
}
|
|
|
|
.info-label {
|
|
color: #999999;
|
|
width: 150rpx;
|
|
}
|
|
|
|
.info-value {
|
|
flex: 1;
|
|
color: #666666;
|
|
}
|
|
|
|
.course-footer {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding-top: 20rpx;
|
|
border-top: 1rpx solid #EEEEEE;
|
|
}
|
|
|
|
.course-tags {
|
|
display: flex;
|
|
gap: 10rpx;
|
|
}
|
|
|
|
.tag {
|
|
padding: 8rpx 16rpx;
|
|
border-radius: 6rpx;
|
|
font-size: 22rpx;
|
|
}
|
|
|
|
.category-tag {
|
|
background-color: #E8F4FF;
|
|
color: #4A90E2;
|
|
}
|
|
|
|
.credit-tag {
|
|
background-color: #FFF0E6;
|
|
color: #FF8C42;
|
|
}
|
|
|
|
.enrollment-info {
|
|
font-size: 24rpx;
|
|
color: #999999;
|
|
}
|
|
|
|
/* 空状态 */
|
|
.empty-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 100rpx 0;
|
|
}
|
|
|
|
.empty-icon {
|
|
font-size: 100rpx;
|
|
margin-bottom: 20rpx;
|
|
}
|
|
|
|
.empty-text {
|
|
font-size: 28rpx;
|
|
color: #999999;
|
|
}
|