| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467 |
- /* resources/css/modules/library-course.css
- 课程栏目专属样式。
- 视觉语言沿用 --wp-* 暖金 token,与 anthology / library-index 一致。
- */
- /* ══════════════════════════════════════════
- 〇、区块通用结构(课程页独立声明,不依赖 library-index.css)
- ══════════════════════════════════════════ */
- .lib-section {
- margin-top: 3rem;
- margin-bottom: 0.5rem;
- }
- .lib-section__header {
- display: flex;
- align-items: center;
- gap: 0.75rem;
- margin-bottom: 1rem;
- padding-bottom: 0.75rem;
- border-bottom: 1px solid var(--wp-border);
- }
- .lib-section__title {
- font-size: 1rem;
- font-weight: 600;
- color: var(--wp-ink);
- margin: 0;
- display: flex;
- align-items: center;
- gap: 0.5rem;
- flex: 1;
- }
- .lib-section__title .ti {
- font-size: 1.125rem;
- color: var(--wp-brand);
- }
- .lib-section__more {
- font-size: 0.8125rem;
- color: var(--wp-brand);
- text-decoration: none;
- white-space: nowrap;
- display: flex;
- align-items: center;
- gap: 0.25rem;
- flex-shrink: 0;
- }
- .lib-section__more:hover {
- text-decoration: underline;
- }
- /* ══════════════════════════════════════════
- 一、统计条
- ══════════════════════════════════════════ */
- .course-stats {
- display: grid;
- grid-template-columns: repeat(3, minmax(0, 1fr));
- gap: 1rem;
- margin-top: 1.5rem;
- }
- .course-stat {
- background: var(--wp-card-bg);
- border: 1px solid var(--wp-border);
- border-radius: 10px;
- padding: 1.25rem 1rem;
- text-align: center;
- }
- .course-stat__value {
- font-size: 1.75rem;
- font-weight: 700;
- color: var(--wp-brand);
- line-height: 1.2;
- font-variant-numeric: tabular-nums;
- }
- .course-stat__label {
- font-size: 0.75rem;
- color: var(--wp-ink-muted);
- margin-top: 0.375rem;
- }
- /* ══════════════════════════════════════════
- 二、最新课程卡片网格
- ══════════════════════════════════════════ */
- .course-grid {
- display: grid;
- grid-template-columns: repeat(4, minmax(0, 1fr));
- gap: 1rem;
- }
- .course-card {
- display: flex;
- flex-direction: column;
- background: var(--wp-card-bg);
- border: 1px solid var(--wp-border);
- border-radius: 10px;
- overflow: hidden;
- text-decoration: none;
- color: inherit;
- transition:
- box-shadow 0.2s,
- transform 0.2s;
- height: 100%;
- }
- .course-card:hover {
- box-shadow:
- 0 8px 24px rgba(200, 134, 10, 0.12),
- 0 2px 8px rgba(0, 0, 0, 0.06);
- transform: translateY(-2px);
- color: inherit;
- text-decoration: none;
- }
- .course-card__cover {
- position: relative;
- aspect-ratio: 16 / 10;
- background-size: cover;
- background-position: center;
- display: flex;
- align-items: center;
- justify-content: center;
- overflow: hidden;
- }
- .course-card__cover-img {
- width: 100%;
- height: 100%;
- object-fit: cover;
- display: block;
- }
- .course-card__cover-fallback {
- color: rgba(255, 255, 255, 0.92);
- font-family: 'Noto Serif SC', 'Noto Serif', Georgia, serif;
- font-size: 1.05rem;
- font-weight: 600;
- padding: 0 1rem;
- text-align: center;
- line-height: 1.4;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- overflow: hidden;
- }
- .course-card__body {
- padding: 1rem 1.1rem 1.1rem;
- display: flex;
- flex-direction: column;
- gap: 0.5rem;
- flex: 1;
- }
- .course-card__title {
- font-family: 'Noto Serif SC', 'Noto Serif', Georgia, serif;
- font-size: 1rem;
- font-weight: 600;
- color: var(--wp-ink);
- line-height: 1.4;
- margin: 0;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- overflow: hidden;
- min-height: 2.8em;
- }
- .course-card:hover .course-card__title {
- color: var(--wp-brand);
- }
- .course-card__teacher {
- min-height: 1.5rem;
- }
- .course-card__foot {
- display: flex;
- align-items: center;
- gap: 0.75rem;
- font-size: 0.75rem;
- color: var(--wp-ink-muted);
- margin-top: auto;
- font-variant-numeric: tabular-nums;
- }
- /* ══════════════════════════════════════════
- 三、状态徽章
- ══════════════════════════════════════════ */
- .course-badge {
- display: inline-flex;
- align-items: center;
- font-size: 0.6875rem;
- font-weight: 600;
- line-height: 1;
- padding: 4px 9px;
- border-radius: 20px;
- white-space: nowrap;
- }
- .course-badge--open {
- background: #eaf3de;
- color: #3b6d11;
- border: 1px solid #c0dd97;
- }
- .course-badge--closed {
- background: #f1efe8;
- color: #6b6a64;
- border: 1px solid #d8d6cc;
- }
- .course-card__cover .course-badge {
- position: absolute;
- top: 0.75rem;
- left: 0.75rem;
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
- }
- /* ══════════════════════════════════════════
- 四、横向列表行(开放报名 / 历史课程)
- ══════════════════════════════════════════ */
- .course-list {
- display: grid;
- grid-template-columns: 1fr;
- gap: 1rem;
- }
- /* 桌面端改为两列,避免横向卡片过宽、中间留白 */
- @media (min-width: 992px) {
- .course-list {
- grid-template-columns: repeat(2, minmax(0, 1fr));
- }
- }
- .course-row {
- display: flex;
- align-items: center;
- gap: 1rem;
- background: var(--wp-card-bg);
- border: 1px solid var(--wp-border);
- border-radius: 10px;
- padding: 0.85rem 1.1rem;
- text-decoration: none;
- color: inherit;
- transition:
- box-shadow 0.2s,
- transform 0.2s,
- border-color 0.2s;
- }
- .course-row:hover {
- box-shadow: 0 6px 20px rgba(200, 134, 10, 0.1);
- transform: translateY(-1px);
- border-color: var(--wp-brand-light);
- color: inherit;
- text-decoration: none;
- }
- .course-row__thumb {
- width: 112px;
- height: 72px;
- flex-shrink: 0;
- border-radius: 6px;
- overflow: hidden;
- background-size: cover;
- background-position: center;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .course-row__thumb img {
- width: 100%;
- height: 100%;
- object-fit: cover;
- display: block;
- }
- .course-row__thumb span {
- color: rgba(255, 255, 255, 0.9);
- font-size: 0.72rem;
- font-weight: 600;
- padding: 0 0.5rem;
- text-align: center;
- line-height: 1.3;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- overflow: hidden;
- }
- .course-row__main {
- flex: 1;
- min-width: 0;
- }
- .course-row__title {
- font-size: 0.95rem;
- font-weight: 600;
- color: var(--wp-ink);
- line-height: 1.4;
- margin: 0 0 0.2rem;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .course-row:hover .course-row__title {
- color: var(--wp-brand);
- }
- .course-row__summary {
- font-size: 0.78rem;
- color: var(--wp-ink-muted);
- line-height: 1.5;
- margin-bottom: 0.45rem;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- overflow: hidden;
- }
- .course-row__meta {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- gap: 0.25rem 0.9rem;
- font-size: 0.75rem;
- color: var(--wp-ink-muted);
- font-variant-numeric: tabular-nums;
- }
- .course-row__period,
- .course-row__members,
- .course-row__date {
- white-space: nowrap;
- }
- .course-row__side {
- display: flex;
- flex-direction: column;
- align-items: flex-end;
- gap: 0.5rem;
- flex-shrink: 0;
- }
- .course-row__cta {
- display: inline-flex;
- align-items: center;
- gap: 0.15rem;
- font-size: 0.78rem;
- font-weight: 600;
- color: var(--wp-brand);
- }
- /* ══════════════════════════════════════════
- 五、历史课程列表页头部
- ══════════════════════════════════════════ */
- .course-page-header {
- background: linear-gradient(135deg, var(--wp-ink) 0%, #2d2010 100%);
- padding: 2.25rem 0 2rem;
- position: relative;
- overflow: hidden;
- }
- .course-page-header::before {
- content: '课';
- font-family: 'Noto Serif SC', serif;
- font-size: 16rem;
- font-weight: 700;
- color: rgba(255, 255, 255, 0.03);
- position: absolute;
- right: -1rem;
- top: -2.5rem;
- line-height: 1;
- pointer-events: none;
- }
- .course-page-header h1 {
- font-family: 'Noto Serif SC', 'Noto Serif', Georgia, serif;
- font-size: 1.75rem;
- font-weight: 600;
- color: #fff;
- margin: 0 0 0.3rem;
- letter-spacing: 0.08em;
- }
- .course-page-header p {
- color: rgba(255, 255, 255, 0.45);
- font-size: 0.85rem;
- margin: 0;
- }
- .course-count-badge {
- background: var(--wp-brand);
- color: var(--wp-ink);
- font-size: 0.75rem;
- font-weight: 700;
- padding: 2px 9px;
- border-radius: 20px;
- margin-left: 0.6rem;
- vertical-align: middle;
- font-variant-numeric: tabular-nums;
- }
- /* ══════════════════════════════════════════
- 六、响应式
- ══════════════════════════════════════════ */
- @media (max-width: 1199px) {
- .course-grid {
- grid-template-columns: repeat(3, minmax(0, 1fr));
- }
- }
- @media (max-width: 991px) {
- .course-grid {
- grid-template-columns: repeat(2, minmax(0, 1fr));
- }
- }
- @media (max-width: 575px) {
- .course-grid {
- grid-template-columns: 1fr;
- }
- .course-stats {
- gap: 0.5rem;
- }
- .course-stat {
- padding: 0.9rem 0.5rem;
- }
- .course-stat__value {
- font-size: 1.4rem;
- }
- .course-row {
- gap: 0.75rem;
- padding: 0.75rem;
- }
- .course-row__thumb {
- width: 84px;
- height: 56px;
- }
- .course-row__summary {
- display: none;
- }
- .course-row__side {
- gap: 0.4rem;
- }
- }
|