valaxy-theme-hairy 0.0.3 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- package/components/HairyArticleImageDefault.vue +1 -1
- package/components/HairyArticleImageSmall.vue +1 -1
- package/components/HairyTimelinePostItem.vue +1 -1
- package/components/HairyUserCard.vue +1 -1
- package/components/HairyUserNav.vue +7 -26
- package/components/HairyUserStats.vue +18 -0
- package/hooks/useCategoryPost.ts +1 -1
- package/node/utils.ts +1 -1
- package/package.json +2 -3
- package/pages/archives/[year]/[month]/index.vue +1 -1
- package/pages/archives/[year]/index.vue +1 -1
- package/pages/archives/index.vue +1 -1
- package/pages/categories/[...categories].vue +1 -1
- package/pages/tags/[tag].vue +1 -1
@@ -4,7 +4,7 @@ import { computed, defineProps } from 'vue'
|
|
4
4
|
import dayjs from 'dayjs'
|
5
5
|
import { useRouter } from 'vue-router'
|
6
6
|
import { useI18n } from 'vue-i18n'
|
7
|
-
import last from 'lodash
|
7
|
+
import { last } from 'lodash-es'
|
8
8
|
import { usePostLayout } from '../hooks/usePostLayout'
|
9
9
|
import { toArr } from '../utils'
|
10
10
|
|
@@ -4,7 +4,7 @@ import { computed, defineProps } from 'vue'
|
|
4
4
|
import dayjs from 'dayjs'
|
5
5
|
import { useRouter } from 'vue-router'
|
6
6
|
import { useI18n } from 'vue-i18n'
|
7
|
-
import last from 'lodash
|
7
|
+
import { last } from 'lodash-es'
|
8
8
|
import { usePostLayout } from '../hooks/usePostLayout'
|
9
9
|
import { toArr } from '../utils'
|
10
10
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
import type { Post } from 'valaxy'
|
3
3
|
import dayjs from 'dayjs'
|
4
4
|
import { withDefaults } from 'vue'
|
5
|
-
import last from 'lodash
|
5
|
+
import { last } from 'lodash-es'
|
6
6
|
import { useRouter } from 'vue-router'
|
7
7
|
import { useI18n } from 'vue-i18n'
|
8
8
|
import { toArr } from '../utils'
|
@@ -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/hooks/useCategoryPost.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { MaybeRef } from '@vueuse/shared'
|
2
2
|
import { usePostList } from 'valaxy'
|
3
|
-
import isEqual from 'lodash
|
3
|
+
import { isEqual } from 'lodash-es'
|
4
4
|
import { computed, unref } from 'vue'
|
5
5
|
|
6
6
|
export function useCategoryPost(categories: MaybeRef<string[]>) {
|
package/node/utils.ts
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "valaxy-theme-hairy",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.6",
|
4
4
|
"packageManager": "pnpm@7.5.0",
|
5
5
|
"author": {
|
6
6
|
"email": "wwu710632@gmail.com",
|
@@ -25,13 +25,12 @@
|
|
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",
|
30
|
+
"dayjs": "^1.11.4",
|
31
31
|
"defu": "^6.0.0",
|
32
32
|
"element-plus": "^2.2.10",
|
33
33
|
"furigana-markdown-it": "^1.0.3",
|
34
|
-
"lodash": "^4.17.21",
|
35
34
|
"markdown-toc": "^1.2.0",
|
36
35
|
"reading-time": "^1.5.0",
|
37
36
|
"swiper": "^8.3.1",
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
|
-
import { ElTimeline, ElTimelineItem } from 'element-plus'
|
2
|
+
import { ElTimeline, ElTimelineItem } from 'element-plus/es/components/timeline/index'
|
3
3
|
import 'element-plus/es/components/timeline/style/index'
|
4
4
|
import 'element-plus/es/components/timeline-item/style/index'
|
5
5
|
import { computed, defineProps } from 'vue'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
|
-
import { ElTimeline, ElTimelineItem } from 'element-plus'
|
2
|
+
import { ElTimeline, ElTimelineItem } from 'element-plus/es/components/timeline/index'
|
3
3
|
import 'element-plus/es/components/timeline/style/index'
|
4
4
|
import 'element-plus/es/components/timeline-item/style/index'
|
5
5
|
import { computed } from 'vue'
|
package/pages/archives/index.vue
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
|
-
import { ElTimeline, ElTimelineItem } from 'element-plus'
|
2
|
+
import { ElTimeline, ElTimelineItem } from 'element-plus/es/components/timeline/index'
|
3
3
|
import { usePostList } from 'valaxy'
|
4
4
|
import 'element-plus/es/components/timeline/style/index'
|
5
5
|
import 'element-plus/es/components/timeline-item/style/index'
|
@@ -3,7 +3,7 @@ import { computed } from 'vue'
|
|
3
3
|
import { useI18n } from 'vue-i18n'
|
4
4
|
import { useRouter } from 'vue-router'
|
5
5
|
import { useThemeConfig } from 'valaxy'
|
6
|
-
import { ElTimeline, ElTimelineItem } from 'element-plus'
|
6
|
+
import { ElTimeline, ElTimelineItem } from 'element-plus/es/components/timeline/index'
|
7
7
|
import { useCurrentCategory } from '../../hooks/useCategory'
|
8
8
|
import { useCategoryPost } from '../../hooks/useCategoryPost'
|
9
9
|
|
package/pages/tags/[tag].vue
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
2
|
import { computed, defineProps } from 'vue'
|
3
3
|
import { usePostList } from 'valaxy'
|
4
|
-
import { ElTimeline, ElTimelineItem } from 'element-plus'
|
4
|
+
import { ElTimeline, ElTimelineItem } from 'element-plus/es/components/timeline/index'
|
5
5
|
import 'element-plus/es/components/timeline/style/index'
|
6
6
|
import 'element-plus/es/components/timeline-item/style/index'
|
7
7
|
const props = defineProps<{
|