valaxy-theme-yun 0.14.36 → 0.14.37
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/YunAside.vue +6 -2
- package/components/YunCard.vue +1 -15
- package/components/YunComment.vue +1 -1
- package/components/YunOverview.vue +5 -12
- package/components/YunSidebar.vue +59 -16
- package/components/YunSidebarLinks.vue +7 -21
- package/layouts/home.vue +5 -6
- package/layouts/layout.vue +4 -8
- package/package.json +3 -3
package/components/YunAside.vue
CHANGED
@@ -19,8 +19,12 @@ const app = useAppStore()
|
|
19
19
|
<ValaxyOverlay :show="app.isRightSidebarOpen" @click="app.toggleRightSidebar()" />
|
20
20
|
|
21
21
|
<!-- -->
|
22
|
-
<aside
|
23
|
-
|
22
|
+
<aside
|
23
|
+
class="va-card yun-aside"
|
24
|
+
:class="app.isRightSidebarOpen && 'open'" m="l-4" text="center"
|
25
|
+
overflow="auto"
|
26
|
+
>
|
27
|
+
<div class="aside-container" flex="~ col">
|
24
28
|
<h2 v-if="frontmatter.toc !== false" m="t-6 b-2" font="serif black">
|
25
29
|
{{ t('sidebar.toc') }}
|
26
30
|
</h2>
|
package/components/YunCard.vue
CHANGED
@@ -3,7 +3,7 @@ defineProps<{ cover?: string }>()
|
|
3
3
|
</script>
|
4
4
|
|
5
5
|
<template>
|
6
|
-
<div class="yun-card">
|
6
|
+
<div class="yun-card flex-center" flex="col" min-h="100px" bg="$va-c-bg-light">
|
7
7
|
<img
|
8
8
|
v-if="cover"
|
9
9
|
width="640" height="360"
|
@@ -21,17 +21,3 @@ defineProps<{ cover?: string }>()
|
|
21
21
|
</div>
|
22
22
|
</div>
|
23
23
|
</template>
|
24
|
-
|
25
|
-
<style lang="scss">
|
26
|
-
.yun-card {
|
27
|
-
display: flex;
|
28
|
-
justify-content: center;
|
29
|
-
align-items: center;
|
30
|
-
flex-direction: column;
|
31
|
-
|
32
|
-
min-height: 100px;
|
33
|
-
|
34
|
-
// todo
|
35
|
-
background-color: var(--va-c-bg-light);
|
36
|
-
}
|
37
|
-
</style>
|
@@ -16,7 +16,7 @@ const YunTwikoo = runtimeConfig.value.addons['valaxy-addon-twikoo']
|
|
16
16
|
</script>
|
17
17
|
|
18
18
|
<template>
|
19
|
-
<YunCard w="full" p="4" class="comment sm:p-6 lg:px-12 xl:px-16">
|
19
|
+
<YunCard w="full" p="4" class="comment markdown-body sm:p-6 lg:px-12 xl:px-16">
|
20
20
|
<ClientOnly>
|
21
21
|
<YunWaline />
|
22
22
|
<YunTwikoo />
|
@@ -7,13 +7,16 @@ const router = useRouter()
|
|
7
7
|
</script>
|
8
8
|
|
9
9
|
<template>
|
10
|
-
<div class="sidebar-panel">
|
10
|
+
<div class="sidebar-panel" p="2">
|
11
11
|
<div class="site-info" m="t-6">
|
12
12
|
<router-link class="site-author-avatar" to="/about">
|
13
13
|
<img class="rounded-full" :src="siteConfig.author.avatar" alt="avatar">
|
14
14
|
<span class="site-author-status">{{ siteConfig.author.status.emoji }}</span>
|
15
15
|
</router-link>
|
16
|
-
<div
|
16
|
+
<div
|
17
|
+
class="site-author-name leading-6"
|
18
|
+
m="t-0 b-4"
|
19
|
+
>
|
17
20
|
<router-link to="/about">
|
18
21
|
{{ siteConfig.author.name }}
|
19
22
|
</router-link>
|
@@ -44,10 +47,6 @@ const router = useRouter()
|
|
44
47
|
<style lang="scss">
|
45
48
|
@use "valaxy/client/styles/mixins/index.scss" as *;
|
46
49
|
|
47
|
-
.sidebar-panel {
|
48
|
-
padding: 0.5rem;
|
49
|
-
}
|
50
|
-
|
51
50
|
.site-info {
|
52
51
|
&.fix-top {
|
53
52
|
margin-top: -1.5rem;
|
@@ -75,12 +74,6 @@ const router = useRouter()
|
|
75
74
|
}
|
76
75
|
}
|
77
76
|
|
78
|
-
.site-author-name {
|
79
|
-
margin-top: 0;
|
80
|
-
margin-bottom: 1rem;
|
81
|
-
line-height: 1.5;
|
82
|
-
}
|
83
|
-
|
84
77
|
.site-author-status {
|
85
78
|
position: absolute;
|
86
79
|
height: 1.8rem;
|
@@ -1,29 +1,72 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
2
|
import { ref } from 'vue'
|
3
|
+
import { useAppStore, useLayout } from 'valaxy'
|
3
4
|
|
5
|
+
const app = useAppStore()
|
4
6
|
const showOverview = ref(false)
|
7
|
+
const isHome = useLayout('home')
|
5
8
|
</script>
|
6
9
|
|
7
10
|
<template>
|
8
|
-
<
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
<
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
<
|
23
|
-
|
11
|
+
<ValaxyOverlay class="md:hidden" :show="app.isSidebarOpen" @click="app.toggleSidebar()" />
|
12
|
+
|
13
|
+
<ValaxyHamburger
|
14
|
+
:active="app.isSidebarOpen"
|
15
|
+
class="menu-btn sidebar-toggle yun-icon-btn leading-4 fixed left-0.8rem top-0.6rem"
|
16
|
+
inline-flex cursor="pointer" z="$yun-z-menu-btn"
|
17
|
+
:class="isHome ? '' : 'md:hidden'" @click="app.toggleSidebar()"
|
18
|
+
/>
|
19
|
+
|
20
|
+
<aside
|
21
|
+
class="va-card transition sidebar fixed inset-y-0 left-0 overflow-y-auto"
|
22
|
+
:class="[app.isSidebarOpen && 'open', !isHome && 'md:translate-x-0']"
|
23
|
+
text="center" bg="$yun-sidebar-bg-color contain no-repeat" z="$yun-z-sidebar"
|
24
|
+
>
|
25
|
+
<div v-if="$slots.default" class="sidebar-nav" m="t-6">
|
26
|
+
<button
|
27
|
+
m="x-4" class="sidebar-nav-item yun-icon-btn"
|
28
|
+
:class="showOverview && 'active'" @click="showOverview = true"
|
29
|
+
>
|
30
|
+
<div i-ri-passport-line />
|
31
|
+
</button>
|
32
|
+
<button
|
33
|
+
m="x-4" class="sidebar-nav-item yun-icon-btn"
|
34
|
+
:class="!showOverview && 'active'" @click="showOverview = false"
|
35
|
+
>
|
36
|
+
<div i-ri-list-ordered />
|
37
|
+
</button>
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<div v-if="showOverview || !$slots.default" :class="$slots.default && '-mt-4'">
|
41
|
+
<YunOverview />
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<div v-else>
|
45
|
+
<slot />
|
46
|
+
</div>
|
47
|
+
</aside>
|
24
48
|
</template>
|
25
49
|
|
26
50
|
<style lang="scss">
|
51
|
+
@use "sass:map";
|
52
|
+
|
53
|
+
.sidebar {
|
54
|
+
width: calc(100vw - 64px);
|
55
|
+
max-width: var(--va-sidebar-width);
|
56
|
+
|
57
|
+
background-image: var(--yun-sidebar-bg-img);
|
58
|
+
background-position: bottom 1rem center;
|
59
|
+
|
60
|
+
transform: translateX(-100%);
|
61
|
+
transition: box-shadow var(--va-transition-duration),
|
62
|
+
background-color var(--va-transition-duration), opacity 0.25s,
|
63
|
+
transform var(--va-transition-duration) cubic-bezier(0.19, 1, 0.22, 1) !important;
|
64
|
+
|
65
|
+
&.open {
|
66
|
+
transform: translateX(0);
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
27
70
|
.sidebar-nav {
|
28
71
|
.sidebar-nav-item {
|
29
72
|
color: var(--va-c-primary);
|
@@ -5,27 +5,13 @@ const themeConfig = useThemeConfig()
|
|
5
5
|
</script>
|
6
6
|
|
7
7
|
<template>
|
8
|
-
<div class="links">
|
9
|
-
<AppLink
|
10
|
-
|
8
|
+
<div class="links flex-center">
|
9
|
+
<AppLink
|
10
|
+
v-for="item, i in themeConfig.pages" :key="i"
|
11
|
+
class="link-item yun-icon-btn" inline-flex
|
12
|
+
:to="item.url" :title="item.name" :style="`color:${item.color}`"
|
13
|
+
>
|
14
|
+
<div :class="item.icon" class="icon w-8 h-8" />
|
11
15
|
</AppLink>
|
12
16
|
</div>
|
13
17
|
</template>
|
14
|
-
|
15
|
-
<style lang="scss">
|
16
|
-
.sidebar {
|
17
|
-
.links {
|
18
|
-
display: flex;
|
19
|
-
justify-content: center;
|
20
|
-
}
|
21
|
-
|
22
|
-
.link-item {
|
23
|
-
display: inline-flex;
|
24
|
-
|
25
|
-
.icon {
|
26
|
-
width: 2rem;
|
27
|
-
height: 2rem;
|
28
|
-
}
|
29
|
-
}
|
30
|
-
}
|
31
|
-
</style>
|
package/layouts/home.vue
CHANGED
@@ -13,12 +13,11 @@ const isPage = computed(() => route.path.startsWith('/page'))
|
|
13
13
|
</script>
|
14
14
|
|
15
15
|
<template>
|
16
|
-
<main
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
</ValaxySidebar>
|
16
|
+
<main
|
17
|
+
class="yun-main flex-center"
|
18
|
+
:class="(isHome && !app.isSidebarOpen) && 'pl-0'" flex="~ col" w="full"
|
19
|
+
>
|
20
|
+
<YunSidebar />
|
22
21
|
|
23
22
|
<template v-if="!isPage">
|
24
23
|
<YunBanner v-if="themeConfig.banner.enable" />
|
package/layouts/layout.vue
CHANGED
@@ -3,14 +3,10 @@ import { asAny } from 'valaxy'
|
|
3
3
|
</script>
|
4
4
|
|
5
5
|
<template>
|
6
|
-
<
|
7
|
-
<slot name="sidebar"
|
8
|
-
|
9
|
-
|
10
|
-
</YunSidebar>
|
11
|
-
<YunSidebar v-else />
|
12
|
-
</slot>
|
13
|
-
</ValaxySidebar>
|
6
|
+
<YunSidebar v-if="$slots['sidebar-child']">
|
7
|
+
<slot name="sidebar-child" />
|
8
|
+
</YunSidebar>
|
9
|
+
<YunSidebar v-else />
|
14
10
|
|
15
11
|
<router-view v-slot="{ Component }">
|
16
12
|
<component :is="asAny(Component)">
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "valaxy-theme-yun",
|
3
|
-
"version": "0.14.
|
3
|
+
"version": "0.14.37",
|
4
4
|
"author": {
|
5
5
|
"email": "me@yunyoujun.cn",
|
6
6
|
"name": "YunYouJun",
|
@@ -18,12 +18,12 @@
|
|
18
18
|
"types": "types/index.d.ts",
|
19
19
|
"dependencies": {
|
20
20
|
"@iconify-json/ant-design": "^1.1.5",
|
21
|
-
"@iconify-json/simple-icons": "^1.1.
|
21
|
+
"@iconify-json/simple-icons": "^1.1.59",
|
22
22
|
"animejs": "^3.2.1",
|
23
23
|
"valaxy-addon-waline": "0.1.0"
|
24
24
|
},
|
25
25
|
"devDependencies": {
|
26
26
|
"@types/animejs": "^3.1.7",
|
27
|
-
"valaxy": "0.14.
|
27
|
+
"valaxy": "0.14.37"
|
28
28
|
}
|
29
29
|
}
|