|
1 | 1 | --- |
2 | 2 | import Button from '../../components/Button.astro'; |
| 3 | +import FeatureCard from '../../components/FeatureCard.astro'; |
3 | 4 | import AppShell from '../../layouts/AppShell.astro'; |
4 | 5 | import { languages, useTranslations } from '../../i18n/ui'; |
5 | 6 | import lessons from '../../data/lessons.json'; |
@@ -44,31 +45,26 @@ const totalLessons = lessons.length; |
44 | 45 | </div> |
45 | 46 |
|
46 | 47 | <section class="info-grid"> |
47 | | - <div class="info-card"> |
48 | | - <div class="info-icon"> |
49 | | - <BookOpen size={24} /> |
50 | | - </div> |
51 | | - <h3> |
52 | | - {totalLessons} {t('card.lessons.title')} |
53 | | - </h3> |
54 | | - <p>{t('card.lessons.desc')}</p> |
55 | | - </div> |
56 | | - |
57 | | - <div class="info-card"> |
58 | | - <div class="info-icon"> |
59 | | - <Settings size={24} /> |
60 | | - </div> |
61 | | - <h3>{t('card.stdlib.title')}</h3> |
62 | | - <p>{t('card.stdlib.desc')}</p> |
63 | | - </div> |
64 | | - |
65 | | - <div class="info-card"> |
66 | | - <div class="info-icon"> |
67 | | - <Zap size={24} /> |
68 | | - </div> |
69 | | - <h3>{t('card.run.title')}</h3> |
70 | | - <p>{t('card.run.desc')}</p> |
71 | | - </div> |
| 48 | + <FeatureCard |
| 49 | + title={`${totalLessons} ${t('card.lessons.title')}`} |
| 50 | + description={t('card.lessons.desc')} |
| 51 | + > |
| 52 | + <BookOpen size={24} slot="icon" /> |
| 53 | + </FeatureCard> |
| 54 | + |
| 55 | + <FeatureCard |
| 56 | + title={t('card.stdlib.title')} |
| 57 | + description={t('card.stdlib.desc')} |
| 58 | + > |
| 59 | + <Settings size={24} slot="icon" /> |
| 60 | + </FeatureCard> |
| 61 | + |
| 62 | + <FeatureCard |
| 63 | + title={t('card.run.title')} |
| 64 | + description={t('card.run.desc')} |
| 65 | + > |
| 66 | + <Zap size={24} slot="icon" /> |
| 67 | + </FeatureCard> |
72 | 68 | </section> |
73 | 69 |
|
74 | 70 | <section class="philosophy-section"> |
@@ -137,36 +133,6 @@ const totalLessons = lessons.length; |
137 | 133 | gap: 1.5rem; |
138 | 134 | } |
139 | 135 |
|
140 | | - .info-card { |
141 | | - padding: 1.5rem; |
142 | | - border-radius: 8px; |
143 | | - border: 1px solid var(--border-color); |
144 | | - background-color: var(--bg-secondary); |
145 | | - transition: transform var(--transition-speed); |
146 | | - } |
147 | | - |
148 | | - .info-card:hover { |
149 | | - transform: translateY(-2px); |
150 | | - border-color: var(--forest-green); |
151 | | - } |
152 | | - |
153 | | - .info-icon { |
154 | | - color: var(--forest-green); |
155 | | - margin-bottom: 0.75rem; |
156 | | - display: flex; |
157 | | - align-items: center; |
158 | | - } |
159 | | - |
160 | | - .info-card h3 { |
161 | | - font-size: 1.15rem; |
162 | | - margin-bottom: 0.5rem; |
163 | | - } |
164 | | - |
165 | | - .info-card p { |
166 | | - font-size: 0.9rem; |
167 | | - color: var(--text-secondary); |
168 | | - } |
169 | | - |
170 | 136 | .philosophy-section { |
171 | 137 | padding-top: 2rem; |
172 | 138 | border-top: 1px solid var(--border-color); |
|
0 commit comments