valaxy-theme-press 0.19.13 → 0.20.0-beta.5
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/PressAside.vue +6 -5
- package/components/PressOutline.vue +1 -2
- package/package.json +2 -2
- package/stores/app.ts +17 -0
- package/stores/index.ts +1 -0
|
@@ -1,28 +1,29 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import {
|
|
2
|
+
import { useFrontmatter } from 'valaxy'
|
|
3
|
+
import { usePressAppStore } from '../stores/app'
|
|
3
4
|
import PressOutline from './PressOutline.vue'
|
|
4
5
|
|
|
5
6
|
const frontmatter = useFrontmatter()
|
|
6
|
-
const
|
|
7
|
+
const press = usePressAppStore()
|
|
7
8
|
</script>
|
|
8
9
|
|
|
9
10
|
<template>
|
|
10
11
|
<button
|
|
11
12
|
class="toc-btn shadow-lg fixed press-icon-btn z-99 lt-md:hidden! xl:hidden!"
|
|
12
13
|
right="5" bottom="24"
|
|
13
|
-
@click="
|
|
14
|
+
@click="press.rightSidebar.toggle()"
|
|
14
15
|
>
|
|
15
16
|
<div i-ri-file-list-line />
|
|
16
17
|
</button>
|
|
17
18
|
|
|
18
|
-
<ValaxyOverlay :show="
|
|
19
|
+
<ValaxyOverlay :show="press.rightSidebar.isOpen" @click="press.rightSidebar.toggle()" />
|
|
19
20
|
|
|
20
21
|
<aside
|
|
21
22
|
class="press-aside lt-xl:fixed shadow xl:(shadow-none hover:shadow-none) hover:shadow-lg"
|
|
22
23
|
flex="~ col grow"
|
|
23
24
|
p="l-0 xl:l-8" text="center"
|
|
24
25
|
z="$"
|
|
25
|
-
:class="
|
|
26
|
+
:class="press.rightSidebar.isOpen && 'open'"
|
|
26
27
|
>
|
|
27
28
|
<div class="aside-curtain" />
|
|
28
29
|
<div class="aside-container lt-xl:fixed" flex="~ col">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "valaxy-theme-press",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0-beta.5",
|
|
4
4
|
"description": "Docs Theme for Valaxy",
|
|
5
5
|
"author": {
|
|
6
6
|
"email": "me@yunyoujun.cn",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
"@docsearch/js": "^3.6.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"valaxy": "0.
|
|
29
|
+
"valaxy": "0.20.0-beta.5"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/stores/app.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { acceptHMRUpdate, defineStore } from 'pinia'
|
|
2
|
+
import { useToggle } from '@vueuse/core'
|
|
3
|
+
|
|
4
|
+
export const usePressAppStore = defineStore('press-app', () => {
|
|
5
|
+
// 右侧边栏
|
|
6
|
+
const [isRightSidebarOpen, toggleRightSidebar] = useToggle()
|
|
7
|
+
|
|
8
|
+
return {
|
|
9
|
+
rightSidebar: {
|
|
10
|
+
isOpen: isRightSidebarOpen,
|
|
11
|
+
toggle: toggleRightSidebar,
|
|
12
|
+
},
|
|
13
|
+
}
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
if (import.meta.hot)
|
|
17
|
+
import.meta.hot.accept(acceptHMRUpdate(usePressAppStore, import.meta.hot))
|
package/stores/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './app'
|