|
4 | 4 | <h2>{{ concepts.title }}</h2> |
5 | 5 | <p>{{ concepts.description }}</p> |
6 | 6 | <ul> |
7 | | - <li v-for="item in concepts.items" :key="item.title"> |
8 | | - <a :href="`/${locale}${item.link}`">{{ item.title }}</a> - {{ item.description }} |
| 7 | + <li |
| 8 | + v-for="item in concepts.items" |
| 9 | + :key="item.title" |
| 10 | + > |
| 11 | + <a :href="`/${locale}${item.link || '#'}`">{{ item.title }}</a> |
| 12 | + - {{ item.description }} |
9 | 13 | </li> |
10 | 14 | </ul> |
11 | 15 | </div> |
|
14 | 18 | <h2>{{ showcases.title }}</h2> |
15 | 19 | <p>{{ showcases.description }}</p> |
16 | 20 | <ul> |
17 | | - <li v-for="item in showcases.items" :key="item.title"> |
18 | | - <a :href="`/${locale}${item.link}`">{{ item.title }}</a> - {{ item.description }} |
| 21 | + <li |
| 22 | + v-for="item in showcases.items" |
| 23 | + :key="item.title" |
| 24 | + > |
| 25 | + <a :href="`/${locale}${item.link || '#'}`">{{ item.title }}</a> |
| 26 | + - {{ item.description }} |
19 | 27 | </li> |
20 | 28 | </ul> |
21 | 29 | </div> |
22 | 30 | </div> |
23 | 31 | </template> |
24 | 32 |
|
25 | 33 | <script setup lang="ts"> |
26 | | -import { useData } from 'vitepress'; |
27 | | -import { computed } from 'vue'; |
| 34 | + import { useData } from "vitepress"; |
| 35 | + import { computed } from "vue"; |
28 | 36 |
|
29 | | -const { frontmatter } = useData(); |
| 37 | + const { frontmatter } = useData(); |
30 | 38 |
|
31 | | -const locale = computed(() => frontmatter.value.locale || 'en-US'); |
32 | | -const concepts = computed(() => frontmatter.value.concepts || {}); |
33 | | -const showcases = computed(() => frontmatter.value.showcases || {}); |
| 39 | + const locale = computed(() => frontmatter.value.locale || "en-US"); |
| 40 | + const concepts = computed(() => frontmatter.value.concepts || {}); |
| 41 | + const showcases = computed(() => frontmatter.value.showcases || {}); |
34 | 42 | </script> |
35 | 43 |
|
36 | 44 | <style scoped> |
37 | | -.home-sections { |
38 | | - display: grid; |
39 | | - grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); |
40 | | - gap: 2rem; |
41 | | - margin: 4rem 0; |
42 | | - max-width: 1200px; |
43 | | - margin-left: auto; |
44 | | - margin-right: auto; |
45 | | - position: relative; |
46 | | - overflow: hidden; |
47 | | -} |
| 45 | + .home-sections { |
| 46 | + display: grid; |
| 47 | + grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); |
| 48 | + gap: 2rem; |
| 49 | + margin: 4rem 0; |
| 50 | + max-width: 1200px; |
| 51 | + margin-left: auto; |
| 52 | + margin-right: auto; |
| 53 | + position: relative; |
| 54 | + overflow: hidden; |
| 55 | + } |
48 | 56 |
|
49 | | -.section-card { |
50 | | - padding: 2rem; |
51 | | - background: var(--vp-c-bg-soft); |
52 | | - border-radius: 12px; |
53 | | - position: relative; |
54 | | - z-index: 1; |
55 | | -} |
| 57 | + .section-card { |
| 58 | + padding: 2rem; |
| 59 | + background: var(--vp-c-bg-soft); |
| 60 | + border-radius: 12px; |
| 61 | + position: relative; |
| 62 | + z-index: 1; |
| 63 | + } |
56 | 64 |
|
57 | | -.section-card h2 { |
58 | | - margin-top: 0; |
59 | | - margin-bottom: 1rem; |
60 | | -} |
| 65 | + .section-card h2 { |
| 66 | + margin-top: 0; |
| 67 | + margin-bottom: 1rem; |
| 68 | + } |
61 | 69 |
|
62 | | -.section-card p { |
63 | | - color: var(--vp-c-text-2); |
64 | | - margin-bottom: 1rem; |
65 | | -} |
| 70 | + .section-card p { |
| 71 | + color: var(--vp-c-text-2); |
| 72 | + margin-bottom: 1rem; |
| 73 | + } |
66 | 74 |
|
67 | | -.section-card ul { |
68 | | - list-style: none; |
69 | | - padding: 0; |
70 | | - margin: 0; |
71 | | -} |
| 75 | + .section-card ul { |
| 76 | + list-style: none; |
| 77 | + padding: 0; |
| 78 | + margin: 0; |
| 79 | + } |
72 | 80 |
|
73 | | -.section-card li { |
74 | | - padding: 0.5rem 0; |
75 | | - border-bottom: 1px solid var(--vp-c-divider); |
76 | | -} |
| 81 | + .section-card li { |
| 82 | + padding: 0.5rem 0; |
| 83 | + border-bottom: 1px solid var(--vp-c-divider); |
| 84 | + } |
77 | 85 |
|
78 | | -.section-card li:last-child { |
79 | | - border-bottom: none; |
80 | | -} |
| 86 | + .section-card li:last-child { |
| 87 | + border-bottom: none; |
| 88 | + } |
81 | 89 |
|
82 | | -.section-card a { |
83 | | - color: var(--vp-c-brand-1); |
84 | | - text-decoration: none; |
85 | | - transition: color 0.2s ease; |
86 | | -} |
| 90 | + .section-card a { |
| 91 | + color: var(--vp-c-brand-1); |
| 92 | + text-decoration: none; |
| 93 | + transition: color 0.2s ease; |
| 94 | + } |
87 | 95 |
|
88 | | -.section-card a:hover { |
89 | | - color: var(--vp-c-brand-2); |
90 | | - text-decoration: underline; |
91 | | -} |
| 96 | + .section-card a:hover { |
| 97 | + color: var(--vp-c-brand-2); |
| 98 | + text-decoration: underline; |
| 99 | + } |
92 | 100 |
|
93 | | -@media (max-width: 768px) { |
94 | | - .home-sections { |
95 | | - grid-template-columns: 1fr; |
| 101 | + @media (max-width: 768px) { |
| 102 | + .home-sections { |
| 103 | + grid-template-columns: 1fr; |
| 104 | + } |
96 | 105 | } |
97 | | -} |
98 | 106 | </style> |
0 commit comments