@@ -32,129 +32,22 @@ const goToAbout = () => {
3232 </script >
3333
3434<template >
35- <main class =" landing-page " >
36- <section class =" hero " >
37- <h1 class =" title " >算法演示/学习平台</h1 >
38- <p class =" subtitle " >聚焦算法理解与交互实践,帮助你高效掌握核心数据结构与算法思维。</p >
35+ <main class =" flex min-h-[calc(100vh-2rem)] flex-col justify-center gap-8 rounded-2xl border border-slate-200 bg-slate-50 px-4 py-8 text-slate-700 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-100 max-md:min-h-auto max-md:justify-start max-md:gap-6 max-md:px-3 max-md:py-6 " >
36+ <section class =" text-center " >
37+ <h1 class =" text-3xl font-bold text-slate-800 dark:text-slate-100 " >算法演示/学习平台</h1 >
38+ <p class =" mt-3 text-slate-500 dark:text-slate-400 " >聚焦算法理解与交互实践,帮助你高效掌握核心数据结构与算法思维。</p >
3939 </section >
4040
41- <section class =" feature- grid" >
42- <article v-for =" feature in coreFeatures" :key =" feature.title" class =" feature-card " >
43- <h2 >{{ feature.title }}</h2 >
44- <p >{{ feature.description }}</p >
41+ <section class =" grid grid-cols-[repeat(auto-fit,minmax(210px,1fr))] gap-4 max-md: grid-cols-1 " >
42+ <article v-for =" feature in coreFeatures" :key =" feature.title" class =" rounded-xl border border-slate-200 bg-white p-5 shadow-sm dark:border-slate-700 dark:bg-slate-950 " >
43+ <h2 class = " text-lg font-semibold text-slate-800 dark:text-slate-100 " >{{ feature.title }}</h2 >
44+ <p class = " mt-2 text-sm text-slate-500 dark:text-slate-400 " >{{ feature.description }}</p >
4545 </article >
4646 </section >
4747
48- <section class =" actions " >
49- <button class =" btn btn-primary " @click =" goToAlgorithmDemo" >进入算法演示</button >
50- <button class =" btn btn-secondary " @click =" goToAbout" >查看介绍 / 关于</button >
48+ <section class =" flex flex-wrap justify-center gap-3 max-md:flex-col max-md:items-stretch " >
49+ <button class =" cursor-pointer rounded-full bg-sky-700 px-5 py-2 text-sm text-white transition hover:opacity-90 max-md:w-full " @click =" goToAlgorithmDemo" >进入算法演示</button >
50+ <button class =" cursor-pointer rounded-full border border-slate-300 bg-white px-5 py-2 text-sm text-slate-700 transition hover:opacity-90 dark:border-slate-600 dark:bg-slate-900 dark:text-slate-100 max-md:w-full " @click =" goToAbout" >查看介绍 / 关于</button >
5151 </section >
5252 </main >
5353</template >
54-
55- <style scoped>
56- .landing-page {
57- min-height : calc (100vh - 2rem );
58- padding : 2rem 1rem ;
59- background : var (--color-background-soft );
60- border-radius : 16px ;
61- display : flex ;
62- flex-direction : column ;
63- justify-content : center ;
64- gap : 2rem ;
65- }
66-
67- .hero {
68- text-align : center ;
69- }
70-
71- .title {
72- color : var (--color-heading );
73- font-size : clamp (1.75rem , 2.6vw , 2.3rem );
74- font-weight : 700 ;
75- }
76-
77- .subtitle {
78- margin-top : 0.75rem ;
79- color : var (--vt-c-text-light-2 );
80- }
81-
82- .feature-grid {
83- display : grid ;
84- grid-template-columns : repeat (auto-fit , minmax (210px , 1fr ));
85- gap : 1rem ;
86- }
87-
88- .feature-card {
89- background : var (--color-background );
90- border : 1px solid var (--color-border );
91- border-radius : 14px ;
92- box-shadow : 0 8px 24px rgba (44 , 62 , 80 , 0.08 );
93- padding : 1.2rem ;
94- }
95-
96- .feature-card h2 {
97- color : var (--color-heading );
98- font-size : 1.1rem ;
99- font-weight : 600 ;
100- }
101-
102- .feature-card p {
103- margin-top : 0.5rem ;
104- color : var (--vt-c-text-light-2 );
105- font-size : 0.95rem ;
106- }
107-
108- .actions {
109- display : flex ;
110- justify-content : center ;
111- flex-wrap : wrap ;
112- gap : 0.75rem ;
113- }
114-
115- .btn {
116- border : 0 ;
117- border-radius : 999px ;
118- padding : 0.65rem 1.3rem ;
119- cursor : pointer ;
120- font-size : 0.95rem ;
121- transition : opacity 0.2s ease ;
122- }
123-
124- .btn :hover {
125- opacity : 0.9 ;
126- }
127-
128- .btn-primary {
129- background : var (--vt-c-blue );
130- color : var (--vt-c-white );
131- }
132-
133- .btn-secondary {
134- background : var (--color-background );
135- color : var (--color-heading );
136- border : 1px solid var (--color-borderColor );
137- }
138-
139- @media (max-width : 768px ) {
140- .landing-page {
141- min-height : auto ;
142- justify-content : flex-start ;
143- padding : 1.5rem 0.9rem ;
144- gap : 1.5rem ;
145- }
146-
147- .feature-grid {
148- grid-template-columns : 1fr ;
149- }
150-
151- .actions {
152- flex-direction : column ;
153- align-items : stretch ;
154- }
155-
156- .btn {
157- width : 100% ;
158- }
159- }
160- </style >
0 commit comments