valaxy-theme-hairy 0.0.1 → 0.0.4
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,42 +1,23 @@
|
|
1
|
-
<script lang="
|
1
|
+
<script lang="ts" setup>
|
2
2
|
import { useCategory, usePostList, useTag } from 'valaxy'
|
3
|
-
import { defineComponent } from 'vue'
|
4
3
|
const category = useCategory()
|
5
4
|
const posts = usePostList()
|
6
5
|
const tags = useTag()
|
7
|
-
const State = defineComponent({
|
8
|
-
props: {
|
9
|
-
count: {
|
10
|
-
type: Number,
|
11
|
-
default: 0,
|
12
|
-
},
|
13
|
-
},
|
14
|
-
setup: (props, { slots }) => {
|
15
|
-
return () => <div class="flex-center flex-col cursor-pointer hover:text-primary px-3 py-1">
|
16
|
-
<div class="font-bold leading-none">
|
17
|
-
{props.count}
|
18
|
-
</div>
|
19
|
-
<div class="leading-none mt-1">
|
20
|
-
{slots.default?.()}
|
21
|
-
</div>
|
22
|
-
</div>
|
23
|
-
},
|
24
|
-
})
|
25
6
|
</script>
|
26
7
|
|
27
8
|
<template>
|
28
9
|
<div class="flex justify-center mt-2">
|
29
|
-
<
|
10
|
+
<HairyUserStats :count="posts.length" @click="$router.push('/archives/')">
|
30
11
|
文章
|
31
|
-
</
|
12
|
+
</HairyUserStats>
|
32
13
|
<div class="w-1px bg-gray bg-opacity-50" />
|
33
|
-
<
|
14
|
+
<HairyUserStats :count="category.total" @click="$router.push('/categories/')">
|
34
15
|
分类
|
35
|
-
</
|
16
|
+
</HairyUserStats>
|
36
17
|
<div class="w-1px bg-gray bg-opacity-50" />
|
37
|
-
<
|
18
|
+
<HairyUserStats :count="tags.size" @click="$router.push('/tags/')">
|
38
19
|
标签
|
39
|
-
</
|
20
|
+
</HairyUserStats>
|
40
21
|
</div>
|
41
22
|
<HairySocialLinks class="mt-5" />
|
42
23
|
<HairyMenu class="HairyUserMenu mt-5 flex-col h-auto" />
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
defineProps<{
|
3
|
+
count?: number
|
4
|
+
}>()
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<template>
|
8
|
+
<div class="flex-center flex-col cursor-pointer hover:text-primary px-3 py-1">
|
9
|
+
<div class="font-bold leading-none">
|
10
|
+
{{ count || 0 }}
|
11
|
+
</div>
|
12
|
+
<div class="leading-none mt-1">
|
13
|
+
<slot />
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
</template>
|
17
|
+
|
18
|
+
<style lang="scss" scoped></style>
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "valaxy-theme-hairy",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.4",
|
4
4
|
"packageManager": "pnpm@7.5.0",
|
5
5
|
"author": {
|
6
6
|
"email": "wwu710632@gmail.com",
|
@@ -25,7 +25,6 @@
|
|
25
25
|
"@hairy/vue-use": "^1.2.0",
|
26
26
|
"@iconify-json/ant-design": "^1.1.3",
|
27
27
|
"@iconify-json/simple-icons": "^1.1.19",
|
28
|
-
"@vitejs/plugin-vue-jsx": "^2.0.0",
|
29
28
|
"@vueuse/core": "^8.9.4",
|
30
29
|
"@waline/client": "^2.6.1",
|
31
30
|
"defu": "^6.0.0",
|
@@ -36,8 +35,6 @@
|
|
36
35
|
"reading-time": "^1.5.0",
|
37
36
|
"swiper": "^8.3.1",
|
38
37
|
"unoverlay-vue": "0.2.1",
|
39
|
-
"valaxy-addon-images": "0.0.1",
|
40
|
-
"valaxy-addon-statistics": "0.0.1",
|
41
38
|
"yaml": "^2.1.1"
|
42
39
|
},
|
43
40
|
"devDependencies": {
|