valaxy 0.10.2 → 0.10.4
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/client/composables/comments/index.ts +0 -2
- package/client/composables/layout.ts +5 -2
- package/client/composables/sidebar.ts +4 -2
- package/client/index.html +16 -0
- package/client/utils/cdn.ts +1 -1
- package/dist/chunk-4DDESE24.mjs +100 -0
- package/dist/chunk-LLT2PKQ2.js +100 -0
- package/dist/{config-1d500fb4.d.ts → config-a8e39079.d.ts} +1 -1
- package/dist/node/cli.js +7 -7
- package/dist/node/cli.mjs +3 -3
- package/dist/node/index.d.ts +3 -2
- package/dist/node/index.js +1 -1
- package/dist/node/index.mjs +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +26 -26
- package/types/config.ts +1 -1
- package/client/composables/comments/waline.ts +0 -82
- package/dist/chunk-6PDG5NQV.mjs +0 -102
- package/dist/chunk-S7EBKLNL.js +0 -102
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { computed } from 'vue'
|
|
2
2
|
import { useRoute } from 'vue-router'
|
|
3
3
|
|
|
4
|
-
export function useLayout(layout
|
|
4
|
+
export function useLayout(layout?: string) {
|
|
5
5
|
const route = useRoute()
|
|
6
|
-
|
|
6
|
+
if (layout)
|
|
7
|
+
return computed(() => route.meta.layout === layout)
|
|
8
|
+
else
|
|
9
|
+
return computed(() => route.meta.layout)
|
|
7
10
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Ref } from 'vue'
|
|
2
2
|
import { computed, onMounted, onUnmounted, ref } from 'vue'
|
|
3
|
-
import { useFrontmatter } from '..'
|
|
3
|
+
import { useFrontmatter, useLayout } from '..'
|
|
4
4
|
|
|
5
5
|
export function useActiveSidebarLinks(container: Ref<HTMLElement>, marker: Ref<HTMLElement>) {
|
|
6
6
|
const onScroll = throttleAndDebounce(setActiveLink, 200)
|
|
@@ -119,10 +119,12 @@ function throttleAndDebounce(fn: () => void, delay: number): () => void {
|
|
|
119
119
|
export function useSidebar() {
|
|
120
120
|
const isOpen = ref(false)
|
|
121
121
|
const fm = useFrontmatter()
|
|
122
|
+
const layout = useLayout()
|
|
122
123
|
const hasSidebar = computed(() => {
|
|
123
124
|
return (
|
|
124
125
|
fm.value.sidebar !== false
|
|
125
|
-
&&
|
|
126
|
+
&& layout.value !== 'home'
|
|
127
|
+
&& layout.value !== 'post'
|
|
126
128
|
)
|
|
127
129
|
})
|
|
128
130
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<!-- head -->
|
|
8
|
+
</head>
|
|
9
|
+
|
|
10
|
+
<body>
|
|
11
|
+
<div id="app"></div>
|
|
12
|
+
<script type="module" src="__ENTRY__"></script>
|
|
13
|
+
<!-- body -->
|
|
14
|
+
</body>
|
|
15
|
+
|
|
16
|
+
</html>
|
package/client/utils/cdn.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const cdnPrefix = 'https://
|
|
1
|
+
export const cdnPrefix = 'https://unpkg.com/'
|