valaxy-theme-yun 0.6.0 → 0.6.3
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.
- package/components/ValaxyMain.vue +77 -0
- package/components/YunAlgoliaSearchBox.vue +3 -0
- package/components/YunAside.vue +31 -24
- package/components/YunCard.vue +1 -1
- package/components/YunConfig.vue +6 -1
- package/components/YunToc.vue +11 -30
- package/layouts/404.vue +2 -2
- package/layouts/archives.vue +4 -4
- package/layouts/base.vue +36 -57
- package/layouts/categories.vue +10 -8
- package/layouts/default.vue +2 -2
- package/layouts/post.vue +13 -15
- package/layouts/tags.vue +10 -8
- package/package.json +2 -2
- package/styles/layout/index.scss +1 -0
- package/styles/markdown.scss +3 -0
- package/components/YunBase.vue +0 -32
@@ -0,0 +1,77 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import type { PageData, Post } from 'valaxy'
|
3
|
+
import { useConfig, usePostProperty, usePostTitle } from 'valaxy'
|
4
|
+
import { computed } from 'vue'
|
5
|
+
|
6
|
+
const props = defineProps<{
|
7
|
+
frontmatter: Post
|
8
|
+
data?: PageData
|
9
|
+
}>()
|
10
|
+
const config = useConfig()
|
11
|
+
|
12
|
+
const { styles, icon, color } = usePostProperty(props.frontmatter.type)
|
13
|
+
const title = usePostTitle(computed(() => props.frontmatter))
|
14
|
+
</script>
|
15
|
+
|
16
|
+
<template>
|
17
|
+
<main class="yun-main lt-md:ml-0" flex="~">
|
18
|
+
<div w="full" flex="~">
|
19
|
+
<slot name="main">
|
20
|
+
<div class="content" flex="~ col grow" w="full" p="l-4 lt-md:0">
|
21
|
+
<YunCard :cover="frontmatter.cover" m="0" class="relative" :style="styles">
|
22
|
+
<slot name="main-header">
|
23
|
+
<YunPageHeader :title="title" :icon="frontmatter.icon || icon" :color="frontmatter.color || color" :cover="frontmatter.cover" />
|
24
|
+
</slot>
|
25
|
+
<slot name="main-header-after" />
|
26
|
+
|
27
|
+
<div p="x-4 b-8" class="sm:px-6 lg:px-12 xl:px-16" w="full">
|
28
|
+
<slot name="main-content">
|
29
|
+
<ValaxyMd :frontmatter="frontmatter">
|
30
|
+
<slot name="main-content-md" />
|
31
|
+
<slot />
|
32
|
+
</ValaxyMd>
|
33
|
+
</slot>
|
34
|
+
|
35
|
+
<slot name="main-content-after" />
|
36
|
+
</div>
|
37
|
+
</YunCard>
|
38
|
+
|
39
|
+
<slot name="main-nav-before" />
|
40
|
+
|
41
|
+
<slot name="main-nav">
|
42
|
+
<YunPostNav v-if="frontmatter.nav !== false" />
|
43
|
+
</slot>
|
44
|
+
|
45
|
+
<slot name="main-nav-after" />
|
46
|
+
|
47
|
+
<slot v-if="frontmatter.comment !== false" name="comment">
|
48
|
+
<YunCard w="full" p="4" class="comment sm:p-6 lg:px-12 xl:px-16" :class="frontmatter.nav === false ? 'mt-4' : 0">
|
49
|
+
<YunWaline v-if="config.comment.waline.enable" />
|
50
|
+
<YunTwikoo v-if="config.comment.twikoo.enable" />
|
51
|
+
</YunCard>
|
52
|
+
</slot>
|
53
|
+
|
54
|
+
<ValaxyFooter>
|
55
|
+
<slot name="footer" />
|
56
|
+
</ValaxyFooter>
|
57
|
+
</div>
|
58
|
+
</slot>
|
59
|
+
|
60
|
+
<slot name="aside">
|
61
|
+
<YunAside :frontmatter="frontmatter" :data="data">
|
62
|
+
<slot name="aside-custom" />
|
63
|
+
</YunAside>
|
64
|
+
</slot>
|
65
|
+
</div>
|
66
|
+
</main>
|
67
|
+
</template>
|
68
|
+
|
69
|
+
<style lang="scss">
|
70
|
+
@use '~/styles/mixins' as *;
|
71
|
+
@include xl {
|
72
|
+
.content{
|
73
|
+
// 8px scrollbar width
|
74
|
+
max-width: calc(100vw - 2 * var(--va-sidebar-width-mobile) - 1rem - 8px);
|
75
|
+
}
|
76
|
+
}
|
77
|
+
</style>
|
@@ -142,6 +142,9 @@ function getRelativePath(absoluteUrl: string) {
|
|
142
142
|
.dark .DocSearch {
|
143
143
|
--docsearch-modal-shadow: none;
|
144
144
|
--docsearch-footer-shadow: none;
|
145
|
+
--docsearch-logo-color: var(--va-c-text-2);
|
146
|
+
--docsearch-hit-background: var(--va-c-bg-mute);
|
147
|
+
--docsearch-hit-color: var(--va-c-text-2);
|
145
148
|
--docsearch-hit-shadow: none;
|
146
149
|
}
|
147
150
|
|
package/components/YunAside.vue
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
2
|
import { useI18n } from 'vue-i18n'
|
3
|
-
import type { Post } from 'valaxy'
|
3
|
+
import type { PageData, Post } from 'valaxy'
|
4
4
|
import { useAppStore } from 'valaxy/client/stores/app'
|
5
|
-
defineProps<{ frontmatter: Post }>()
|
6
|
-
const { t } = useI18n()
|
7
5
|
|
6
|
+
defineProps<{ frontmatter: Post; data: PageData }>()
|
7
|
+
const { t } = useI18n()
|
8
8
|
const app = useAppStore()
|
9
9
|
</script>
|
10
10
|
|
@@ -19,17 +19,19 @@ const app = useAppStore()
|
|
19
19
|
|
20
20
|
<ValaxyOverlay :show="app.isRightSidebarOpen" @click="app.toggleRightSidebar()" />
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
<!-- -->
|
23
|
+
<aside class="va-card aside" :class="app.isRightSidebarOpen && 'open'" m="l-4" text="center">
|
24
|
+
<div class="aside-container" flex="~ col">
|
25
|
+
<h2 v-if="frontmatter.toc !== false" m="t-6 b-2" font="serif black">
|
26
|
+
{{ t('sidebar.toc') }}
|
27
|
+
</h2>
|
28
|
+
|
29
|
+
<YunToc v-if="frontmatter.toc !== false" :headers="data.headers || []" />
|
26
30
|
|
27
|
-
|
28
|
-
<!-- <ValaxyToc v-if="frontmatter.toc !== false" /> -->
|
29
|
-
<YunToc v-if="frontmatter.toc !== false" />
|
31
|
+
<div class="flex-grow" />
|
30
32
|
|
31
|
-
<div v-if="$slots.
|
32
|
-
<slot
|
33
|
+
<div v-if="$slots.default" class="custom-container">
|
34
|
+
<slot />
|
33
35
|
</div>
|
34
36
|
</div>
|
35
37
|
</aside>
|
@@ -38,19 +40,13 @@ const app = useAppStore()
|
|
38
40
|
<style lang="scss">
|
39
41
|
@use '~/styles/mixins' as *;
|
40
42
|
|
41
|
-
|
42
|
-
.right-sidebar {
|
43
|
-
transform: translateX(0) !important;
|
44
|
-
}
|
45
|
-
}
|
46
|
-
|
47
|
-
.right-sidebar {
|
48
|
-
width: var(--va-sidebar-width-mobile);
|
49
|
-
|
43
|
+
.aside {
|
50
44
|
position: fixed;
|
45
|
+
right: 0;
|
51
46
|
top: 0;
|
52
47
|
bottom: 0;
|
53
|
-
|
48
|
+
|
49
|
+
min-width: var(--va-sidebar-width-mobile);
|
54
50
|
|
55
51
|
transform: translateX(100%);
|
56
52
|
|
@@ -59,12 +55,23 @@ const app = useAppStore()
|
|
59
55
|
transform var(--va-transition-duration) cubic-bezier(0.19, 1, 0.22, 1);
|
60
56
|
|
61
57
|
&.open {
|
58
|
+
right: 0;
|
59
|
+
display: block;
|
62
60
|
z-index: 10;
|
63
61
|
transform: translateX(0);
|
64
62
|
}
|
63
|
+
|
64
|
+
&-container {
|
65
|
+
position: sticky;
|
66
|
+
top: 0;
|
67
|
+
height: 100vh;
|
68
|
+
}
|
65
69
|
}
|
66
|
-
|
67
|
-
|
70
|
+
|
71
|
+
@include xl {
|
72
|
+
.aside {
|
73
|
+
transform: translateX(0);
|
74
|
+
}
|
68
75
|
}
|
69
76
|
|
70
77
|
.toc-btn {
|
package/components/YunCard.vue
CHANGED
@@ -4,7 +4,7 @@ defineProps<{ cover?: string }>()
|
|
4
4
|
|
5
5
|
<template>
|
6
6
|
<div class="yun-card">
|
7
|
-
<img v-if="cover" class="object-cover" h="64 md:sm" w="full" :src="cover">
|
7
|
+
<img v-if="cover" class="object-cover select-none" h="64 md:sm" w="full" :src="cover">
|
8
8
|
|
9
9
|
<div v-if="$slots.header" class="yun-card-header">
|
10
10
|
<header>
|
package/components/YunConfig.vue
CHANGED
@@ -1,13 +1,18 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
2
|
import { useI18n } from 'vue-i18n'
|
3
|
+
import { computed } from 'vue'
|
3
4
|
import { isDark, toggleDark } from '~/composables'
|
4
5
|
|
5
6
|
const { t } = useI18n()
|
7
|
+
|
8
|
+
const themeTitle = computed(() => {
|
9
|
+
return isDark.value ? t('button.toggle_light') : t('button.toggle_dark')
|
10
|
+
})
|
6
11
|
</script>
|
7
12
|
|
8
13
|
<template>
|
9
14
|
<div>
|
10
|
-
<button class="yun-icon-btn" :title="
|
15
|
+
<button class="yun-icon-btn" :title="themeTitle" :style="{ color: isDark ? '' : '#f1cb64' }" @click="toggleDark()">
|
11
16
|
<div i="ri-sun-line dark:ri-moon-line" />
|
12
17
|
</button>
|
13
18
|
|
package/components/YunToc.vue
CHANGED
@@ -1,21 +1,19 @@
|
|
1
1
|
<script setup lang="ts">
|
2
2
|
import { computed, ref } from 'vue'
|
3
|
-
import { useRoute } from 'vue-router'
|
4
3
|
import { useI18n } from 'vue-i18n'
|
4
|
+
import type { Header } from 'valaxy'
|
5
|
+
import { useThemeConfig } from 'valaxy'
|
5
6
|
import { useFrontmatter } from '~/composables'
|
6
7
|
import {
|
7
8
|
resolveHeaders,
|
8
9
|
useActiveAnchor,
|
9
|
-
useOutline,
|
10
10
|
} from '~/composables/outline'
|
11
|
-
import { useThemeConfig } from '~/config'
|
12
11
|
|
13
|
-
const
|
12
|
+
const props = defineProps<{ headers: Header[] }>()
|
13
|
+
|
14
14
|
const frontmatter = useFrontmatter()
|
15
15
|
const themeConfig = useThemeConfig()
|
16
16
|
|
17
|
-
const { hasOutline } = useOutline()
|
18
|
-
|
19
17
|
const { locale } = useI18n()
|
20
18
|
const container = ref()
|
21
19
|
const marker = ref()
|
@@ -23,7 +21,7 @@ const marker = ref()
|
|
23
21
|
useActiveAnchor(container, marker)
|
24
22
|
|
25
23
|
const resolvedHeaders = computed(() => {
|
26
|
-
return resolveHeaders(
|
24
|
+
return resolveHeaders(props.headers || [])
|
27
25
|
})
|
28
26
|
|
29
27
|
function handleClick({ target: el }: Event) {
|
@@ -34,7 +32,7 @@ function handleClick({ target: el }: Event) {
|
|
34
32
|
</script>
|
35
33
|
|
36
34
|
<template>
|
37
|
-
<div
|
35
|
+
<div v-show="headers.length" ref="container">
|
38
36
|
<div class="content">
|
39
37
|
<div class="outline-title">
|
40
38
|
{{ themeConfig.outlineTitle || 'On this page' }}
|
@@ -47,7 +45,7 @@ function handleClick({ target: el }: Event) {
|
|
47
45
|
Table of Contents for current page
|
48
46
|
</span>
|
49
47
|
|
50
|
-
<ul class="
|
48
|
+
<ul class="va-toc relative z-1">
|
51
49
|
<li
|
52
50
|
v-for="{ text, link, children, hidden, lang } in resolvedHeaders"
|
53
51
|
v-show="!hidden"
|
@@ -59,9 +57,9 @@ function handleClick({ target: el }: Event) {
|
|
59
57
|
{{ text }}
|
60
58
|
</a>
|
61
59
|
<ul v-if="children && frontmatter.outline === 'deep'">
|
62
|
-
<li v-for="
|
63
|
-
<a class="outline-link
|
64
|
-
{{ text }}
|
60
|
+
<li v-for="item in children" v-show="!item.hidden" :key="item.link" :lang="lang || locale">
|
61
|
+
<a class="outline-link" p="l-3" :href="link" @click="handleClick">
|
62
|
+
{{ item.text }}
|
65
63
|
</a>
|
66
64
|
</li>
|
67
65
|
</ul>
|
@@ -81,14 +79,6 @@ function handleClick({ target: el }: Event) {
|
|
81
79
|
}
|
82
80
|
}
|
83
81
|
|
84
|
-
.VPDocAsideOutline {
|
85
|
-
display: none;
|
86
|
-
}
|
87
|
-
|
88
|
-
.VPDocAsideOutline.has-outline {
|
89
|
-
display: block;
|
90
|
-
}
|
91
|
-
|
92
82
|
.content {
|
93
83
|
position: relative;
|
94
84
|
padding-left: 16px;
|
@@ -120,7 +110,7 @@ function handleClick({ target: el }: Event) {
|
|
120
110
|
.outline-link {
|
121
111
|
display: block;
|
122
112
|
line-height: 28px;
|
123
|
-
color: var(--
|
113
|
+
color: var(--va-c-text-2);
|
124
114
|
white-space: nowrap;
|
125
115
|
overflow: hidden;
|
126
116
|
text-overflow: ellipsis;
|
@@ -133,15 +123,6 @@ function handleClick({ target: el }: Event) {
|
|
133
123
|
transition: color 0.25s;
|
134
124
|
}
|
135
125
|
|
136
|
-
.outline-link.nested {
|
137
|
-
padding-left: 13px;
|
138
|
-
}
|
139
|
-
|
140
|
-
.root {
|
141
|
-
position: relative;
|
142
|
-
z-index: 1;
|
143
|
-
}
|
144
|
-
|
145
126
|
.visually-hidden {
|
146
127
|
position: absolute;
|
147
128
|
width: 1px;
|
package/layouts/404.vue
CHANGED
@@ -7,7 +7,7 @@ const { t } = useI18n()
|
|
7
7
|
</script>
|
8
8
|
|
9
9
|
<template>
|
10
|
-
<
|
10
|
+
<Base>
|
11
11
|
<template #content>
|
12
12
|
<div text="center">
|
13
13
|
<div text-4xl>
|
@@ -21,5 +21,5 @@ const { t } = useI18n()
|
|
21
21
|
</div>
|
22
22
|
</div>
|
23
23
|
</template>
|
24
|
-
</
|
24
|
+
</Base>
|
25
25
|
</template>
|
package/layouts/archives.vue
CHANGED
@@ -11,13 +11,13 @@ const title = usePostTitle(frontmatter)
|
|
11
11
|
</script>
|
12
12
|
|
13
13
|
<template>
|
14
|
-
<
|
15
|
-
<template #header>
|
14
|
+
<Base>
|
15
|
+
<template #main-header>
|
16
16
|
<YunPageHeader :title="title || t('menu.archives')" :icon="frontmatter.icon || 'i-ri-archive-line'" :color="frontmatter.color" />
|
17
17
|
</template>
|
18
|
-
<template #content>
|
18
|
+
<template #main-content>
|
19
19
|
<router-view />
|
20
20
|
<YunPostCollapse :posts="postList" />
|
21
21
|
</template>
|
22
|
-
</
|
22
|
+
</Base>
|
23
23
|
</template>
|
package/layouts/base.vue
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
|
-
import { useConfig
|
3
|
-
const frontmatter = useFrontmatter()
|
2
|
+
import { useConfig } from 'valaxy'
|
4
3
|
|
5
4
|
const config = useConfig()
|
6
|
-
|
7
|
-
const { styles, icon, color } = usePostProperty(frontmatter.value.type)
|
8
|
-
const title = usePostTitle(frontmatter)
|
9
5
|
</script>
|
10
6
|
|
11
7
|
<template>
|
8
|
+
<slot name="bg">
|
9
|
+
<ValaxyBg v-if="config.themeConfig.bg_image.enable" />
|
10
|
+
</slot>
|
11
|
+
|
12
12
|
<ValaxySidebar>
|
13
13
|
<slot name="sidebar">
|
14
14
|
<YunSidebar v-if="$slots['sidebar-child']">
|
@@ -18,61 +18,40 @@ const title = usePostTitle(frontmatter)
|
|
18
18
|
</slot>
|
19
19
|
</ValaxySidebar>
|
20
20
|
|
21
|
-
<
|
22
|
-
<
|
23
|
-
<
|
24
|
-
<slot name="header"
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
<
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
</
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
<
|
40
|
-
<
|
41
|
-
</
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
<ValaxyFooter>
|
21
|
+
<router-view v-slot="{ Component }">
|
22
|
+
<component :is="Component">
|
23
|
+
<template #main-header>
|
24
|
+
<slot name="main-header" />
|
25
|
+
</template>
|
26
|
+
|
27
|
+
<template #main-header-after>
|
28
|
+
<slot name="main-header-after" />
|
29
|
+
</template>
|
30
|
+
<template #main>
|
31
|
+
<slot name="main" />
|
32
|
+
</template>
|
33
|
+
<template #main-content>
|
34
|
+
<slot name="main-content" />
|
35
|
+
</template>
|
36
|
+
<template #main-content-after>
|
37
|
+
<slot name="main-content-after" />
|
38
|
+
</template>
|
39
|
+
<template #main-nav-before>
|
40
|
+
<slot name="main-nav-before" />
|
41
|
+
</template>
|
42
|
+
<template #main-nav-after>
|
43
|
+
<slot name="main-nav-after" />
|
44
|
+
</template>
|
45
|
+
<template #aside-custom>
|
46
|
+
<slot name="aside-custom" />
|
47
|
+
</template>
|
48
|
+
<template #footer>
|
51
49
|
<slot name="footer" />
|
52
|
-
</
|
53
|
-
</
|
54
|
-
|
55
|
-
<slot name="right-sidebar">
|
56
|
-
<!-- <ValaxyRightSidebar > -->
|
57
|
-
<YunAside :frontmatter="frontmatter">
|
58
|
-
<template #custom>
|
59
|
-
<slot name="right-custom" />
|
60
|
-
</template>
|
61
|
-
<!-- </ValaxyRightSidebar> -->
|
62
|
-
</YunAside>
|
63
|
-
</slot>
|
64
|
-
</main>
|
50
|
+
</template>
|
51
|
+
</component>
|
52
|
+
</router-view>
|
65
53
|
|
66
54
|
<YunSearch v-if="config.search.enable" />
|
67
55
|
<YunBackToTop />
|
68
56
|
</template>
|
69
57
|
|
70
|
-
<style lang="scss">
|
71
|
-
@use '~/styles/mixins' as *;
|
72
|
-
@include xl {
|
73
|
-
.content{
|
74
|
-
// 8px scrollbar width
|
75
|
-
max-width: calc(100vw - 2 * var(--va-sidebar-width-mobile) - 1rem - 8px);
|
76
|
-
}
|
77
|
-
}
|
78
|
-
</style>
|
package/layouts/categories.vue
CHANGED
@@ -46,15 +46,15 @@ const title = usePostTitle(frontmatter)
|
|
46
46
|
</script>
|
47
47
|
|
48
48
|
<template>
|
49
|
-
<
|
50
|
-
<template #header>
|
49
|
+
<Base>
|
50
|
+
<template #main-header>
|
51
51
|
<YunPageHeader
|
52
52
|
:title="title || t('menu.categories')"
|
53
53
|
:icon="frontmatter.icon || 'i-ri-folder-2-line'"
|
54
54
|
:color="frontmatter.color"
|
55
55
|
/>
|
56
56
|
</template>
|
57
|
-
<template #content>
|
57
|
+
<template #main-content>
|
58
58
|
<div text="center" class="yun-text-light" p="2">
|
59
59
|
{{ t('counter.categories', categories.children!.size) }}
|
60
60
|
</div>
|
@@ -62,9 +62,11 @@ const title = usePostTitle(frontmatter)
|
|
62
62
|
<router-view />
|
63
63
|
</template>
|
64
64
|
|
65
|
-
<
|
66
|
-
<
|
67
|
-
|
68
|
-
|
69
|
-
|
65
|
+
<template #main-nav-before>
|
66
|
+
<YunCard v-if="curCategory" ref="collapse" m="t-4" w="full">
|
67
|
+
<YunPageHeader :title="curCategory === 'Uncategorized' ? t('category.uncategorized') : curCategory" icon="i-ri-folder-open-line" />
|
68
|
+
<YunPostCollapse w="full" m="b-4" p="x-20 lt-sm:x-5" :posts="posts" />
|
69
|
+
</YunCard>
|
70
|
+
</template>
|
71
|
+
</Base>
|
70
72
|
</template>
|
package/layouts/default.vue
CHANGED
package/layouts/post.vue
CHANGED
@@ -15,20 +15,18 @@ const showSponsor = computed(() => {
|
|
15
15
|
</script>
|
16
16
|
|
17
17
|
<template>
|
18
|
-
<
|
19
|
-
<template #
|
20
|
-
<
|
21
|
-
<slot name="header">
|
22
|
-
<YunPostMeta :frontmatter="frontmatter" />
|
23
|
-
</slot>
|
24
|
-
<router-view v-slot="{ Component }">
|
25
|
-
<Transition appear>
|
26
|
-
<component :is="Component" />
|
27
|
-
</Transition>
|
28
|
-
</router-view>
|
29
|
-
<YunSponsor v-if="showSponsor" />
|
30
|
-
<ValaxyCopyright v-if="frontmatter.copyright || config.license.enabled" :url="url" m="y-4" />
|
31
|
-
</main>
|
18
|
+
<Base>
|
19
|
+
<template #main-header-after>
|
20
|
+
<YunPostMeta :frontmatter="frontmatter" />
|
32
21
|
</template>
|
33
|
-
|
22
|
+
|
23
|
+
<template #main-content-after>
|
24
|
+
<YunSponsor v-if="showSponsor" />
|
25
|
+
<ValaxyCopyright v-if="frontmatter.copyright || config.license.enabled" :url="url" m="y-4" />
|
26
|
+
</template>
|
27
|
+
|
28
|
+
<template #aside-custom>
|
29
|
+
<slot name="aside-custom" />
|
30
|
+
</template>
|
31
|
+
</Base>
|
34
32
|
</template>
|
package/layouts/tags.vue
CHANGED
@@ -48,15 +48,15 @@ const title = usePostTitle(frontmatter)
|
|
48
48
|
</script>
|
49
49
|
|
50
50
|
<template>
|
51
|
-
<
|
52
|
-
<template #header>
|
51
|
+
<Base>
|
52
|
+
<template #main-header>
|
53
53
|
<YunPageHeader
|
54
54
|
:title="title || t('menu.tags')"
|
55
55
|
:icon="frontmatter.icon || 'i-ri-tag-line'"
|
56
56
|
:color="frontmatter.color"
|
57
57
|
/>
|
58
58
|
</template>
|
59
|
-
<template #content>
|
59
|
+
<template #main-content>
|
60
60
|
<div class="yun-text-light" text="center" p="2">
|
61
61
|
{{ t('counter.tags', Array.from(tags).length) }}
|
62
62
|
</div>
|
@@ -70,11 +70,13 @@ const title = usePostTitle(frontmatter)
|
|
70
70
|
<router-view />
|
71
71
|
</template>
|
72
72
|
|
73
|
-
<
|
74
|
-
<
|
75
|
-
|
76
|
-
|
77
|
-
|
73
|
+
<template #main-nav-before>
|
74
|
+
<YunCard v-if="curTag" ref="collapse" m="t-4" w="full">
|
75
|
+
<YunPageHeader :title="curTag" icon="i-ri-hashtag" />
|
76
|
+
<YunPostCollapse w="full" m="b-4" p="x-20 lt-sm:x-5" :posts="posts" />
|
77
|
+
</YunCard>
|
78
|
+
</template>
|
79
|
+
</Base>
|
78
80
|
</template>
|
79
81
|
|
80
82
|
<style lang="scss">
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "valaxy-theme-yun",
|
3
|
-
"version": "0.6.
|
3
|
+
"version": "0.6.3",
|
4
4
|
"author": {
|
5
5
|
"email": "me@yunyoujun.cn",
|
6
6
|
"name": "YunYouJun",
|
@@ -18,7 +18,7 @@
|
|
18
18
|
"@iconify-json/simple-icons": "^1.1.16"
|
19
19
|
},
|
20
20
|
"devDependencies": {
|
21
|
-
"valaxy": "0.6.
|
21
|
+
"valaxy": "0.6.3"
|
22
22
|
},
|
23
23
|
"scripts": {
|
24
24
|
"build": "tsup",
|
package/styles/layout/index.scss
CHANGED
package/styles/markdown.scss
CHANGED
package/components/YunBase.vue
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
<script setup lang="ts">
|
2
|
-
// export layouts/base.vue as components
|
3
|
-
import { useThemeConfig } from 'valaxy'
|
4
|
-
import Base from '../layouts/base.vue'
|
5
|
-
|
6
|
-
const themeConfig = useThemeConfig()
|
7
|
-
</script>
|
8
|
-
|
9
|
-
<template>
|
10
|
-
<ValaxyBg v-if="themeConfig.bg_image.enable" />
|
11
|
-
|
12
|
-
<Base>
|
13
|
-
<template #sidebar>
|
14
|
-
<slot name="sidebar" />
|
15
|
-
</template>
|
16
|
-
<template #content>
|
17
|
-
<slot name="content" />
|
18
|
-
</template>
|
19
|
-
<template #nav>
|
20
|
-
<slot name="nav" />
|
21
|
-
</template>
|
22
|
-
<template #comment>
|
23
|
-
<slot name="comment" />
|
24
|
-
</template>
|
25
|
-
<template #footer>
|
26
|
-
<slot name="footer" />
|
27
|
-
</template>
|
28
|
-
<template #right-sidebar>
|
29
|
-
<slot name="right-sidebar" />
|
30
|
-
</template>
|
31
|
-
</Base>
|
32
|
-
</template>
|