Files
geminiWX/wechat-mini-program/pages/course/course.wxss
2025-12-08 14:39:07 +08:00

310 lines
5.1 KiB
Plaintext

.page-container {
min-height: 100vh;
background-color: var(--background-color);
padding-bottom: 40rpx;
}
/* Honor Section */
.honor-section {
background-color: var(--surface-color);
padding: 30rpx;
margin-bottom: 20rpx;
border-bottom-left-radius: 30rpx;
border-bottom-right-radius: 30rpx;
box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.05);
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24rpx;
}
.section-title {
font-size: 34rpx;
font-weight: bold;
color: var(--text-main);
position: relative;
padding-left: 20rpx;
}
.section-title::before {
content: '';
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 8rpx;
height: 32rpx;
background-color: var(--primary-color);
border-radius: 4rpx;
}
.honor-count {
font-size: 24rpx;
color: var(--text-secondary);
}
.honor-scroll {
width: 100%;
white-space: nowrap;
}
.honor-list {
display: flex;
flex-wrap: wrap;
padding-bottom: 10rpx;
margin-right: -20rpx; /* Compensate for the right margin of items */
}
.honor-item {
display: inline-block;
width: calc(50% - 20rpx); /* 2 items per row with gap */
margin-right: 20rpx;
margin-bottom: 20rpx;
background-color: var(--surface-color);
border-radius: 16rpx;
overflow: hidden;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.08);
border: 1px solid var(--border-color);
box-sizing: border-box;
}
.honor-image {
width: 100%;
height: 160rpx;
background-color: #e5e7eb;
}
.honor-info {
padding: 16rpx;
}
.honor-title {
font-size: 26rpx;
font-weight: bold;
color: #374151;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 8rpx;
}
.honor-date {
font-size: 20rpx;
color: var(--text-light);
display: block;
}
/* Course Section */
.course-section {
padding: 30rpx;
}
.filter-tabs {
display: flex;
background-color: #e5e7eb;
border-radius: 16rpx;
padding: 6rpx;
margin-bottom: 30rpx;
}
.tab-item {
flex: 1;
text-align: center;
font-size: 26rpx;
color: var(--text-secondary);
padding: 12rpx 0;
border-radius: 12rpx;
transition: all 0.3s;
}
.tab-item.active {
background-color: var(--surface-color);
color: var(--primary-color);
font-weight: bold;
box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.05);
}
.project-list {
display: flex;
flex-direction: column;
gap: 24rpx;
}
.project-card {
background-color: var(--surface-color);
border-radius: 20rpx;
padding: 24rpx;
display: flex;
gap: 24rpx;
box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.04);
}
.project-image {
width: 160rpx;
height: 160rpx;
border-radius: 16rpx;
background-color: var(--surface-secondary);
flex-shrink: 0;
}
.project-info {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.project-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
}
.project-title {
font-size: 30rpx;
font-weight: bold;
color: var(--text-main);
flex: 1;
margin-right: 16rpx;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.project-type-tag {
font-size: 20rpx;
padding: 4rpx 12rpx;
border-radius: 8rpx;
white-space: nowrap;
}
.project-type-tag.training {
background-color: var(--primary-light);
color: var(--primary-color);
}
.project-type-tag.competition {
background-color: var(--warning-bg);
color: var(--warning-color);
}
.project-type-tag.grading {
background-color: var(--success-bg);
color: var(--success-color);
}
.project-meta {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 16rpx;
}
.status-text {
font-size: 24rpx;
font-weight: 500;
}
.status-text.enrolled {
color: var(--info-color);
}
.status-text.studying {
color: #07c160;
}
.status-text.completed {
color: #10b981; /* Keep or use success-color */
}
.status-text.cancelled {
color: var(--text-light);
}
.date-text {
font-size: 22rpx;
color: var(--text-light);
}
/* Empty State */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 60rpx 0;
}
.empty-icon {
width: 120rpx;
height: 120rpx;
margin-bottom: 20rpx;
opacity: 0.5;
}
.empty-text {
font-size: 26rpx;
color: var(--text-light);
}
/* Modal */
.modal-mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.6);
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
}
.modal-content {
width: 80%;
background-color: var(--surface-color);
border-radius: 24rpx;
padding: 40rpx;
position: relative;
max-height: 80vh;
overflow-y: auto;
}
.modal-image {
width: 100%;
border-radius: 16rpx;
margin-bottom: 30rpx;
}
.modal-info {
text-align: center;
}
.modal-title {
font-size: 36rpx;
font-weight: bold;
color: var(--text-main);
display: block;
margin-bottom: 16rpx;
}
.modal-date {
font-size: 24rpx;
color: var(--text-secondary);
display: block;
margin-bottom: 20rpx;
}
.modal-desc {
font-size: 28rpx;
color: #4b5563;
line-height: 1.6;
text-align: left;
}