Skip to content

Commit 317e514

Browse files
committed
style(home): prioritize upcoming schedule
1 parent 29aff70 commit 317e514

2 files changed

Lines changed: 35 additions & 76 deletions

File tree

docs/.vitepress/theme/components/HomePage.vue

Lines changed: 31 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,9 @@
22
import { withBase } from 'vitepress'
33
import {
44
calendarEvents,
5-
sessions,
65
topics
76
} from '../../data/program'
87
9-
const facts = [
10-
{ label: '课程场次', value: `${sessions.length} 场系列研讨` },
11-
{ label: '主题方向', value: `${topics.length} 大主题方向` },
12-
{ label: '活动时间', value: '2026 暑期' }
13-
]
14-
158
const formatSteps = [
169
{
1710
number: '01',
@@ -99,7 +92,7 @@ function scheduleHref(href?: string) {
9992
<template>
10093
<main class="home-shell">
10194
<header class="home-hero">
102-
<p class="home-chip">北京大学学生 Linux 俱乐部 · 未名超算</p>
95+
<p class="home-chip">北京大学学生 Linux 俱乐部 · 未名超算队</p>
10396
<h1>AI Infrastructure Seminars</h1>
10497
<p class="home-subtitle">从 GPU Kernel 到分布式训推系统的系列研讨</p>
10598
<p class="home-lead">
@@ -116,11 +109,36 @@ function scheduleHref(href?: string) {
116109
</div>
117110
</header>
118111

119-
<section class="home-facts" aria-label="课程概览">
120-
<article v-for="fact in facts" :key="fact.label" class="home-fact-card">
121-
<p>{{ fact.label }}</p>
122-
<strong>{{ fact.value }}</strong>
123-
</article>
112+
<section class="home-section home-schedule-section" aria-labelledby="home-schedule-title">
113+
<div class="home-section-heading home-section-heading-row">
114+
<div>
115+
<h2 id="home-schedule-title">近期安排</h2>
116+
</div>
117+
<a class="home-calendar-link" :href="withBase('/schedule')">打开完整日历 →</a>
118+
</div>
119+
120+
<div v-if="schedulePreview.length" class="home-schedule-list">
121+
<a
122+
v-for="item in schedulePreview"
123+
:key="item.key"
124+
class="home-schedule-card"
125+
:href="scheduleHref(item.href)"
126+
>
127+
<time :datetime="item.date">
128+
<strong>{{ item.dateLabel }}</strong>
129+
<span>{{ item.year }} 年</span>
130+
</time>
131+
<div>
132+
<span class="home-schedule-kind">{{ item.label }}</span>
133+
<h3>{{ item.title }}</h3>
134+
</div>
135+
<span class="home-schedule-arrow" aria-hidden="true">→</span>
136+
</a>
137+
</div>
138+
<div v-else class="home-schedule-empty">
139+
<strong>近期暂无公开安排</strong>
140+
<span>飞书日历新增活动后会自动显示在这里。</span>
141+
</div>
124142
</section>
125143

126144
<section class="home-section" aria-labelledby="home-topics-title">
@@ -164,38 +182,6 @@ function scheduleHref(href?: string) {
164182
</ol>
165183
</section>
166184

167-
<section class="home-section home-schedule-section" aria-labelledby="home-schedule-title">
168-
<div class="home-section-heading home-section-heading-row">
169-
<div>
170-
<h2 id="home-schedule-title">近期安排</h2>
171-
</div>
172-
<a class="home-calendar-link" :href="withBase('/schedule')">打开完整日历 →</a>
173-
</div>
174-
175-
<div v-if="schedulePreview.length" class="home-schedule-list">
176-
<a
177-
v-for="item in schedulePreview"
178-
:key="item.key"
179-
class="home-schedule-card"
180-
:href="scheduleHref(item.href)"
181-
>
182-
<time :datetime="item.date">
183-
<strong>{{ item.dateLabel }}</strong>
184-
<span>{{ item.year }} 年</span>
185-
</time>
186-
<div>
187-
<span class="home-schedule-kind">{{ item.label }}</span>
188-
<h3>{{ item.title }}</h3>
189-
</div>
190-
<span class="home-schedule-arrow" aria-hidden="true">→</span>
191-
</a>
192-
</div>
193-
<div v-else class="home-schedule-empty">
194-
<strong>近期暂无公开安排</strong>
195-
<span>飞书日历新增活动后会自动显示在这里。</span>
196-
</div>
197-
</section>
198-
199185
<section class="home-section home-sponsor-section" aria-labelledby="home-sponsor-title">
200186
<div class="home-section-heading">
201187
<h2 id="home-sponsor-title">感谢赞助商支持</h2>

docs/.vitepress/theme/style.css

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -401,14 +401,6 @@ a {
401401
color: var(--site-brand) !important;
402402
}
403403

404-
.home-facts {
405-
display: grid;
406-
margin-top: 64px;
407-
grid-template-columns: repeat(3, minmax(0, 1fr));
408-
gap: 12px;
409-
}
410-
411-
.home-fact-card,
412404
.home-topic-card,
413405
.home-format-card,
414406
.home-schedule-card,
@@ -420,33 +412,15 @@ a {
420412
box-shadow: var(--site-shadow);
421413
}
422414

423-
.home-fact-card {
424-
padding: 17px 18px;
425-
}
426-
427-
.home-fact-card p {
428-
color: var(--site-text-3);
429-
font-family: var(--vp-font-family-mono);
430-
font-size: 16px;
431-
font-weight: 650;
432-
letter-spacing: 0.07em;
433-
line-height: 1.45;
434-
}
435-
436-
.home-fact-card strong {
437-
display: block;
438-
margin-top: 5px;
439-
color: var(--site-text);
440-
font-size: 16px;
441-
font-weight: 680;
442-
line-height: 1.5;
443-
}
444-
445415
.home-section {
446416
margin-top: 80px;
447417
scroll-margin-top: 90px;
448418
}
449419

420+
.home-schedule-section {
421+
margin-top: 64px;
422+
}
423+
450424
.home-section-heading {
451425
margin-bottom: 30px;
452426
}
@@ -803,7 +777,6 @@ a {
803777
width: 100%;
804778
}
805779

806-
.home-facts,
807780
.home-format-grid,
808781
.home-sponsor-grid {
809782
grid-template-columns: 1fr;

0 commit comments

Comments
 (0)