File tree Expand file tree Collapse file tree 2 files changed +69
-0
lines changed
.vitepress/theme/components Expand file tree Collapse file tree 2 files changed +69
-0
lines changed Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
2
import { onMounted } from ' vue'
3
+ import SiteMap from ' ./SiteMap.vue' ;
3
4
// import NewsLetter from './NewsLetter.vue'
4
5
import { load , data , base } from ' ./sponsors'
5
6
import SponsorsGroup from ' ./SponsorsGroup.vue'
@@ -88,6 +89,7 @@ onMounted(async () => {
88
89
<SponsorsGroup tier =" gold" placement =" landing" />
89
90
</section >
90
91
92
+ <SiteMap />
91
93
<!-- <NewsLetter /> -->
92
94
</template >
93
95
Original file line number Diff line number Diff line change
1
+ <script setup lang="ts">
2
+ import { VTLink } from ' @vue/theme'
3
+ import { useData } from ' vitepress'
4
+
5
+ const data = useData ()
6
+ const nav = data .site .value .themeConfig .nav
7
+ const ecosystem = nav .find ((i : any ) => i .text === ' Ecosystem' )
8
+ const items = nav
9
+ .filter ((i : any ) => i !== ecosystem && i .items )
10
+ .concat (ecosystem .items )
11
+ </script >
12
+
13
+ <template >
14
+ <section id =" sitemap" >
15
+ <div class =" container" >
16
+ <div class =" sitemap-col" v-for =" col in items" >
17
+ <h4 >{{ col.text }}</h4 >
18
+ <ul >
19
+ <li v-for =" row in col.items" >
20
+ <VTLink :href =" row.link" >{{ row.text }}</VTLink >
21
+ </li >
22
+ </ul >
23
+ </div >
24
+ </div >
25
+ </section >
26
+ </template >
27
+
28
+ <style >
29
+ #sitemap {
30
+ background : var (--vt-c-bg-soft );
31
+ }
32
+
33
+ #sitemap .container {
34
+ max-width : 900px ;
35
+ margin : 0 auto ;
36
+ columns : 1 ;
37
+ padding : 24px 32px ;
38
+ }
39
+
40
+ @media (min-width : 768px ) {
41
+ #sitemap .container {
42
+ columns : 2 ;
43
+ }
44
+ }
45
+
46
+ @media (min-width : 1024px ) {
47
+ #sitemap .container {
48
+ columns : 3 ;
49
+ }
50
+ }
51
+
52
+ #sitemap h4 {
53
+ font-weight : 500 ;
54
+ color : var (--vt-c-text-1 );
55
+ margin-bottom : 0.25em ;
56
+ }
57
+
58
+ .sitemap-col {
59
+ margin-bottom : 2em ;
60
+ break-inside : avoid ;
61
+ }
62
+
63
+ #sitemap .vt-link {
64
+ font-size : 0.9em ;
65
+ color : var (--vt-c-text-2 );
66
+ }
67
+ </style >
You can’t perform that action at this time.
0 commit comments