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.
@@ -1,3 +1 @@
1
1
  export * from './twikoo'
2
- // import on demand
3
- // export * from './waline'
@@ -1,7 +1,10 @@
1
1
  import { computed } from 'vue'
2
2
  import { useRoute } from 'vue-router'
3
3
 
4
- export function useLayout(layout: string) {
4
+ export function useLayout(layout?: string) {
5
5
  const route = useRoute()
6
- return computed(() => route.meta.layout === layout)
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
- && fm.value.layout !== 'home'
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>
@@ -1 +1 @@
1
- export const cdnPrefix = 'https://npm.elemecdn.com/'
1
+ export const cdnPrefix = 'https://unpkg.com/'