valaxy-theme-yun 0.25.8 → 0.25.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/collection/YunCollectionItem.vue +13 -3
- package/components/collection/YunCollectionSidebar.vue +77 -0
- package/components/layout/YunLayoutLeft.vue +17 -3
- package/layouts/categories.vue +3 -3
- package/layouts/collection.vue +19 -3
- package/layouts/collections.vue +23 -6
- package/package.json +3 -3
@@ -8,9 +8,19 @@ defineProps<{
|
|
8
8
|
|
9
9
|
<template>
|
10
10
|
<RouterLink
|
11
|
-
|
12
|
-
:
|
11
|
+
:to="`/collections/${collection.key}/`"
|
12
|
+
:title="collection.title"
|
13
|
+
class="flex flex-col gap-2 hover:border-b-0!"
|
13
14
|
>
|
14
|
-
|
15
|
+
<div class="inline-flex rounded h-40 w-30 bg-gray-100 dark:bg-dark-300 shadow hover:shadow-md transition overflow-hidden">
|
16
|
+
<img
|
17
|
+
:src="collection.cover"
|
18
|
+
:alt="collection.title"
|
19
|
+
class="flex size-full object-cover max-w-none"
|
20
|
+
>
|
21
|
+
</div>
|
22
|
+
<div class="text-sm font-bold text-center op-80 hover:op-100">
|
23
|
+
{{ collection.title }}
|
24
|
+
</div>
|
15
25
|
</RouterLink>
|
16
26
|
</template>
|
@@ -0,0 +1,77 @@
|
|
1
|
+
<script setup lang="ts">
|
2
|
+
import { useCollection } from 'valaxy'
|
3
|
+
|
4
|
+
const { collection } = useCollection()
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<template>
|
8
|
+
<YunCard class="collection p-4 min-h-sm justify-start items-start" flex="~ col gap-1">
|
9
|
+
<section class="yun-sidebar-item">
|
10
|
+
<RouterLink :to="`/collections/${collection.key}/`" class="title">
|
11
|
+
{{ collection.title }}
|
12
|
+
</RouterLink>
|
13
|
+
<div class="items">
|
14
|
+
<div v-for="item in collection.items" :key="item.key" class="item">
|
15
|
+
<div class="indicator" />
|
16
|
+
<RouterLink
|
17
|
+
:to="`/collections/${collection.key}/${item.key}`"
|
18
|
+
>
|
19
|
+
<p class="text">
|
20
|
+
{{ item.title }}
|
21
|
+
</p>
|
22
|
+
</RouterLink>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</section>
|
26
|
+
</YunCard>
|
27
|
+
</template>
|
28
|
+
|
29
|
+
<style lang="scss">
|
30
|
+
.collection {
|
31
|
+
.yun-sidebar-item {
|
32
|
+
.title {
|
33
|
+
font-weight: 500;
|
34
|
+
font-size: 16px;
|
35
|
+
color: var(--va-c-text-1);
|
36
|
+
}
|
37
|
+
|
38
|
+
.items {
|
39
|
+
border-left: 1px solid var(--va-c-divider);
|
40
|
+
|
41
|
+
color: #666;
|
42
|
+
font-size: 0.9em;
|
43
|
+
|
44
|
+
padding-left: 16px;
|
45
|
+
|
46
|
+
.item {
|
47
|
+
.text {
|
48
|
+
color: var(--va-c-text-2);
|
49
|
+
flex-grow: 1;
|
50
|
+
padding: 4px 0;
|
51
|
+
font-size: 14px;
|
52
|
+
line-height: 24px;
|
53
|
+
transition: color .25s;
|
54
|
+
}
|
55
|
+
|
56
|
+
.indicator {
|
57
|
+
border-radius: 2px;
|
58
|
+
width: 2px;
|
59
|
+
transition: background-color .25s;
|
60
|
+
position: absolute;
|
61
|
+
top: 6px;
|
62
|
+
bottom: 6px;
|
63
|
+
}
|
64
|
+
|
65
|
+
.router-link-active {
|
66
|
+
color: var(--va-c-primary);
|
67
|
+
font-weight: 500;
|
68
|
+
|
69
|
+
.text {
|
70
|
+
color: var(--va-c-primary);
|
71
|
+
}
|
72
|
+
}
|
73
|
+
}
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
</style>
|
@@ -1,12 +1,26 @@
|
|
1
1
|
<script setup lang="ts">
|
2
|
+
import { useFrontmatter } from 'valaxy'
|
3
|
+
import { computed } from 'vue'
|
2
4
|
import { useYunAppStore } from '../../stores'
|
3
5
|
|
4
6
|
const yun = useYunAppStore()
|
7
|
+
|
8
|
+
const fm = useFrontmatter()
|
9
|
+
const showLeftLayout = computed(() => {
|
10
|
+
if (typeof fm.value.sidebar !== 'undefined')
|
11
|
+
return fm.value.sidebar
|
12
|
+
return yun.size.isLg
|
13
|
+
})
|
5
14
|
</script>
|
6
15
|
|
7
16
|
<template>
|
8
|
-
<div
|
9
|
-
|
10
|
-
|
17
|
+
<div
|
18
|
+
v-if="showLeftLayout"
|
19
|
+
flex="~ col" class="gap-4 sticky top-$yun-margin-top w-80"
|
20
|
+
>
|
21
|
+
<slot>
|
22
|
+
<YunSidebarCard />
|
23
|
+
<YunAdBoard />
|
24
|
+
</slot>
|
11
25
|
</div>
|
12
26
|
</template>
|
package/layouts/categories.vue
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
2
|
import { defineWebPage, useSchemaOrg } from '@unhead/schema-org/vue'
|
3
|
-
import { useCategories, useFrontmatter,
|
3
|
+
import { useCategories, useFrontmatter, useSiteStore, useValaxyI18n } from 'valaxy'
|
4
4
|
import { computed } from 'vue'
|
5
5
|
import { useI18n } from 'vue-i18n'
|
6
6
|
import { useRoute } from 'vue-router'
|
@@ -36,7 +36,7 @@ const posts = computed(() => {
|
|
36
36
|
return list
|
37
37
|
})
|
38
38
|
|
39
|
-
const
|
39
|
+
const { $tO } = useValaxyI18n()
|
40
40
|
|
41
41
|
useSchemaOrg([
|
42
42
|
defineWebPage({
|
@@ -53,7 +53,7 @@ useSchemaOrg([
|
|
53
53
|
<component :is="Component">
|
54
54
|
<template #main-header>
|
55
55
|
<YunPageHeader
|
56
|
-
:title="title || t('menu.categories')"
|
56
|
+
:title="$tO(frontmatter.title) || t('menu.categories')"
|
57
57
|
:icon="pageIcon"
|
58
58
|
:color="frontmatter.color"
|
59
59
|
:page-title-class="frontmatter.pageTitleClass"
|
package/layouts/collection.vue
CHANGED
@@ -4,12 +4,28 @@
|
|
4
4
|
|
5
5
|
<template>
|
6
6
|
<YunLayoutWrapper>
|
7
|
+
<YunLayoutLeft>
|
8
|
+
<YunCollectionSidebar />
|
9
|
+
</YunLayoutLeft>
|
10
|
+
|
7
11
|
<RouterView v-slot="{ Component }">
|
8
12
|
<component :is="Component">
|
9
|
-
<
|
10
|
-
|
11
|
-
</
|
13
|
+
<template #main-header-after>
|
14
|
+
<YunMainHeaderAfter />
|
15
|
+
</template>
|
16
|
+
<template #main-content-after>
|
17
|
+
<YunMainContentAfter />
|
18
|
+
</template>
|
19
|
+
<template #aside-custom>
|
20
|
+
<slot name="aside-custom" />
|
21
|
+
</template>
|
22
|
+
|
23
|
+
<template #main-nav>
|
24
|
+
<!-- -->
|
25
|
+
</template>
|
12
26
|
</component>
|
13
27
|
</RouterView>
|
28
|
+
|
29
|
+
<YunLayoutRight />
|
14
30
|
</YunLayoutWrapper>
|
15
31
|
</template>
|
package/layouts/collections.vue
CHANGED
@@ -1,19 +1,36 @@
|
|
1
1
|
<script setup lang="ts">
|
2
|
-
import { useCollections } from 'valaxy'
|
2
|
+
import { useCollections, useFrontmatter, useValaxyI18n } from 'valaxy'
|
3
|
+
import { useI18n } from 'vue-i18n'
|
3
4
|
|
5
|
+
const { t } = useI18n()
|
6
|
+
const { $tO } = useValaxyI18n()
|
7
|
+
const fm = useFrontmatter()
|
4
8
|
const { collections } = useCollections()
|
5
9
|
</script>
|
6
10
|
|
7
11
|
<template>
|
8
12
|
<YunLayoutWrapper>
|
13
|
+
<YunLayoutLeft />
|
14
|
+
|
9
15
|
<RouterView v-slot="{ Component }">
|
10
16
|
<component :is="Component">
|
11
|
-
<
|
12
|
-
<
|
13
|
-
|
14
|
-
:
|
17
|
+
<template #main-header>
|
18
|
+
<YunPageHeader
|
19
|
+
:title="$tO(fm.title) || t('menu.collections')"
|
20
|
+
:icon="fm.icon"
|
21
|
+
:page-title-class="fm.pageTitleClass"
|
15
22
|
/>
|
16
|
-
</
|
23
|
+
</template>
|
24
|
+
|
25
|
+
<template #main-content>
|
26
|
+
<div flex="~ wrap" gap="6">
|
27
|
+
<YunCollectionItem
|
28
|
+
v-for="collection in collections"
|
29
|
+
:key="collection.key"
|
30
|
+
:collection="collection"
|
31
|
+
/>
|
32
|
+
</div>
|
33
|
+
</template>
|
17
34
|
</component>
|
18
35
|
</RouterView>
|
19
36
|
</YunLayoutWrapper>
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "valaxy-theme-yun",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.25.
|
4
|
+
"version": "0.25.10",
|
5
5
|
"author": {
|
6
6
|
"email": "me@yunyoujun.cn",
|
7
7
|
"name": "YunYouJun",
|
@@ -24,7 +24,7 @@
|
|
24
24
|
"@ctrl/tinycolor": "^4.1.0",
|
25
25
|
"@explosions/fireworks": "^0.2.0",
|
26
26
|
"@iconify-json/ant-design": "^1.2.5",
|
27
|
-
"@iconify-json/simple-icons": "^1.2.
|
27
|
+
"@iconify-json/simple-icons": "^1.2.44",
|
28
28
|
"@vueuse/motion": "^3.0.3",
|
29
29
|
"animejs": "^4.0.2",
|
30
30
|
"gsap": "^3.13.0",
|
@@ -32,7 +32,7 @@
|
|
32
32
|
},
|
33
33
|
"devDependencies": {
|
34
34
|
"@types/animejs": "^3.1.13",
|
35
|
-
"valaxy": "0.25.
|
35
|
+
"valaxy": "0.25.10",
|
36
36
|
"valaxy-addon-waline": "0.2.1"
|
37
37
|
},
|
38
38
|
"scripts": {
|