valaxy-theme-yun 0.20.4 → 0.20.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.
@@ -1,4 +1,4 @@
1
1
  <template>
2
- <!-- empty -->
3
- <div />
2
+ <!-- eslint-disable-next-line vue/no-lone-template empty -->
3
+ <template />
4
4
  </template>
@@ -1,11 +1,11 @@
1
1
  <script lang="ts" setup>
2
- import { ref } from 'vue'
2
+ import { ref, watch } from 'vue'
3
3
  import { useI18n } from 'vue-i18n'
4
4
  import { useFuseSearch } from 'valaxy'
5
5
 
6
6
  import { isClient, onClickOutside, useScrollLock } from '@vueuse/core'
7
7
 
8
- defineProps<{
8
+ const props = defineProps<{
9
9
  open: boolean
10
10
  }>()
11
11
  const emit = defineEmits(['close'])
@@ -14,7 +14,7 @@ const input = ref('')
14
14
 
15
15
  const isLocked = useScrollLock(isClient ? document.documentElement : null)
16
16
  const { t } = useI18n()
17
- const { results } = useFuseSearch(input)
17
+ const { results, fetchFuseListData } = useFuseSearch(input)
18
18
 
19
19
  const searchInputRef = ref<HTMLInputElement>()
20
20
  const searchContainer = ref<HTMLElement>()
@@ -22,6 +22,11 @@ const searchContainer = ref<HTMLElement>()
22
22
  onClickOutside(searchInputRef, () => {
23
23
  // emit('close')
24
24
  })
25
+
26
+ watch(() => props.open, () => {
27
+ if (props.open)
28
+ fetchFuseListData()
29
+ })
25
30
  </script>
26
31
 
27
32
  <template>
@@ -3,7 +3,8 @@ import { computed, ref, watch } from 'vue'
3
3
  import { useFrontmatter } from 'valaxy'
4
4
  import { useI18n } from 'vue-i18n'
5
5
 
6
- import { differenceInMilliseconds, formatDistanceToNow } from 'date-fns'
6
+ import { differenceInMilliseconds } from 'date-fns/differenceInMilliseconds'
7
+ import { formatDistanceToNow } from 'date-fns/formatDistanceToNow'
7
8
 
8
9
  const fm = useFrontmatter()
9
10
  const { t, locale } = useI18n()
@@ -9,12 +9,7 @@ const siteConfig = useSiteConfig()
9
9
  <RouterLink
10
10
  class="site-author-avatar inline-flex-center" to="/about"
11
11
  >
12
- <img class="rounded-full" :src="siteConfig.author.avatar" alt="avatar">
13
- <!-- <span
14
- v-if="siteConfig.author.status.emoji"
15
- class="site-author-status absolute"
16
- :title="siteConfig.author.status.message || undefined"
17
- >{{ siteConfig.author.status.emoji }}</span> -->
12
+ <YunAuthorAvatar />
18
13
  </RouterLink>
19
14
  <YunAuthorName />
20
15
  <YunSiteTitle />
@@ -32,38 +27,6 @@ const siteConfig = useSiteConfig()
32
27
  </template>
33
28
 
34
29
  <style lang="scss">
35
- .site-author-avatar {
36
- position: relative;
37
- line-height: 0;
38
-
39
- img {
40
- height: 96px;
41
- width: 96px;
42
- max-width: 100%;
43
- margin: 0;
44
- padding: 4px;
45
- background-color: white;
46
- box-shadow: 0 0 10px rgba(black, 0.2);
47
- transition: 0.4s;
48
-
49
- &:hover {
50
- box-shadow: 0 0 30px rgba(var(--va-c-primary-rgb), 0.2);
51
- }
52
- }
53
- }
54
-
55
- .site-author-status {
56
- height: 1.8rem;
57
- width: 1.8rem;
58
- bottom: 0;
59
- right: 0;
60
- line-height: 1.8rem;
61
- border-radius: 50%;
62
- box-shadow: 0 1px 2px rgb(0 0 0 / 0.2);
63
- background-color: var(--va-c-bg-light);
64
- border: 1px solid rgb(255 255 255 / 0.1);
65
- }
66
-
67
30
  .site-info {
68
31
  &.fix-top {
69
32
  margin-top: -1.5rem;
@@ -5,9 +5,46 @@ const siteConfig = useSiteConfig()
5
5
  </script>
6
6
 
7
7
  <template>
8
- <img
9
- class="rounded-full size-full"
10
- :src="siteConfig.author.avatar"
11
- alt="avatar"
12
- >
8
+ <div class="relative yun-author-avatar">
9
+ <img
10
+ class="rounded-full size-full bg-white dark:bg-white/20 p-1 m-0"
11
+ :src="siteConfig.author.avatar"
12
+ alt="avatar"
13
+ >
14
+ <span
15
+ v-if="siteConfig.author.status.emoji"
16
+ class="site-author-status absolute"
17
+ :title="siteConfig.author.status.message || undefined"
18
+ >{{ siteConfig.author.status.emoji }}</span>
19
+ </div>
13
20
  </template>
21
+
22
+ <style lang="scss">
23
+ .yun-author-avatar {
24
+ width: var(--avatar-size, 96px);
25
+ height: var(--avatar-size, 96px);
26
+ }
27
+
28
+ .site-author-avatar {
29
+ img {
30
+ box-shadow: 0 0 10px rgba(black, 0.2);
31
+ transition: 0.4s;
32
+
33
+ &:hover {
34
+ box-shadow: 0 0 30px rgba(var(--va-c-primary-rgb), 0.2);
35
+ }
36
+ }
37
+ }
38
+
39
+ .site-author-status {
40
+ height: 1.8rem;
41
+ width: 1.8rem;
42
+ bottom: 0;
43
+ right: 0;
44
+ line-height: 1.8rem;
45
+ border-radius: 50%;
46
+ box-shadow: 0 1px 2px rgb(0 0 0 / 0.2);
47
+ background-color: var(--va-c-bg-light);
48
+ border: 1px solid rgb(255 255 255 / 0.1);
49
+ }
50
+ </style>
@@ -29,7 +29,7 @@ const showContent = ref(false)
29
29
  >
30
30
  <div
31
31
  flex="~ col"
32
- class="absolute yun-square bg-$va-c-text square-rotate z-1"
32
+ class="absolute yun-square square-rotate z-1 bg-white/80"
33
33
  >
34
34
  <LineBurstEffects
35
35
  class="absolute top-0 left-0 right-0 bottom-0 size-full scale-200"
package/layouts/post.vue CHANGED
@@ -4,7 +4,7 @@ import { useFrontmatter, useFullUrl, useSiteConfig } from 'valaxy'
4
4
 
5
5
  import type { Article } from '@unhead/schema-org'
6
6
  import { defineArticle, useSchemaOrg } from '@unhead/schema-org'
7
- import { toDate } from 'date-fns'
7
+ import { toDate } from 'date-fns/toDate'
8
8
 
9
9
  const siteConfig = useSiteConfig()
10
10
  const frontmatter = useFrontmatter()
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "valaxy-theme-yun",
3
3
  "type": "module",
4
- "version": "0.20.4",
4
+ "version": "0.20.5",
5
5
  "author": {
6
6
  "email": "me@yunyoujun.cn",
7
7
  "name": "YunYouJun",
@@ -24,17 +24,17 @@
24
24
  "@ctrl/tinycolor": "^4.1.0",
25
25
  "@explosions/fireworks": "^0.1.0",
26
26
  "@iconify-json/ant-design": "^1.2.2",
27
- "@iconify-json/simple-icons": "^1.2.11",
27
+ "@iconify-json/simple-icons": "^1.2.13",
28
28
  "@vueuse/motion": "^2.2.6",
29
29
  "animejs": "^3.2.2",
30
30
  "gsap": "^3.12.5",
31
- "primevue": "^4.2.1",
32
- "radix-vue": "^1.9.9"
31
+ "primevue": "^4.2.3",
32
+ "radix-vue": "^1.9.10"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/animejs": "^3.1.12",
36
- "valaxy-addon-waline": "0.2.0",
37
- "valaxy": "0.20.4"
36
+ "valaxy": "0.20.5",
37
+ "valaxy-addon-waline": "0.2.0"
38
38
  },
39
39
  "scripts": {
40
40
  "release": "bumpp && npm publish"