valaxy-theme-yun 0.19.13 → 0.20.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/App.vue +30 -4
  2. package/bump.config.ts +7 -0
  3. package/client/constants/index.ts +13 -0
  4. package/components/ValaxyMain.vue +48 -52
  5. package/components/YunAdBoard.vue +4 -0
  6. package/components/YunAside.vue +66 -43
  7. package/components/YunBackToTop.vue +11 -4
  8. package/components/YunBanner.vue +31 -15
  9. package/components/YunBg.vue +2 -0
  10. package/components/YunCard.vue +5 -1
  11. package/components/YunCategories.vue +14 -34
  12. package/components/YunCategory.vue +42 -11
  13. package/components/YunClassifyPopover.vue +59 -0
  14. package/components/YunCloud.vue +5 -10
  15. package/components/YunConfig.vue +2 -19
  16. package/components/YunDebug.vue +47 -0
  17. package/components/YunDock.vue +223 -0
  18. package/components/YunFooter.vue +56 -4
  19. package/components/YunFullscreenMenu.vue +57 -0
  20. package/components/YunGirlItem.vue +98 -0
  21. package/components/YunGirls.vue +2 -73
  22. package/components/YunGoDown.vue +8 -15
  23. package/components/YunLinkItem.vue +62 -0
  24. package/components/YunLinks.vue +15 -47
  25. package/components/YunNavMenu.vue +125 -0
  26. package/components/YunOutline.vue +1 -2
  27. package/components/YunOverlay.vue +31 -0
  28. package/components/YunOverview.vue +2 -74
  29. package/components/YunPageHeader.vue +1 -1
  30. package/components/YunPagination.vue +105 -0
  31. package/components/YunPostCard.vue +32 -3
  32. package/components/YunPostCategories.vue +3 -3
  33. package/components/YunPostCollapse.vue +7 -72
  34. package/components/YunPostCollapseItem.vue +137 -0
  35. package/components/YunPostDateMeta.vue +30 -0
  36. package/components/YunPostList.vue +6 -11
  37. package/components/YunPostMeta.vue +31 -39
  38. package/components/YunPostTags.vue +2 -2
  39. package/components/YunPostsInfo.vue +41 -0
  40. package/components/YunPrologue.vue +24 -0
  41. package/components/YunSearchBtn.vue +8 -6
  42. package/components/YunSelect.vue +1 -11
  43. package/components/YunSidebar.vue +7 -4
  44. package/components/YunSidebarCard.vue +10 -0
  45. package/components/YunSidebarNav.vue +0 -1
  46. package/components/YunSiteInfo.vue +72 -0
  47. package/components/YunSponsor.vue +21 -6
  48. package/components/animation/LineBurstEffects.vue +75 -0
  49. package/components/author/YunAuthorAvatar.vue +12 -0
  50. package/components/author/YunAuthorIntro.vue +11 -0
  51. package/components/author/YunAuthorName.vue +14 -0
  52. package/components/config/YunToggleDark.vue +37 -0
  53. package/components/layout/YunLayoutLeft.vue +12 -0
  54. package/components/layout/YunLayoutRight.vue +21 -0
  55. package/components/layout/YunLayoutWrapper.vue +17 -0
  56. package/components/menu/YunNavMenuItem.vue +22 -0
  57. package/components/menu/YunNavMenuTitle.vue +86 -0
  58. package/components/menu/YunPostClassifyNavItem.vue +30 -0
  59. package/components/page/YunPageHeaderGradient.vue +38 -0
  60. package/components/project/YunProjectCard.vue +94 -0
  61. package/components/project/YunProjectCollection.vue +15 -0
  62. package/components/project/YunProjectLinkItem.vue +60 -0
  63. package/components/project/YunProjectToggleButton.vue +16 -0
  64. package/components/project/YunProjects.vue +48 -0
  65. package/components/prologue/PrologueSocialIcon.vue +58 -0
  66. package/components/prologue/PrologueSocialLinks.vue +16 -0
  67. package/components/prologue/PrologueSquare.vue +144 -0
  68. package/components/prologue/YunAEFrame.vue +155 -0
  69. package/components/prologue/YunAERect.vue +127 -0
  70. package/components/site/YunFullscreenMenuItem.vue +26 -0
  71. package/components/site/YunFullscreenMenuList.vue +19 -0
  72. package/components/site/YunSiteLinkItem.vue +26 -0
  73. package/components/site/YunSiteLinks.vue +19 -0
  74. package/components/site/YunSiteTitle.vue +59 -0
  75. package/components/third/YunWalineMeta.vue +17 -5
  76. package/docs/zh-CN/config.md +0 -3
  77. package/layouts/archives.vue +33 -21
  78. package/layouts/categories.vue +43 -31
  79. package/layouts/default.vue +10 -5
  80. package/layouts/empty.vue +3 -0
  81. package/layouts/home.vue +12 -5
  82. package/layouts/post.vue +23 -20
  83. package/layouts/posts.vue +10 -0
  84. package/layouts/projects.vue +25 -0
  85. package/layouts/tags.vue +45 -41
  86. package/node/config.ts +2 -5
  87. package/package.json +15 -7
  88. package/pages/page/[page].vue +3 -6
  89. package/pages/posts/index.vue +11 -0
  90. package/setup/main.ts +51 -9
  91. package/stores/app.ts +25 -3
  92. package/styles/animations/index.scss +36 -0
  93. package/styles/common/markdown.scss +4 -0
  94. package/styles/css-vars.scss +19 -1
  95. package/styles/global.scss +8 -0
  96. package/styles/index.scss +1 -0
  97. package/styles/layout/index.scss +3 -0
  98. package/styles/modules/prologue.scss +1 -0
  99. package/styles/primevue/index.ts +7 -0
  100. package/styles/primevue/tooltip.scss +55 -0
  101. package/styles/primevue/tooltip.ts +14 -0
  102. package/styles/vars.scss +23 -2
  103. package/styles/widgets/banner.scss +26 -6
  104. package/types/index.d.ts +53 -5
  105. package/types/projects.ts +48 -0
  106. package/unocss.config.ts +1 -1
  107. package/utils/animation.ts +33 -0
  108. package/utils/index.ts +2 -0
  109. package/LICENSE +0 -21
@@ -0,0 +1,16 @@
1
+ <script setup lang="ts">
2
+ defineProps<{
3
+ active?: boolean
4
+ }>()
5
+ </script>
6
+
7
+ <template>
8
+ <button
9
+ class="bg-white-90 m-2 inline-flex items-center justify-center rounded px-2 gap-2 h-8"
10
+ :class="{
11
+ 'bg-blue-500 text-white': active,
12
+ }"
13
+ >
14
+ <slot />
15
+ </button>
16
+ </template>
@@ -0,0 +1,48 @@
1
+ <script lang="ts" setup>
2
+ import { useFrontmatter } from 'valaxy'
3
+ import { reactive, ref } from 'vue'
4
+ import { useI18n } from 'vue-i18n'
5
+ import type { ProjectDataType } from '../../types'
6
+
7
+ const fm = useFrontmatter()
8
+ const { t } = useI18n()
9
+ const projects = reactive(fm.value.projects as ProjectDataType)
10
+
11
+ const curCategory = ref('all')
12
+ </script>
13
+
14
+ <template>
15
+ <div flex="~ col center">
16
+ <h2 class="mb-3 text-2xl">
17
+ {{ fm.title || t('title.projects') }}
18
+ </h2>
19
+
20
+ <div flex="~ wrap" justify="center">
21
+ <YunProjectToggleButton
22
+ :active="curCategory === 'all'"
23
+ @click="curCategory = 'all'"
24
+ >
25
+ 全部
26
+ </YunProjectToggleButton>
27
+ <YunProjectToggleButton
28
+ v-for="(category, key) in projects"
29
+ :key="key"
30
+ :active="key === curCategory"
31
+ @click="curCategory = key as string"
32
+ >
33
+ <span class="inline-flex">{{ category.emoji }}</span>
34
+ <span class="inline-flex">{{ category.title }}</span>
35
+ </YunProjectToggleButton>
36
+ </div>
37
+
38
+ <div flex="~ wrap" justify="center">
39
+ <template v-for="(category, key) in projects" :key="key">
40
+ <YunProjectCollection
41
+ v-if="curCategory === 'all' || curCategory === key"
42
+ :title="category.title"
43
+ :projects="projects[key].collection"
44
+ />
45
+ </template>
46
+ </div>
47
+ </div>
48
+ </template>
@@ -0,0 +1,58 @@
1
+ <script setup lang="ts">
2
+ import { useMotion } from '@vueuse/motion'
3
+ import { ref } from 'vue'
4
+
5
+ const props = defineProps<{
6
+ social: {
7
+ name: string
8
+ link: string
9
+ icon: string
10
+ color: string
11
+ }
12
+ // animation
13
+ delay: number
14
+ }>()
15
+
16
+ const iconRef = ref<HTMLElement>()
17
+ useMotion(iconRef, {
18
+ initial: {
19
+ scale: 0.8,
20
+ x: 0,
21
+ y: 20,
22
+ opacity: 0,
23
+ },
24
+ enter: {
25
+ scale: 1,
26
+ x: 0,
27
+ y: 0,
28
+ opacity: 1,
29
+ transition: {
30
+ type: 'spring',
31
+ duration: 20000,
32
+ damping: 8,
33
+ delay: props.delay,
34
+ },
35
+ },
36
+ })
37
+ </script>
38
+
39
+ <template>
40
+ <div
41
+ v-tooltip="social.name"
42
+ class="size-10 inline-flex-center"
43
+ >
44
+ <a
45
+ ref="iconRef"
46
+ class="prologue-social-icon inline-flex-center w-full h-full text-white bg-$c-brand hover:bg-white hover:text-$c-brand"
47
+ rel="noopener"
48
+ :href="social.link" :title="social.name"
49
+ target="_blank"
50
+ :style="`--c-brand:${social.color}`"
51
+ >
52
+ <div
53
+ class="size-6"
54
+ :class="social.icon"
55
+ />
56
+ </a>
57
+ </div>
58
+ </template>
@@ -0,0 +1,16 @@
1
+ <script lang="ts" setup>
2
+ import { useSiteConfig } from 'valaxy'
3
+
4
+ const siteConfig = useSiteConfig()
5
+ </script>
6
+
7
+ <template>
8
+ <div flex="~ wrap" class="justify-center items-center mx-5">
9
+ <PrologueSocialIcon
10
+ v-for="item, i in siteConfig.social"
11
+ :key="i"
12
+ :social="item"
13
+ :delay="i * 50 + 1000"
14
+ />
15
+ </div>
16
+ </template>
@@ -0,0 +1,144 @@
1
+ <script setup lang="ts">
2
+ import { useMotion } from '@vueuse/motion'
3
+ import { ref } from 'vue'
4
+ import { useSiteConfig } from 'valaxy'
5
+ import { cubicBezier } from '../../client/constants'
6
+ import { useThemeConfig } from '../../composables'
7
+
8
+ const siteConfig = useSiteConfig()
9
+ const themeConfig = useThemeConfig()
10
+
11
+ const showContent = ref(false)
12
+ const avatarRef = ref<HTMLElement>()
13
+ const motionInstance = useMotion(avatarRef, {
14
+ initial: {
15
+ borderRadius: '0%',
16
+ width: 'var(--total-char-height)',
17
+ height: 'var(--total-char-height)',
18
+ rotate: 135,
19
+ y: '0%',
20
+ },
21
+ enter: {
22
+ borderRadius: '50%',
23
+ rotate: 0,
24
+ y: '0%',
25
+ width: '120px',
26
+ height: '120px',
27
+ boxShadow: 'none',
28
+ transition: {
29
+ type: 'keyframes',
30
+ ease: cubicBezier.easeIn,
31
+ duration: 800,
32
+ onComplete: () => {
33
+ motionInstance.variant.value = 'leave'
34
+ showContent.value = true
35
+ },
36
+ },
37
+ },
38
+ leave: {
39
+ // y: '-50%',
40
+ boxShadow: '0 5px 100px rgba(0, 0, 0, 0.15)',
41
+ transition: {
42
+ type: 'keyframes',
43
+ ease: cubicBezier.easeInOut,
44
+ duration: 500,
45
+ },
46
+ },
47
+ })
48
+
49
+ const introRef = ref<HTMLElement>()
50
+ useMotion(introRef, {
51
+ initial: {
52
+ y: '0%',
53
+ },
54
+ enter: {
55
+ y: 'calc(-50%)',
56
+ transition: {
57
+ delay: 800,
58
+ type: 'keyframes',
59
+ ease: cubicBezier.easeInOut,
60
+ duration: 400,
61
+ },
62
+ },
63
+ })
64
+ </script>
65
+
66
+ <template>
67
+ <div
68
+ flex="~ col"
69
+ class="yun-square-container items-center justify-center text-center"
70
+ :class="{
71
+ 'size-$total-char-height': !showContent,
72
+ }"
73
+ >
74
+ <slot />
75
+
76
+ <div
77
+ ref="introRef"
78
+ flex="~ col center"
79
+ class="info relative"
80
+ >
81
+ <div
82
+ ref="avatarRef" flex="~ col" class="absolute yun-square bg-$va-c-text square-rotate w-full"
83
+ >
84
+ <LineBurstEffects
85
+ class="absolute top-0 left-0 right-0 bottom-0 size-full scale-200"
86
+ :duration="800"
87
+ />
88
+ <YunAuthorAvatar />
89
+ </div>
90
+
91
+ <div
92
+ v-if="showContent"
93
+ v-motion
94
+ :initial="{
95
+ opacity: 0,
96
+ y: '0',
97
+ }"
98
+ :enter="{
99
+ opacity: 1,
100
+ y: 'calc(50% + 60px)',
101
+ transition: {
102
+ type: 'keyframes',
103
+ ease: cubicBezier.easeInOut,
104
+ duration: 400,
105
+ },
106
+ }"
107
+ >
108
+ <YunAuthorName class="mt-3" />
109
+ <YunAuthorIntro />
110
+ <YunSiteTitle />
111
+ <h4 v-if="siteConfig.subtitle" class="site-subtitle block text-$va-c-text op-80" text="sm">
112
+ {{ siteConfig.subtitle }}
113
+ </h4>
114
+ <div v-if="siteConfig.description" class="site-description my-1">
115
+ {{ siteConfig.description }}
116
+ </div>
117
+
118
+ <div
119
+ class="mt-4 flex-center w-50 md:w-100 m-auto gap-2"
120
+ flex="~ wrap"
121
+ p="x-$rect-margin"
122
+ >
123
+ <YunSiteLinkItem
124
+ :page="{
125
+ name: '博客文章',
126
+ icon: 'i-ri-article-line',
127
+ url: '/posts/',
128
+ }"
129
+ />
130
+ <slot />
131
+ <YunSiteLinkItem
132
+ v-for="item, i in themeConfig.pages"
133
+ :key="i" :page="item"
134
+ />
135
+ </div>
136
+ </div>
137
+ </div>
138
+ </div>
139
+ </template>
140
+
141
+ <style lang="scss">
142
+ @use 'sass:map';
143
+ @use 'valaxy-theme-yun/styles/vars.scss' as *;
144
+ </style>
@@ -0,0 +1,155 @@
1
+ <script setup lang="ts">
2
+ import type { PopmotionTransitionProps } from '@vueuse/motion'
3
+ import { useMotion } from '@vueuse/motion'
4
+ import { useAppStore } from 'valaxy'
5
+ import { computed, ref } from 'vue'
6
+
7
+ const tlRef = ref<HTMLElement>()
8
+ const trRef = ref<HTMLElement>()
9
+ const blRef = ref<HTMLElement>()
10
+ const brRef = ref<HTMLElement>()
11
+
12
+ const app = useAppStore()
13
+ const cornerSize = computed(() => {
14
+ return app.isMobile ? 40 : 50
15
+ })
16
+ const cornerMargin = computed(() => {
17
+ return app.isMobile ? 10 : 30
18
+ })
19
+ const cornerBorderSize = computed(() => {
20
+ return app.isMobile ? 3 : 5
21
+ })
22
+
23
+ const cornerTransitionProps: PopmotionTransitionProps = {
24
+ type: 'spring',
25
+ duration: 600,
26
+ }
27
+
28
+ useMotion(tlRef, {
29
+ initial: {
30
+ x: -cornerMargin.value,
31
+ y: -cornerMargin.value,
32
+ },
33
+ enter: {
34
+ x: 0,
35
+ y: 0,
36
+ transition: cornerTransitionProps,
37
+ },
38
+ })
39
+
40
+ useMotion(trRef, {
41
+ initial: {
42
+ x: cornerMargin.value,
43
+ y: -cornerMargin.value,
44
+ },
45
+ enter: {
46
+ x: 0,
47
+ y: 0,
48
+ transition: cornerTransitionProps,
49
+ },
50
+ })
51
+
52
+ useMotion(blRef, {
53
+ initial: {
54
+ x: -cornerMargin.value,
55
+ y: cornerMargin.value,
56
+ },
57
+ enter: {
58
+ x: 0,
59
+ y: 0,
60
+ transition: cornerTransitionProps,
61
+ },
62
+ })
63
+
64
+ useMotion(brRef, {
65
+ initial: {
66
+ x: cornerMargin.value,
67
+ y: cornerMargin.value,
68
+ },
69
+ enter: {
70
+ x: 0,
71
+ y: 0,
72
+ transition: cornerTransitionProps,
73
+ },
74
+ })
75
+
76
+ const cssVarStyles = computed(() => {
77
+ return {
78
+ '--corner-size': `${cornerSize.value}px`,
79
+ '--corner-margin': `${cornerMargin.value}px`,
80
+ '--corner-border-size': `${cornerBorderSize.value}px`,
81
+ }
82
+ })
83
+ </script>
84
+
85
+ <template>
86
+ <div
87
+ class="ae-frame" :style="cssVarStyles"
88
+ >
89
+ <div ref="tlRef" class="absolute" />
90
+ <div ref="trRef" class="absolute" />
91
+ <div ref="blRef" class="absolute" />
92
+ <div ref="brRef" class="absolute" />
93
+ </div>
94
+ </template>
95
+
96
+ <style lang="scss">
97
+ .ae-frame {
98
+ div {
99
+ width: var(--corner-size);
100
+ height: var(--corner-size);
101
+
102
+ &::before, &::after {
103
+ content: '';
104
+ display: block;
105
+ position: absolute;
106
+ background-color: var(--va-c-text);
107
+ }
108
+
109
+ &::before {
110
+ width: 100%;
111
+ height: var(--corner-border-size);
112
+ }
113
+
114
+ &::after {
115
+ width: var(--corner-border-size);
116
+ height: 100%;
117
+ }
118
+
119
+ &:nth-child(1) {
120
+ top: var(--corner-margin);
121
+ left: var(--corner-margin);
122
+ }
123
+
124
+ &:nth-child(2) {
125
+ top: var(--corner-margin);
126
+ right: var(--corner-margin);
127
+
128
+ &::after {
129
+ top: 0;
130
+ right: 0;
131
+ }
132
+ }
133
+
134
+ &:nth-child(3) {
135
+ bottom: var(--corner-margin);
136
+ left: var(--corner-margin);
137
+
138
+ &::before {
139
+ bottom: 0;
140
+ left: 0;
141
+ }
142
+ }
143
+
144
+ &:nth-child(4) {
145
+ bottom: var(--corner-margin);
146
+ right: var(--corner-margin);
147
+
148
+ &::before, &::after {
149
+ bottom: 0;
150
+ right: 0;
151
+ }
152
+ }
153
+ }
154
+ }
155
+ </style>
@@ -0,0 +1,127 @@
1
+ <script setup lang="ts">
2
+ import type { PopmotionTransitionProps } from '@vueuse/motion'
3
+ import { useMotion } from '@vueuse/motion'
4
+ import { ref } from 'vue'
5
+ import { cubicBezier } from '../../client/constants'
6
+
7
+ const rectRef = ref<HTMLElement>()
8
+
9
+ const tRef = ref<HTMLElement>()
10
+ const lRef = ref<HTMLElement>()
11
+ const bRef = ref<HTMLElement>()
12
+ const rRef = ref<HTMLElement>()
13
+
14
+ const transitionOptions: PopmotionTransitionProps = {
15
+ type: 'tween',
16
+ duration: 600,
17
+ ease: cubicBezier.easeIn,
18
+ }
19
+
20
+ useMotion(rectRef, {
21
+ initial: {
22
+ backgroundColor: 'rgba(255, 255, 255, 0)',
23
+ },
24
+ enter: {
25
+ backgroundColor: 'rgba(255, 255, 255, 0.05)',
26
+ transition: {
27
+ type: 'keyframes',
28
+ duration: 1000,
29
+ ease: cubicBezier.easeIn,
30
+ },
31
+ },
32
+ })
33
+
34
+ useMotion(tRef, {
35
+ initial: {
36
+ x: '-100%',
37
+ },
38
+ enter: {
39
+ x: '0%',
40
+ transition: transitionOptions,
41
+ },
42
+ })
43
+
44
+ useMotion(lRef, {
45
+ initial: {
46
+ y: '-100%',
47
+ },
48
+ enter: {
49
+ y: '0%',
50
+ transition: transitionOptions,
51
+ },
52
+ })
53
+
54
+ useMotion(bRef, {
55
+ initial: {
56
+ x: '100%',
57
+ },
58
+ enter: {
59
+ x: '0%',
60
+ transition: transitionOptions,
61
+ },
62
+ })
63
+
64
+ useMotion(rRef, {
65
+ initial: {
66
+ y: '100%',
67
+ },
68
+ enter: {
69
+ y: '0%',
70
+ transition: transitionOptions,
71
+ },
72
+ })
73
+ </script>
74
+
75
+ <template>
76
+ <div ref="rectRef" class="absolute ae-rect">
77
+ <div ref="tRef" />
78
+ <div ref="lRef" />
79
+ <div ref="bRef" />
80
+ <div ref="rRef" />
81
+ </div>
82
+ </template>
83
+
84
+ <style lang="scss">
85
+ .ae-rect {
86
+ top: var(--rect-margin);
87
+ left: var(--rect-margin);
88
+ width: calc(100% - var(--rect-margin) * 2);
89
+ height: calc(100% - var(--rect-margin) * 2);
90
+ overflow: hidden;
91
+
92
+ div {
93
+ position: absolute;
94
+ overflow: hidden;
95
+
96
+ &::after {
97
+ content: '';
98
+ position: absolute;
99
+ width: 100%;
100
+ height: 100%;
101
+ background-color: var(--va-c-text);
102
+ }
103
+
104
+ &:nth-child(1),
105
+ &:nth-child(3) {
106
+ left: 0;
107
+ width: 100%;
108
+ height: 1px;
109
+ }
110
+
111
+ &:nth-child(2),
112
+ &:nth-child(4) {
113
+ top: 0;
114
+ width: 1px;
115
+ height: 100%;
116
+ }
117
+
118
+ &:nth-child(3) {
119
+ bottom: 0;
120
+ }
121
+
122
+ &:nth-child(4) {
123
+ right: 0;
124
+ }
125
+ }
126
+ }
127
+ </style>
@@ -0,0 +1,26 @@
1
+ <script setup lang="ts">
2
+ import { useYunAppStore } from '../../stores'
3
+ import type { PageProps } from '../../types'
4
+
5
+ defineProps<{
6
+ page: PageProps
7
+ }>()
8
+
9
+ const yunApp = useYunAppStore()
10
+ </script>
11
+
12
+ <template>
13
+ <AppLink
14
+ class="link-item w-full items-center justify-center md:justify-start gap-2 transition rounded text-2xl p-4 sm:(text-3xl p-6) lg:(text-4xl p-7)"
15
+ inline-flex
16
+ :to="page.url" :title="page.name"
17
+ :style="`color:${page.color}`"
18
+ hover="bg-gray-100/50 dark:bg-gray-800/50"
19
+ @click="yunApp.fullscreenMenu.isOpen = false"
20
+ >
21
+ <div :class="page.icon" class="icon" />
22
+ <span>
23
+ {{ page.name }}
24
+ </span>
25
+ </AppLink>
26
+ </template>
@@ -0,0 +1,19 @@
1
+ <script lang="ts" setup>
2
+ import { useThemeConfig } from '../../composables'
3
+
4
+ const themeConfig = useThemeConfig()
5
+ </script>
6
+
7
+ <template>
8
+ <div
9
+ class="links flex-center"
10
+ flex="~ col" text="left"
11
+ p="x-$rect-margin"
12
+ >
13
+ <slot />
14
+ <YunFullscreenMenuItem
15
+ v-for="item, i in themeConfig.pages"
16
+ :key="i" :page="item"
17
+ />
18
+ </div>
19
+ </template>
@@ -0,0 +1,26 @@
1
+ <script setup lang="ts">
2
+ import { useYunAppStore } from '../../stores'
3
+ import type { PageProps } from '../../types'
4
+
5
+ defineProps<{
6
+ page: PageProps
7
+ }>()
8
+
9
+ const yunApp = useYunAppStore()
10
+ </script>
11
+
12
+ <template>
13
+ <AppLink
14
+ class="link-item inline-flex-center gap-2 transition rounded text-base p-1 md:(text-xl p-3) text-$va-c-text"
15
+ inline-flex
16
+ :to="page.url" :title="page.name"
17
+ :style="`color:${page.color}`"
18
+ hover="bg-gray-100/50 dark:bg-gray-800/50"
19
+ @click="yunApp.fullscreenMenu.isOpen = false"
20
+ >
21
+ <div :class="page.icon" class="icon" />
22
+ <span>
23
+ {{ page.name }}
24
+ </span>
25
+ </AppLink>
26
+ </template>
@@ -0,0 +1,19 @@
1
+ <script lang="ts" setup>
2
+ import { useThemeConfig } from '../../composables'
3
+
4
+ const themeConfig = useThemeConfig()
5
+ </script>
6
+
7
+ <template>
8
+ <div
9
+ class="links flex-center"
10
+ flex="~ col" text="left"
11
+ p="x-$rect-margin"
12
+ >
13
+ <slot />
14
+ <YunSiteLinkItem
15
+ v-for="item, i in themeConfig.pages"
16
+ :key="i" :page="item"
17
+ />
18
+ </div>
19
+ </template>