valaxy-theme-yun 0.22.1 → 0.22.3
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.
@@ -67,14 +67,16 @@ onContentUpdated(() => {
|
|
67
67
|
<slot name="main-header-after" />
|
68
68
|
|
69
69
|
<div p="x-4 b-8" class="sm:px-6 lg:px-12 xl:px-16" w="full">
|
70
|
+
<slot name="main-content-before" />
|
71
|
+
|
70
72
|
<slot name="main-content">
|
71
73
|
<!-- <Transition appear> -->
|
72
74
|
<ValaxyMd :frontmatter="frontmatter">
|
73
75
|
<YunAiExcerpt v-if="frontmatter.excerpt_type === 'ai' && frontmatter.excerpt" />
|
74
76
|
<YunMdTimeWarning />
|
75
77
|
|
76
|
-
<slot name="main-content-md" />
|
77
78
|
<slot />
|
79
|
+
<slot name="main-content-md" />
|
78
80
|
</ValaxyMd>
|
79
81
|
<!-- </Transition> -->
|
80
82
|
</slot>
|
package/components/YunAlbum.vue
CHANGED
@@ -17,7 +17,7 @@ defineProps<{
|
|
17
17
|
:alt="album.caption"
|
18
18
|
:on-error="onImgError"
|
19
19
|
>
|
20
|
-
<figcaption class="yun-album-caption yun-title-effects text-$va-c-text inline-flex">
|
20
|
+
<figcaption class="yun-album-caption yun-title-effects text-$va-c-text inline-flex-center">
|
21
21
|
{{ album.caption }}
|
22
22
|
</figcaption>
|
23
23
|
</figure>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
import { onMounted, ref } from 'vue'
|
3
|
+
|
4
|
+
const slideIn = ref(false)
|
5
|
+
onMounted(() => {
|
6
|
+
slideIn.value = true
|
7
|
+
})
|
8
|
+
</script>
|
9
|
+
|
10
|
+
<template>
|
11
|
+
<div
|
12
|
+
class="line" :class="{
|
13
|
+
enter: slideIn,
|
14
|
+
}"
|
15
|
+
/>
|
16
|
+
</template>
|
17
|
+
|
18
|
+
<style lang="scss" scoped>
|
19
|
+
@use 'sass:map';
|
20
|
+
@use 'valaxy-theme-yun/styles/vars.scss' as *;
|
21
|
+
|
22
|
+
.line {
|
23
|
+
position: absolute;
|
24
|
+
height: 1px;
|
25
|
+
width: 0%;
|
26
|
+
left: 0;
|
27
|
+
background-color: var(--va-c-text);
|
28
|
+
transition: width 1s map.get($cubic-bezier, 'ease-in');
|
29
|
+
transition-delay: 1.2s;
|
30
|
+
|
31
|
+
&.enter {
|
32
|
+
width: 100%;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
</style>
|
@@ -56,17 +56,20 @@ const showContent = ref(false)
|
|
56
56
|
<YunAuthorName class="mt-3" />
|
57
57
|
<YunAuthorIntro />
|
58
58
|
|
59
|
+
<div class="py-4 md:py-5 lg:pt-6">
|
60
|
+
<YunAnimLineDraw />
|
61
|
+
</div>
|
59
62
|
<div
|
60
63
|
flex="~ col"
|
61
64
|
class="gap-2 items-center justify-center"
|
62
|
-
my-4 md:my-5 lg:my-6
|
63
|
-
py-4 md:py-6
|
64
|
-
border="t-1px b-1px black/60 dark:white/60"
|
65
65
|
>
|
66
66
|
<YunSiteTitle />
|
67
67
|
<YunSiteSubtitle />
|
68
68
|
<YunSiteDescription />
|
69
69
|
</div>
|
70
|
+
<div class="scale-x--100 py-4 md:py-5 lg:pb-6">
|
71
|
+
<YunAnimLineDraw />
|
72
|
+
</div>
|
70
73
|
|
71
74
|
<YunSocialLinks />
|
72
75
|
|
package/layouts/gallery.vue
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
2
|
import { defineWebPage, useSchemaOrg } from '@unhead/schema-org'
|
3
3
|
import { useEncryptedPhotos, useFrontmatter, usePostTitle, useRuntimeConfig } from 'valaxy'
|
4
|
-
import { computed, defineAsyncComponent } from 'vue'
|
4
|
+
import { computed, defineAsyncComponent, useTemplateRef } from 'vue'
|
5
5
|
import { useI18n } from 'vue-i18n'
|
6
|
-
import { useRouter } from 'vue-router'
|
6
|
+
import { useRoute, useRouter } from 'vue-router'
|
7
7
|
|
8
8
|
const router = useRouter()
|
9
9
|
|
@@ -19,7 +19,8 @@ useSchemaOrg([
|
|
19
19
|
}),
|
20
20
|
])
|
21
21
|
|
22
|
-
const
|
22
|
+
const route = useRoute()
|
23
|
+
const photos = computed(() => route.meta.frontmatter.photos || [])
|
23
24
|
|
24
25
|
const runtimeConfig = useRuntimeConfig()
|
25
26
|
|
@@ -28,6 +29,12 @@ const YunGallery = runtimeConfig.value.addons['valaxy-addon-lightgallery']
|
|
28
29
|
: () => null
|
29
30
|
|
30
31
|
const encryptedPhotos = useEncryptedPhotos()
|
32
|
+
|
33
|
+
const galleryRef = useTemplateRef<{
|
34
|
+
photos: string[]
|
35
|
+
}>('galleryRef')
|
36
|
+
|
37
|
+
const photosLength = computed(() => photos.value.length || galleryRef.value?.photos.length)
|
31
38
|
</script>
|
32
39
|
|
33
40
|
<template>
|
@@ -44,19 +51,17 @@ const encryptedPhotos = useEncryptedPhotos()
|
|
44
51
|
:page-title-class="frontmatter.pageTitleClass"
|
45
52
|
/>
|
46
53
|
</template>
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
<RouterView />
|
59
|
-
</template>
|
54
|
+
|
55
|
+
<div text="center" class="yun-text-light" p="2">
|
56
|
+
{{ t('counter.photos', photosLength || 0) }}
|
57
|
+
</div>
|
58
|
+
<div class="page-action" text="center">
|
59
|
+
<a class="yun-icon-btn" :title="t('accessibility.back')" @click="() => router.back()">
|
60
|
+
<div i-ri-arrow-go-back-line />
|
61
|
+
</a>
|
62
|
+
</div>
|
63
|
+
<ValaxyGalleryDecrypt v-if="encryptedPhotos" ref="galleryRef" :encrypted-photos="encryptedPhotos" />
|
64
|
+
<YunGallery v-else :photos="photos" />
|
60
65
|
</component>
|
61
66
|
</RouterView>
|
62
67
|
</YunLayoutWrapper>
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "valaxy-theme-yun",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.22.
|
4
|
+
"version": "0.22.3",
|
5
5
|
"author": {
|
6
6
|
"email": "me@yunyoujun.cn",
|
7
7
|
"name": "YunYouJun",
|
@@ -32,7 +32,7 @@
|
|
32
32
|
},
|
33
33
|
"devDependencies": {
|
34
34
|
"@types/animejs": "^3.1.12",
|
35
|
-
"valaxy": "0.22.
|
35
|
+
"valaxy": "0.22.3",
|
36
36
|
"valaxy-addon-waline": "0.2.0"
|
37
37
|
},
|
38
38
|
"scripts": {
|