valaxy 0.11.4 → 0.11.6

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/App.vue CHANGED
@@ -6,6 +6,7 @@ import ValaxyUserApp from '/@valaxyjs/UserAppVue'
6
6
  // @ts-expect-error virtual module
7
7
  import ValaxyThemeApp from '/@valaxyjs/ThemeAppVue'
8
8
  import pkg from 'valaxy/package.json'
9
+ import { useI18n } from 'vue-i18n'
9
10
  import ValaxyAddons from './components/ValaxyAddons.vue'
10
11
  import { isDark, useFrontmatter } from './composables'
11
12
 
@@ -19,8 +20,13 @@ import { useConfig } from './config'
19
20
 
20
21
  const config = useConfig()
21
22
  const themeColor = computed(() => isDark.value ? '#00aba9' : '#ffffff')
23
+ const fm = useFrontmatter()
24
+
25
+ const { locale } = useI18n()
26
+
22
27
  useHead({
23
- title: config.value.title,
28
+ title: computed(() => fm.value[`title_${locale.value}`] || fm.value.title),
29
+ titleTemplate: computed(() => fm.value.titleTemplate || ((title: string) => title ? `${title} - ${config.value.title}` : config.value.title)),
24
30
  link: [
25
31
  {
26
32
  rel: 'icon',
@@ -47,7 +53,6 @@ useHead({
47
53
 
48
54
  // seo
49
55
  // todo: get first image url from markdown
50
- const fm = useFrontmatter()
51
56
  useSeoMeta({
52
57
  description: computed(() => fm.value.excerpt || config.value.description),
53
58
  ogDescription: computed(() => fm.value.excerpt || config.value.description),
@@ -28,8 +28,6 @@ withDefaults(defineProps<{
28
28
  z-index: calc(var(--va-z-overlay) - 1);
29
29
  transition: opacity 0.4s;
30
30
 
31
- display: none;
32
-
33
31
  &.fade-enter-from,
34
32
  &.fade-leave-to {
35
33
  opacity: 0;
@@ -5,7 +5,7 @@
5
5
  background: var(--va-c-primary);
6
6
  opacity: 0.75;
7
7
  position: fixed;
8
- z-index: 1031;
8
+ z-index: 1024;
9
9
  top: 0;
10
10
  left: 0;
11
11
  width: 100%;
@@ -3,7 +3,8 @@
3
3
  $common: () !default;
4
4
  $common: map.merge(
5
5
  (
6
- "sidebar-width": 320px,
6
+ "aside-width": 256px,
7
+ "sidebar-width": 300px,
7
8
  ),
8
9
  $common
9
10
  );
@@ -19,10 +20,10 @@ $border: map.merge(
19
20
  $font: () !default;
20
21
  $font: map.merge(
21
22
  (
23
+ "serif": "'Noto Serif SC', STZhongsong, Roboto, serif",
22
24
  "sans":
23
25
  'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif',
24
26
  "mono": 'Menlo, Monaco, Consolas, "Courier New", monospace',
25
- "serif": "'Noto Serif SC', STZhongsong, STKaiti, KaiTi, Roboto, serif",
26
27
  ),
27
28
  $font
28
29
  );