valaxy-theme-yun 0.19.0 → 0.19.1

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.
@@ -11,7 +11,7 @@ const router = useRouter()
11
11
  <div class="site-info" m="t-6">
12
12
  <RouterLink class="site-author-avatar" to="/about">
13
13
  <img class="rounded-full" :src="siteConfig.author.avatar" alt="avatar">
14
- <span class="site-author-status" :title="siteConfig.author.status.message">{{ siteConfig.author.status.emoji }}</span>
14
+ <span v-if="siteConfig.author.status.emoji" class="site-author-status" :title="siteConfig.author.status.message || undefined">{{ siteConfig.author.status.emoji }}</span>
15
15
  </RouterLink>
16
16
  <div
17
17
  class="site-author-name leading-6"
@@ -6,24 +6,25 @@ defineProps<{
6
6
  showHamburger?: boolean
7
7
  }>()
8
8
 
9
- const yunApp = useYunAppStore()
9
+ const yunStore = useYunAppStore()
10
10
  const showOverview = ref(false)
11
11
  </script>
12
12
 
13
13
  <template>
14
- <ValaxyOverlay class="md:hidden" :show="yunApp.leftSidebar.isOpen" @click="yunApp.leftSidebar.toggle()" />
14
+ <ValaxyOverlay class="md:hidden" :show="yunStore.leftSidebar.isOpen" @click="yunStore.leftSidebar.toggle()" />
15
15
 
16
16
  <ValaxyHamburger
17
- :active="yunApp.leftSidebar.isOpen"
17
+ :active="yunStore.leftSidebar.isOpen"
18
18
  class="menu-btn sidebar-toggle yun-icon-btn leading-4 fixed left-0.8rem top-0.6rem"
19
19
  inline-flex cursor="pointer" z="$yun-z-menu-btn"
20
- :class="showHamburger ? '' : 'md:hidden'" @click="yunApp.leftSidebar.toggle()"
20
+ :class="showHamburger ? '' : 'md:hidden'"
21
+ @click="yunStore.leftSidebar.toggle()"
21
22
  />
22
23
 
23
24
  <aside
24
25
  class="va-card transition sidebar fixed inset-y-0 left-0 overflow-y-auto"
25
26
  :class="{
26
- 'open': yunApp.leftSidebar.isOpen,
27
+ 'open': yunStore.leftSidebar.isOpen,
27
28
  'md:translate-x-0': !showHamburger,
28
29
  }"
29
30
  text="center" bg="$yun-sidebar-bg-color contain no-repeat" z="$yun-z-sidebar"
@@ -54,8 +55,6 @@ const showOverview = ref(false)
54
55
  </template>
55
56
 
56
57
  <style lang="scss">
57
- @use "sass:map";
58
-
59
58
  .sidebar {
60
59
  width: calc(100vw - 64px);
61
60
  max-width: var(--va-sidebar-width);
package/layouts/home.vue CHANGED
@@ -2,14 +2,14 @@
2
2
  import { useLayout } from 'valaxy'
3
3
  import { computed } from 'vue'
4
4
  import { useRoute } from 'vue-router'
5
- import { useThemeConfig } from '../composables'
6
5
  import { useYunAppStore } from '../stores'
6
+ import { useThemeConfig } from '../composables'
7
7
 
8
- const yunApp = useYunAppStore()
8
+ const yunStore = useYunAppStore()
9
+ const route = useRoute()
9
10
  const isHome = useLayout('home')
10
11
  const themeConfig = useThemeConfig()
11
12
 
12
- const route = useRoute()
13
13
  const isPage = computed(() => route.path.startsWith('/page'))
14
14
 
15
15
  const showNotice = computed(() => {
@@ -21,7 +21,7 @@ const showNotice = computed(() => {
21
21
  <template>
22
22
  <main
23
23
  class="yun-main flex-center"
24
- :class="(isHome && !yunApp.leftSidebar.isOpen) ? 'pl-0' : 'md:pl-$va-sidebar-width'" flex="~ col" w="full"
24
+ :class="(isHome && !yunStore.leftSidebar.isOpen) ? 'pl-0' : 'md:pl-$va-sidebar-width'" flex="~ col" w="full"
25
25
  >
26
26
  <YunSidebar :show-hamburger="true" />
27
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "author": {
5
5
  "email": "me@yunyoujun.cn",
6
6
  "name": "YunYouJun",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/animejs": "^3.1.12",
28
- "valaxy": "0.19.0",
28
+ "valaxy": "0.19.1",
29
29
  "valaxy-addon-waline": "0.1.4"
30
30
  }
31
31
  }
package/setup/main.ts CHANGED
@@ -6,9 +6,13 @@ export default defineAppSetup((ctx) => {
6
6
  // can do for setup
7
7
 
8
8
  const { router } = ctx
9
- const appStore = useAppStore()
10
- const yunAppStore = useYunAppStore()
11
9
  router.afterEach(() => {
10
+ /**
11
+ * router import order
12
+ * @see https://pinia.vuejs.org/zh/core-concepts/outside-component-usage.html#single-page-applications
13
+ */
14
+ const appStore = useAppStore()
15
+ const yunAppStore = useYunAppStore()
12
16
  nextTick(() => {
13
17
  if (appStore.isMobile)
14
18
  yunAppStore.leftSidebar.close()
package/stores/app.ts CHANGED
@@ -2,7 +2,6 @@ import { acceptHMRUpdate, defineStore } from 'pinia'
2
2
  import { useDynamicLeftSidebar } from 'valaxy'
3
3
 
4
4
  export const useYunAppStore = defineStore('yun-app', () => {
5
- // global cache for yun
6
5
  const leftSidebar = useDynamicLeftSidebar()
7
6
 
8
7
  return {