valaxy-theme-yun 0.19.9 → 0.19.10
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/components/YunBackToTop.vue +5 -2
- package/components/YunPostCollapse.vue +4 -2
- package/components/YunSelect.vue +2 -1
- package/components/collection/YunCollectionItem.vue +16 -0
- package/layouts/collection.vue +18 -0
- package/layouts/collections.vue +23 -0
- package/layouts/post.vue +1 -1
- package/package.json +4 -4
@@ -15,7 +15,10 @@ const strokeOffset = computed(() => {
|
|
15
15
|
</script>
|
16
16
|
|
17
17
|
<template>
|
18
|
-
<a
|
18
|
+
<a
|
19
|
+
href="#" class="back-to-top yun-icon-btn"
|
20
|
+
:class="show && 'show'" @click="backToTop"
|
21
|
+
>
|
19
22
|
<div w="8" h="8" i-ri-arrow-up-s-line />
|
20
23
|
<svg class="progress-circle-container" viewBox="0 0 100 100">
|
21
24
|
<circle :stroke-dasharray="`${circumference} ${circumference}`" :stroke-dashoffset="strokeOffset" class="progress-circle" cx="50" cy="50" :r="radius" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" />
|
@@ -37,7 +40,7 @@ const strokeOffset = computed(() => {
|
|
37
40
|
transform: translateX(0) rotate(270deg);
|
38
41
|
|
39
42
|
// override yun-icon-btn transition
|
40
|
-
transition:
|
43
|
+
transition: all var(--va-transition-duration), opacity var(--va-transition-duration-fast) !important;
|
41
44
|
|
42
45
|
&.show {
|
43
46
|
transform: translateX(-32px) rotate(360deg);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
2
|
import { computed, ref, watch } from 'vue'
|
3
3
|
import type { Post } from 'valaxy'
|
4
|
-
import { formatDate, sortByDate } from 'valaxy'
|
4
|
+
import { formatDate, sortByDate, useSiteConfig } from 'valaxy'
|
5
5
|
import { useI18n } from 'vue-i18n'
|
6
6
|
|
7
7
|
const props = defineProps<{
|
@@ -13,6 +13,8 @@ const { t } = useI18n()
|
|
13
13
|
const years = ref<number[]>([])
|
14
14
|
const postListByYear = ref<Record<string, Post[]>>({})
|
15
15
|
|
16
|
+
const siteConfig = useSiteConfig()
|
17
|
+
|
16
18
|
watch(() => props.posts, () => {
|
17
19
|
postListByYear.value = {}
|
18
20
|
years.value = []
|
@@ -20,7 +22,7 @@ watch(() => props.posts, () => {
|
|
20
22
|
if (post.hide && post.hide !== 'index')
|
21
23
|
return
|
22
24
|
if (post.date) {
|
23
|
-
const year = Number.parseInt(formatDate(post.date, 'yyyy'))
|
25
|
+
const year = Number.parseInt(formatDate(post.date, 'yyyy', siteConfig.value.timezone))
|
24
26
|
if (postListByYear.value[year]) {
|
25
27
|
postListByYear.value[year].push(post)
|
26
28
|
}
|
package/components/YunSelect.vue
CHANGED
@@ -24,7 +24,8 @@ function toggleOptionVisible(e: MouseEvent) {
|
|
24
24
|
<template>
|
25
25
|
<div class="relative h-8 w-30 text-$va-c-text-2 z-10" @mousedown.stop>
|
26
26
|
<button
|
27
|
-
class="flex h-full w-full px-2 items-center justify-between
|
27
|
+
class="flex h-full w-full px-2 items-center justify-between rounded transition"
|
28
|
+
border="~ gray op-30"
|
28
29
|
:class="optionVisible ? 'border-$va-c-primary' : ''"
|
29
30
|
@click="toggleOptionVisible"
|
30
31
|
>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
import type { CollectionConfig } from 'valaxy'
|
3
|
+
|
4
|
+
defineProps<{
|
5
|
+
collection: CollectionConfig
|
6
|
+
}>()
|
7
|
+
</script>
|
8
|
+
|
9
|
+
<template>
|
10
|
+
<RouterLink
|
11
|
+
class="inline-flex rounded p-4 h-50 w-40 bg-gray-100 dark:bg-dark-300 shadow"
|
12
|
+
:to="`/collections/${collection.id}`"
|
13
|
+
>
|
14
|
+
Book
|
15
|
+
</RouterLink>
|
16
|
+
</template>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
// TODO: Implement collection layout
|
3
|
+
</script>
|
4
|
+
|
5
|
+
<template>
|
6
|
+
<YunSidebar v-if="$slots['sidebar-child']">
|
7
|
+
<slot name="sidebar-child" />
|
8
|
+
</YunSidebar>
|
9
|
+
<YunSidebar v-else />
|
10
|
+
|
11
|
+
<RouterView v-slot="{ Component }">
|
12
|
+
<component :is="Component">
|
13
|
+
<div flex="~ wrap" gap="4">
|
14
|
+
Collection
|
15
|
+
</div>
|
16
|
+
</component>
|
17
|
+
</RouterView>
|
18
|
+
</template>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
import { useCollections } from 'valaxy'
|
3
|
+
|
4
|
+
const { collections } = useCollections()
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<template>
|
8
|
+
<YunSidebar v-if="$slots['sidebar-child']">
|
9
|
+
<slot name="sidebar-child" />
|
10
|
+
</YunSidebar>
|
11
|
+
<YunSidebar v-else />
|
12
|
+
|
13
|
+
<RouterView v-slot="{ Component }">
|
14
|
+
<component :is="Component">
|
15
|
+
<div flex="~ wrap" gap="4">
|
16
|
+
<YunCollectionItem
|
17
|
+
v-for="collection in collections" :key="collection.id"
|
18
|
+
:collection="collection"
|
19
|
+
/>
|
20
|
+
</div>
|
21
|
+
</component>
|
22
|
+
</RouterView>
|
23
|
+
</template>
|
package/layouts/post.vue
CHANGED
@@ -56,7 +56,7 @@ useSchemaOrg(
|
|
56
56
|
|
57
57
|
<template #main-content-after>
|
58
58
|
<YunSponsor v-if="showSponsor" m="t-6" />
|
59
|
-
<ValaxyCopyright v-if="frontmatter.copyright || siteConfig.license.enabled" :url="url" m="y-4" />
|
59
|
+
<ValaxyCopyright v-if="frontmatter.copyright || (frontmatter.copyright !== false && siteConfig.license.enabled)" :url="url" m="y-4" />
|
60
60
|
</template>
|
61
61
|
|
62
62
|
<template #aside-custom>
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "valaxy-theme-yun",
|
3
|
-
"version": "0.19.
|
3
|
+
"version": "0.19.10",
|
4
4
|
"author": {
|
5
5
|
"email": "me@yunyoujun.cn",
|
6
6
|
"name": "YunYouJun",
|
@@ -19,13 +19,13 @@
|
|
19
19
|
"module": "index.ts",
|
20
20
|
"dependencies": {
|
21
21
|
"@explosions/fireworks": "^0.0.2",
|
22
|
-
"@iconify-json/ant-design": "^1.
|
23
|
-
"@iconify-json/simple-icons": "^1.
|
22
|
+
"@iconify-json/ant-design": "^1.2.0",
|
23
|
+
"@iconify-json/simple-icons": "^1.2.2",
|
24
24
|
"animejs": "^3.2.2"
|
25
25
|
},
|
26
26
|
"devDependencies": {
|
27
27
|
"@types/animejs": "^3.1.12",
|
28
|
-
"valaxy": "0.19.
|
28
|
+
"valaxy": "0.19.10",
|
29
29
|
"valaxy-addon-waline": "0.2.0"
|
30
30
|
}
|
31
31
|
}
|