valaxy-theme-hairy 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/@types/markdown-it.d.ts +1 -0
- package/@types/markdown-toc.d.ts +1 -0
- package/@types/types.d.ts +1 -0
- package/@types/valaxy.d.ts +10 -0
- package/LICENSE +21 -0
- package/components/HairyAlgoliaSearchBox.vue +118 -0
- package/components/HairyArticleImage.vue +17 -0
- package/components/HairyArticleImageDefault.vue +127 -0
- package/components/HairyArticleImageSmall.vue +49 -0
- package/components/HairyArticleSeries.vue +73 -0
- package/components/HairyArticleText.vue +38 -0
- package/components/HairyArticleTop.vue +0 -0
- package/components/HairyBackToTop.vue +72 -0
- package/components/HairyBody.vue +55 -0
- package/components/HairyBreadcrumb.vue +51 -0
- package/components/HairyBreadcrumbItem.vue +14 -0
- package/components/HairyCarousel.vue +45 -0
- package/components/HairyDivider.vue +0 -0
- package/components/HairyHeader.vue +31 -0
- package/components/HairyImage.vue +14 -0
- package/components/HairyImageGroup.vue +69 -0
- package/components/HairyImageViewer.vue +22 -0
- package/components/HairyLayout.vue +29 -0
- package/components/HairyLink.vue +10 -0
- package/components/HairyMenu.vue +15 -0
- package/components/HairyMenuItem.vue +40 -0
- package/components/HairyMeting.vue +19 -0
- package/components/HairyNav.vue +39 -0
- package/components/HairyNavBackground.vue +7 -0
- package/components/HairyNavSearch.vue +265 -0
- package/components/HairyNavTitle.vue +13 -0
- package/components/HairyNavToggleDark.vue +16 -0
- package/components/HairyPostImageList.vue +28 -0
- package/components/HairyPostList.vue +24 -0
- package/components/HairyPostTitle.vue +33 -0
- package/components/HairySocialLinks.vue +27 -0
- package/components/HairyTimelinePostItem.vue +40 -0
- package/components/HairyToc.vue +135 -0
- package/components/HairyUserCard.vue +30 -0
- package/components/HairyUserNav.vue +68 -0
- package/components/HairyUserTab.vue +40 -0
- package/components/HairyWaline.vue +25 -0
- package/components/HairyWaves.vue +67 -0
- package/components/ValaxyMain.vue +45 -0
- package/hooks/useCategory.ts +18 -0
- package/hooks/useCategoryPost.ts +21 -0
- package/hooks/useContext.ts +16 -0
- package/hooks/useHeaderHeight.ts +9 -0
- package/hooks/usePostLayout.ts +9 -0
- package/hooks/useYearArchives.ts +43 -0
- package/images.json +101 -0
- package/index.d.ts +54 -0
- package/layouts/archives.vue +11 -0
- package/layouts/categories.vue +6 -0
- package/layouts/default.vue +9 -0
- package/layouts/home.vue +23 -0
- package/layouts/month.vue +6 -0
- package/layouts/post.vue +26 -0
- package/layouts/tag.vue +6 -0
- package/layouts/tags.vue +6 -0
- package/layouts/year.vue +6 -0
- package/locales/en.yml +1 -0
- package/locales/zh-CN.yml +3 -0
- package/modules/context.ts +5 -0
- package/modules/loading.scss +531 -0
- package/modules/loading.ts +42 -0
- package/modules/scroll.ts +21 -0
- package/node/addon-hairy.ts +18 -0
- package/node/addon-images.ts +61 -0
- package/node/addon-meting.ts +13 -0
- package/node/addon-statistics.ts +19 -0
- package/node/addon-toc.ts +20 -0
- package/node/utils.ts +20 -0
- package/package.json +47 -0
- package/pages/archives/[year]/[month]/index.vue +52 -0
- package/pages/archives/[year]/index.vue +73 -0
- package/pages/archives/index.vue +53 -0
- package/pages/categories/[...categories].vue +115 -0
- package/pages/index.vue +14 -0
- package/pages/tags/[tag].vue +40 -0
- package/pages/tags/index.vue +31 -0
- package/setup/main.ts +11 -0
- package/shims.d.ts +8 -0
- package/styles/css-vars.scss +161 -0
- package/styles/element-plus/index.scss +2 -0
- package/styles/element-plus/tabs.scss +26 -0
- package/styles/element-plus/timeline.scss +19 -0
- package/styles/font-face.scss +20 -0
- package/styles/fonts/FrederickatheGreat.ttf +0 -0
- package/styles/fonts/Modesty.ttf +0 -0
- package/styles/fonts/MountainsofChristmas-Bold.ttf +0 -0
- package/styles/fonts/MountainsofChristmas-Regular.ttf +0 -0
- package/styles/fonts/Seto.ttf +0 -0
- package/styles/index.scss +65 -0
- package/styles/markdown.scss +60 -0
- package/styles/scrollbar.scss +26 -0
- package/unocss.config.ts +29 -0
- package/utils/createContext.ts +40 -0
- package/utils/index.ts +28 -0
- package/utils/loading.scss +531 -0
- package/utils/loading.ts +30 -0
- package/valaxy.config.ts +26 -0
package/node/utils.ts
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
import { createDefu } from 'defu'
|
2
|
+
import isFunction from 'lodash/isFunction'
|
3
|
+
import { mergeConfig as mergeViteConfig } from 'vite'
|
4
|
+
/**
|
5
|
+
* merge valaxy.config
|
6
|
+
* (source, default)
|
7
|
+
*/
|
8
|
+
export const mergeValaxyConfig = createDefu((obj: any, key, value) => {
|
9
|
+
if (isFunction(obj[key]) || isFunction(value)) {
|
10
|
+
obj[key] = function (...args: any[]) {
|
11
|
+
obj[key]?.call(this, ...args)
|
12
|
+
value?.call(this, ...args)
|
13
|
+
}
|
14
|
+
}
|
15
|
+
if (key === 'vite') {
|
16
|
+
// a deep copy and needs to be taken over
|
17
|
+
obj[key] = mergeViteConfig(obj[key], value)
|
18
|
+
return true
|
19
|
+
}
|
20
|
+
})
|
package/package.json
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
{
|
2
|
+
"name": "valaxy-theme-hairy",
|
3
|
+
"version": "0.0.1",
|
4
|
+
"packageManager": "pnpm@7.5.0",
|
5
|
+
"author": {
|
6
|
+
"email": "wwu710632@gmail.com",
|
7
|
+
"name": "TuiMao233",
|
8
|
+
"url": "https://github.com/TuiMao233"
|
9
|
+
},
|
10
|
+
"homepage": "https://github.com/TuiMao233/valaxy-theme-hairy",
|
11
|
+
"repository": {
|
12
|
+
"type": "git",
|
13
|
+
"url": "https://github.com/TuiMao233/valaxy-theme-hairy"
|
14
|
+
},
|
15
|
+
"keywords": [
|
16
|
+
"valaxy",
|
17
|
+
"theme",
|
18
|
+
"vue"
|
19
|
+
],
|
20
|
+
"types": "index.d.ts",
|
21
|
+
"dependencies": {
|
22
|
+
"@docsearch/css": "^3.1.1",
|
23
|
+
"@docsearch/js": "^3.1.1",
|
24
|
+
"@hairy/libcore": "^0.3.0",
|
25
|
+
"@hairy/vue-use": "^1.2.0",
|
26
|
+
"@iconify-json/ant-design": "^1.1.3",
|
27
|
+
"@iconify-json/simple-icons": "^1.1.19",
|
28
|
+
"@vitejs/plugin-vue-jsx": "^2.0.0",
|
29
|
+
"@vueuse/core": "^8.9.4",
|
30
|
+
"@waline/client": "^2.6.1",
|
31
|
+
"defu": "^6.0.0",
|
32
|
+
"element-plus": "^2.2.10",
|
33
|
+
"furigana-markdown-it": "^1.0.3",
|
34
|
+
"lodash": "^4.17.21",
|
35
|
+
"markdown-toc": "^1.2.0",
|
36
|
+
"reading-time": "^1.5.0",
|
37
|
+
"swiper": "^8.3.1",
|
38
|
+
"unoverlay-vue": "0.2.1",
|
39
|
+
"valaxy-addon-images": "0.0.1",
|
40
|
+
"valaxy-addon-statistics": "0.0.1",
|
41
|
+
"yaml": "^2.1.1"
|
42
|
+
},
|
43
|
+
"devDependencies": {
|
44
|
+
"@types/lodash": "^4.14.182",
|
45
|
+
"@types/node": "^18.0.6"
|
46
|
+
}
|
47
|
+
}
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { ElTimeline, ElTimelineItem } from 'element-plus'
|
3
|
+
import 'element-plus/es/components/timeline/style/index'
|
4
|
+
import 'element-plus/es/components/timeline-item/style/index'
|
5
|
+
import { computed, defineProps } from 'vue'
|
6
|
+
import { useYearArchives } from '../../../../hooks/useYearArchives'
|
7
|
+
import { getArchiveLink } from '../../../../utils'
|
8
|
+
|
9
|
+
const props = defineProps<{
|
10
|
+
year: string
|
11
|
+
month: string
|
12
|
+
}>()
|
13
|
+
|
14
|
+
const activities = useYearArchives()
|
15
|
+
const months = computed(() =>
|
16
|
+
activities.value
|
17
|
+
.filter(item => item.year === props.year)
|
18
|
+
.filter(item => item.month === props.month),
|
19
|
+
)
|
20
|
+
const count = computed(() => months.value.reduce((total, value) => total + value.count, 0))
|
21
|
+
const post = computed(() => months.value.flatMap(item => item.posts))
|
22
|
+
</script>
|
23
|
+
|
24
|
+
<template>
|
25
|
+
<HairyBreadcrumb class="mb-5" size="large" :after="`归档(${count}篇)`">
|
26
|
+
<HairyBreadcrumbItem to="/archives/">
|
27
|
+
全部
|
28
|
+
</HairyBreadcrumbItem>
|
29
|
+
<HairyBreadcrumbItem :to="getArchiveLink(year)">
|
30
|
+
{{ year }}年
|
31
|
+
</HairyBreadcrumbItem>
|
32
|
+
<HairyBreadcrumbItem :to="getArchiveLink(year)">
|
33
|
+
{{ month }}月
|
34
|
+
</HairyBreadcrumbItem>
|
35
|
+
</HairyBreadcrumb>
|
36
|
+
|
37
|
+
<el-timeline>
|
38
|
+
<el-timeline-item
|
39
|
+
v-for="(item, index) in post"
|
40
|
+
:key="index"
|
41
|
+
hollow
|
42
|
+
size="large"
|
43
|
+
>
|
44
|
+
<HairyTimelinePostItem :post="item" />
|
45
|
+
</el-timeline-item>
|
46
|
+
</el-timeline>
|
47
|
+
</template>
|
48
|
+
|
49
|
+
<route lang="yaml">
|
50
|
+
meta:
|
51
|
+
layout: month
|
52
|
+
</route>
|
@@ -0,0 +1,73 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { ElTimeline, ElTimelineItem } from 'element-plus'
|
3
|
+
import 'element-plus/es/components/timeline/style/index'
|
4
|
+
import 'element-plus/es/components/timeline-item/style/index'
|
5
|
+
import { computed } from 'vue'
|
6
|
+
import type { Post } from 'valaxy'
|
7
|
+
import { useYearArchives } from '../../../hooks/useYearArchives'
|
8
|
+
import { getArchiveLink } from '../../../utils'
|
9
|
+
interface TimeLineItem extends Post {
|
10
|
+
type: 'link' | 'post'
|
11
|
+
month: string
|
12
|
+
link: string
|
13
|
+
count: number
|
14
|
+
}
|
15
|
+
const props = defineProps<{
|
16
|
+
year: string
|
17
|
+
}>()
|
18
|
+
|
19
|
+
const activities = useYearArchives()
|
20
|
+
const filterYear = computed(() => activities.value.filter(item => item.year === props.year))
|
21
|
+
const timelines = computed(() => {
|
22
|
+
const timeLines: Partial<TimeLineItem>[] = []
|
23
|
+
for (const { year, count, month, posts } of filterYear.value) {
|
24
|
+
timeLines.push({
|
25
|
+
type: 'link',
|
26
|
+
month,
|
27
|
+
count,
|
28
|
+
link: getArchiveLink(year, month),
|
29
|
+
})
|
30
|
+
for (const post of posts)
|
31
|
+
timeLines.push({ ...post, type: 'post' })
|
32
|
+
}
|
33
|
+
return timeLines as TimeLineItem[]
|
34
|
+
})
|
35
|
+
</script>
|
36
|
+
|
37
|
+
<template>
|
38
|
+
<HairyBreadcrumb class="mb-5" size="large" after="归档">
|
39
|
+
<HairyBreadcrumbItem to="/archives/">
|
40
|
+
全部
|
41
|
+
</HairyBreadcrumbItem>
|
42
|
+
<HairyBreadcrumbItem>
|
43
|
+
{{ year }}年
|
44
|
+
</HairyBreadcrumbItem>
|
45
|
+
</HairyBreadcrumb>
|
46
|
+
|
47
|
+
<el-timeline>
|
48
|
+
<template v-for="(item, index) in timelines" :key="index">
|
49
|
+
<el-timeline-item
|
50
|
+
v-if="item.type === 'link'"
|
51
|
+
hollow
|
52
|
+
:index="index"
|
53
|
+
size="large"
|
54
|
+
>
|
55
|
+
<HairyLink @click="$router.push(getArchiveLink(year, item.month))">
|
56
|
+
{{ item.month }}月
|
57
|
+
</HairyLink>
|
58
|
+
</el-timeline-item>
|
59
|
+
<el-timeline-item
|
60
|
+
v-else
|
61
|
+
hollow
|
62
|
+
size="normal"
|
63
|
+
>
|
64
|
+
<HairyTimelinePostItem :post="item" />
|
65
|
+
</el-timeline-item>
|
66
|
+
</template>
|
67
|
+
</el-timeline>
|
68
|
+
</template>
|
69
|
+
|
70
|
+
<route lang="yaml">
|
71
|
+
meta:
|
72
|
+
layout: year
|
73
|
+
</route>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { ElTimeline, ElTimelineItem } from 'element-plus'
|
3
|
+
import { usePostList } from 'valaxy'
|
4
|
+
import 'element-plus/es/components/timeline/style/index'
|
5
|
+
import 'element-plus/es/components/timeline-item/style/index'
|
6
|
+
import { useYearArchives } from '../../hooks/useYearArchives'
|
7
|
+
import { getArchiveLink } from '../../utils'
|
8
|
+
const activities = useYearArchives()
|
9
|
+
const posts = usePostList()
|
10
|
+
</script>
|
11
|
+
|
12
|
+
<template>
|
13
|
+
<HairyBreadcrumb class="mb-5" size="large" after="归档">
|
14
|
+
<HairyBreadcrumbItem to="/">
|
15
|
+
首页
|
16
|
+
</HairyBreadcrumbItem>
|
17
|
+
<HairyBreadcrumbItem>
|
18
|
+
目前共计 {{ posts.length }} 篇文章
|
19
|
+
</HairyBreadcrumbItem>
|
20
|
+
</HairyBreadcrumb>
|
21
|
+
<el-timeline>
|
22
|
+
<el-timeline-item
|
23
|
+
v-for="(activity, index) in activities"
|
24
|
+
:key="index"
|
25
|
+
hollow
|
26
|
+
size="large"
|
27
|
+
>
|
28
|
+
<div class="activity inline-flex items-center">
|
29
|
+
<HairyLink @click="$router.push(getArchiveLink(activity.year))">
|
30
|
+
{{ activity.year }}
|
31
|
+
</HairyLink>
|
32
|
+
<span class="text-gray-5 text-size-5 mx-2">/</span>
|
33
|
+
<HairyLink @click="$router.push(getArchiveLink(activity.year, activity.month))">
|
34
|
+
{{ activity.month }}
|
35
|
+
</HairyLink>
|
36
|
+
<span class="text-gray-5 text-size-5 ml-1">({{ activity.count }}篇)</span>
|
37
|
+
</div>
|
38
|
+
</el-timeline-item>
|
39
|
+
</el-timeline>
|
40
|
+
</template>
|
41
|
+
|
42
|
+
<route lang="yaml">
|
43
|
+
meta:
|
44
|
+
layout: archives
|
45
|
+
</route>
|
46
|
+
|
47
|
+
<style lang="scss" scoped>
|
48
|
+
.activity:hover {
|
49
|
+
.HairyLink {
|
50
|
+
color: var(--hy-c-primary);
|
51
|
+
}
|
52
|
+
}
|
53
|
+
</style>
|
@@ -0,0 +1,115 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { computed } from 'vue'
|
3
|
+
import { useI18n } from 'vue-i18n'
|
4
|
+
import { useRouter } from 'vue-router'
|
5
|
+
import { useThemeConfig } from 'valaxy'
|
6
|
+
import { ElTimeline, ElTimelineItem } from 'element-plus'
|
7
|
+
import { useCurrentCategory } from '../../hooks/useCategory'
|
8
|
+
import { useCategoryPost } from '../../hooks/useCategoryPost'
|
9
|
+
|
10
|
+
import { usePostLayout } from '../../hooks/usePostLayout'
|
11
|
+
import type { HairyTheme } from '../..'
|
12
|
+
import 'element-plus/es/components/timeline/style/index'
|
13
|
+
import 'element-plus/es/components/timeline-item/style/index'
|
14
|
+
const props = defineProps<{
|
15
|
+
categories: string
|
16
|
+
}>()
|
17
|
+
const layout = usePostLayout()
|
18
|
+
const themeConfig = useThemeConfig<HairyTheme>()
|
19
|
+
const categoriesLayout = computed(() => themeConfig.value.categories?.layout || 'post')
|
20
|
+
|
21
|
+
const router = useRouter()
|
22
|
+
|
23
|
+
const paths = computed(() => props.categories.split('/').filter(Boolean))
|
24
|
+
const current = useCurrentCategory(paths)
|
25
|
+
|
26
|
+
const posts = useCategoryPost(paths)
|
27
|
+
|
28
|
+
const i18n = useI18n()
|
29
|
+
|
30
|
+
const getBreadcrumbPath = (index: number) => {
|
31
|
+
if (paths.value[index] === paths.value[paths.value.length - 1])
|
32
|
+
return ''
|
33
|
+
return `/categories/${paths.value.slice(0, index)}`
|
34
|
+
}
|
35
|
+
const displayCategory = (key: string) => {
|
36
|
+
router.push({ path: `/categories/${[...paths.value, key].join('/')}` })
|
37
|
+
}
|
38
|
+
</script>
|
39
|
+
|
40
|
+
<template>
|
41
|
+
<HairyBreadcrumb class="mb-5" size="large" after="分类">
|
42
|
+
<HairyBreadcrumbItem to="/">
|
43
|
+
首页
|
44
|
+
</HairyBreadcrumbItem>
|
45
|
+
<HairyBreadcrumbItem :to="paths.length && '/categories/' || ''">
|
46
|
+
全部
|
47
|
+
</HairyBreadcrumbItem>
|
48
|
+
<HairyBreadcrumbItem v-for="(key, index) in paths" :key="key" :to="getBreadcrumbPath(index)">
|
49
|
+
{{ i18n.t(key) }}
|
50
|
+
</HairyBreadcrumbItem>
|
51
|
+
</HairyBreadcrumb>
|
52
|
+
<div class="grid__view dark:text-gray-3 flex-wrap">
|
53
|
+
<template v-for="([key, item]) in current.children" :key="key">
|
54
|
+
<div
|
55
|
+
class="relative flex items-center flex-col cursor-pointer hover:text-primary transition-color"
|
56
|
+
@click="displayCategory(key)"
|
57
|
+
>
|
58
|
+
<div class="i-ri-folder-open-line text-22 lt-sm:text-15" />
|
59
|
+
<div class="text-center leading-normal">
|
60
|
+
{{ i18n.t(key) }}
|
61
|
+
</div>
|
62
|
+
<div class="badge">
|
63
|
+
{{ item.total }}
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
</template>
|
67
|
+
</div>
|
68
|
+
<div class="border-t border-gray-200 dark:border-gray-500 mt-5" />
|
69
|
+
|
70
|
+
<el-timeline v-if="categoriesLayout === 'timeline'" class="pt-5 pl-10">
|
71
|
+
<el-timeline-item v-for="(item, index) in posts" :key="index" hollow size="large">
|
72
|
+
<HairyTimelinePostItem :post="item" />
|
73
|
+
</el-timeline-item>
|
74
|
+
</el-timeline>
|
75
|
+
<template v-else>
|
76
|
+
<HairyPostImageList v-if="layout.includes('image')" :posts="posts" />
|
77
|
+
<HairyPostList v-else :posts="posts" />
|
78
|
+
</template>
|
79
|
+
</template>
|
80
|
+
|
81
|
+
<style lang="scss" scoped>
|
82
|
+
.badge {
|
83
|
+
position: absolute;
|
84
|
+
right: 0.8rem;
|
85
|
+
top: 0.5rem;
|
86
|
+
padding-left: 6px;
|
87
|
+
padding-top: 2px;
|
88
|
+
padding-bottom: 2px;
|
89
|
+
padding-right: 6px;
|
90
|
+
|
91
|
+
line-height: normal;
|
92
|
+
border-radius: 50%;
|
93
|
+
background-color: #f56c6c;
|
94
|
+
color: #fff;
|
95
|
+
}
|
96
|
+
|
97
|
+
.grid__view {
|
98
|
+
display: grid;
|
99
|
+
grid-template-columns: repeat(auto-fill, 7.5rem);
|
100
|
+
gap: 3rem;
|
101
|
+
|
102
|
+
@media (max-width: 640px) {
|
103
|
+
grid-template-columns: repeat(auto-fill, 6.5rem);
|
104
|
+
}
|
105
|
+
|
106
|
+
&>* {
|
107
|
+
height: var(--height);
|
108
|
+
}
|
109
|
+
}
|
110
|
+
</style>
|
111
|
+
|
112
|
+
<route lang="yaml">
|
113
|
+
meta:
|
114
|
+
layout: categories
|
115
|
+
</route>
|
package/pages/index.vue
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { usePostLayout } from '../hooks/usePostLayout'
|
3
|
+
const layout = usePostLayout()
|
4
|
+
</script>
|
5
|
+
|
6
|
+
<template>
|
7
|
+
<HairyPostImageList v-if="layout.includes('image')" />
|
8
|
+
<HairyPostList v-else />
|
9
|
+
</template>
|
10
|
+
|
11
|
+
<route lang="yaml">
|
12
|
+
meta:
|
13
|
+
layout: home
|
14
|
+
</route>
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { computed, defineProps } from 'vue'
|
3
|
+
import { usePostList } from 'valaxy'
|
4
|
+
import { ElTimeline, ElTimelineItem } from 'element-plus'
|
5
|
+
import 'element-plus/es/components/timeline/style/index'
|
6
|
+
import 'element-plus/es/components/timeline-item/style/index'
|
7
|
+
const props = defineProps<{
|
8
|
+
tag: string
|
9
|
+
}>()
|
10
|
+
|
11
|
+
const posts = usePostList()
|
12
|
+
|
13
|
+
const tagPosts = computed<any[]>(() => posts.value.filter(post => post.tags?.includes(props.tag)))
|
14
|
+
</script>
|
15
|
+
|
16
|
+
<template>
|
17
|
+
<HairyBreadcrumb class="mb-5" size="large" after="标签">
|
18
|
+
<HairyBreadcrumbItem to="/">
|
19
|
+
首页
|
20
|
+
</HairyBreadcrumbItem>
|
21
|
+
<HairyBreadcrumbItem>
|
22
|
+
{{ tag }}
|
23
|
+
</HairyBreadcrumbItem>
|
24
|
+
</HairyBreadcrumb>
|
25
|
+
<el-timeline>
|
26
|
+
<el-timeline-item
|
27
|
+
v-for="(item, index) in tagPosts"
|
28
|
+
:key="index"
|
29
|
+
hollow
|
30
|
+
size="large"
|
31
|
+
>
|
32
|
+
<HairyTimelinePostItem :post="item" />
|
33
|
+
</el-timeline-item>
|
34
|
+
</el-timeline>
|
35
|
+
</template>
|
36
|
+
|
37
|
+
<route lang="yaml">
|
38
|
+
meta:
|
39
|
+
layout: tag
|
40
|
+
</route>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { useTags } from 'valaxy'
|
3
|
+
import { useRouter } from 'vue-router'
|
4
|
+
const router = useRouter()
|
5
|
+
|
6
|
+
const { tags, getTagStyle } = useTags({
|
7
|
+
primary: 'red',
|
8
|
+
})
|
9
|
+
|
10
|
+
const displayTag = (tag: string) => {
|
11
|
+
router.push(`/tags/${tag}`)
|
12
|
+
}
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<template>
|
16
|
+
<div class="inset-0 h-full flex-center flex-col">
|
17
|
+
<div text="center" class="text-size-2.5em pt-10 mb-5">
|
18
|
+
目前共计 {{ Array.from(tags).length }} 个标签
|
19
|
+
</div>
|
20
|
+
<div text="center">
|
21
|
+
<a v-for="[key, tag] in Array.from(tags).sort()" :key="key" class="post-tag cursor-pointer" :style="getTagStyle(tag.count)" p="1" @click="displayTag(key.toString())">
|
22
|
+
{{ key }}
|
23
|
+
</a>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
</template>
|
27
|
+
|
28
|
+
<route lang="yaml">
|
29
|
+
meta:
|
30
|
+
layout: tags
|
31
|
+
</route>
|
package/setup/main.ts
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
import { defineAppSetup } from 'valaxy'
|
2
|
+
|
3
|
+
// import { install as installScroll } from '../modules/scroll'
|
4
|
+
import { install as installLoading } from '../modules/loading'
|
5
|
+
import { install as installContext } from '../modules/context'
|
6
|
+
|
7
|
+
export default defineAppSetup((ctx) => {
|
8
|
+
// installScroll(ctx)
|
9
|
+
installLoading(ctx)
|
10
|
+
installContext(ctx)
|
11
|
+
})
|
package/shims.d.ts
ADDED
@@ -0,0 +1,161 @@
|
|
1
|
+
:root {
|
2
|
+
--hy-c-primary: #1bc9a6;
|
3
|
+
--hy-c-primary-light: #14d6af;
|
4
|
+
--hy-c-primary-lighter: #15e8be;
|
5
|
+
--hy-c-primary-dark: #1aaa8d;
|
6
|
+
--hy-c-primary-darker: #0b755f;
|
7
|
+
--hy-c-primary-dimm-1: rgba(27, 201, 166, 0.5);
|
8
|
+
--hy-c-primary-dimm-2: rgba(27, 201, 166, 0.25);
|
9
|
+
--hy-c-primary-dimm-3: rgba(27, 201, 166, 0.05);
|
10
|
+
|
11
|
+
--hy-c-black: #1a1a1a;
|
12
|
+
--hy-c-black-pure: #000000;
|
13
|
+
--hy-c-black-soft: #242424;
|
14
|
+
--hy-c-black-mute: #2f2f2f;
|
15
|
+
|
16
|
+
--hy-c-white: #ffffff;
|
17
|
+
--hy-c-white-soft: #f9f9f9;
|
18
|
+
--hy-c-white-mute: #f1f1f1;
|
19
|
+
|
20
|
+
--hy-c-gray: #8e8e8e;
|
21
|
+
--hy-c-gray-light-1: #aeaeae;
|
22
|
+
--hy-c-gray-light-2: #c7c7c7;
|
23
|
+
--hy-c-gray-light-3: #d1d1d1;
|
24
|
+
--hy-c-gray-light-4: #e5e5e5;
|
25
|
+
--hy-c-gray-light-5: #f2f2f2;
|
26
|
+
--hy-c-gray-dark-1: #636363;
|
27
|
+
--hy-c-gray-dark-2: #484848;
|
28
|
+
--hy-c-gray-dark-3: #3a3a3a;
|
29
|
+
--hy-c-gray-dark-4: #282828;
|
30
|
+
--hy-c-gray-dark-5: #202020;
|
31
|
+
|
32
|
+
--hy-c-divider-light-1: rgba(60, 60, 60, 0.29);
|
33
|
+
--hy-c-divider-light-2: rgba(60, 60, 60, 0.12);
|
34
|
+
--hy-c-divider-dark-1: rgba(84, 84, 84, 0.65);
|
35
|
+
--hy-c-divider-dark-2: rgba(84, 84, 84, 0.48);
|
36
|
+
|
37
|
+
--hy-c-text-light-1: var(--hy-c-indigo);
|
38
|
+
--hy-c-text-light-2: rgba(60, 60, 60, 0.70);
|
39
|
+
--hy-c-text-light-3: rgba(60, 60, 60, 0.33);
|
40
|
+
--hy-c-text-light-4: rgba(60, 60, 60, 0.18);
|
41
|
+
|
42
|
+
--hy-c-text-dark-1: rgba(255, 255, 255, 0.87);
|
43
|
+
--hy-c-text-dark-2: rgba(235, 235, 235, 0.60);
|
44
|
+
--hy-c-text-dark-3: rgba(235, 235, 235, 0.38);
|
45
|
+
--hy-c-text-dark-4: rgba(235, 235, 235, 0.18);
|
46
|
+
|
47
|
+
--hy-c-indigo: #213547;
|
48
|
+
--hy-c-indigo-soft: #476582;
|
49
|
+
--hy-c-indigo-light: #aac8e4;
|
50
|
+
--hy-c-indigo-lighter: #c9def1;
|
51
|
+
--hy-c-indigo-dark: #1d2f3f;
|
52
|
+
--hy-c-indigo-darker: #14212e;
|
53
|
+
}
|
54
|
+
|
55
|
+
.dark {
|
56
|
+
--hy-c-primary: #8fe6d5;
|
57
|
+
--hy-c-primary-light: #a8ffee;
|
58
|
+
--hy-c-primary-lighter: #bafef1;
|
59
|
+
--hy-c-primary-dark: #66ccb8;
|
60
|
+
--hy-c-primary-darker: #24a188;
|
61
|
+
--hy-c-primary-dimm-1: rgba(143, 230, 213, 0.5);
|
62
|
+
--hy-c-primary-dimm-2: rgba(143, 230, 213, 0.25);
|
63
|
+
--hy-c-primary-dimm-3: rgba(143, 230, 213, 0.05);
|
64
|
+
}
|
65
|
+
|
66
|
+
:root {
|
67
|
+
--hy-c-waves-dimm: var(--va-c-bg);
|
68
|
+
--hy-c-waves-dimm-1: rgba(255, 255, 255, 0.7);
|
69
|
+
--hy-c-waves-dimm-2: rgba(255, 255, 255, 0.5);
|
70
|
+
--hy-c-waves-dimm-3: rgba(255, 255, 255, 0.3);
|
71
|
+
}
|
72
|
+
|
73
|
+
.dark {
|
74
|
+
--hy-c-waves-dimm-1: rgba(34, 34, 34, 0.7);
|
75
|
+
--hy-c-waves-dimm-2: rgba(34, 34, 34, 0.5);
|
76
|
+
--hy-c-waves-dimm-3: rgba(34, 34, 34, 0.3);
|
77
|
+
}
|
78
|
+
|
79
|
+
/**
|
80
|
+
* Typography
|
81
|
+
* -------------------------------------------------------------------------- */
|
82
|
+
|
83
|
+
:root {
|
84
|
+
--hy-font-family-seto: Seto;
|
85
|
+
--hy-font-family-modesty: Modesty;
|
86
|
+
--hy-font-family-christmas: MountainsofChristmas;
|
87
|
+
--hy-font-family-frederick: FrederickatheGreat;
|
88
|
+
}
|
89
|
+
|
90
|
+
/**
|
91
|
+
* Colors Theme
|
92
|
+
* -------------------------------------------------------------------------- */
|
93
|
+
|
94
|
+
:root {
|
95
|
+
--hy-c-bg: var(--hy-c-white);
|
96
|
+
--hy-c-bg-soft: var(--hy-c-white-soft);
|
97
|
+
--hy-c-bg-mute: var(--hy-c-white-mute);
|
98
|
+
--hy-c-bg-alt: var(--hy-c-white-soft);
|
99
|
+
|
100
|
+
--hy-c-divider: var(--hy-c-divider-light-1);
|
101
|
+
--hy-c-divider-light: var(--hy-c-divider-light-2);
|
102
|
+
|
103
|
+
--hy-c-divider-inverse: var(--hy-c-divider-dark-1);
|
104
|
+
--hy-c-divider-inverse-light: var(--hy-c-divider-dark-2);
|
105
|
+
|
106
|
+
--hy-c-text-1: var(--hy-c-text-light-1);
|
107
|
+
--hy-c-text-2: var(--hy-c-text-light-2);
|
108
|
+
--hy-c-text-3: var(--hy-c-text-light-3);
|
109
|
+
--hy-c-text-4: var(--hy-c-text-light-4);
|
110
|
+
|
111
|
+
--hy-c-text-inverse-1: var(--hy-c-text-dark-1);
|
112
|
+
--hy-c-text-inverse-2: var(--hy-c-text-dark-2);
|
113
|
+
--hy-c-text-inverse-3: var(--hy-c-text-dark-3);
|
114
|
+
--hy-c-text-inverse-4: var(--hy-c-text-dark-4);
|
115
|
+
|
116
|
+
--hy-c-text-code: var(--hy-c-indigo-soft);
|
117
|
+
|
118
|
+
--hy-c-brand: var(--hy-c-primary);
|
119
|
+
--hy-c-brand-light: var(--hy-c-primary-light);
|
120
|
+
--hy-c-brand-lighter: var(--hy-c-primary-lighter);
|
121
|
+
--hy-c-brand-dark: var(--hy-c-primary-dark);
|
122
|
+
--hy-c-brand-darker: var(--hy-c-primary-darker);
|
123
|
+
|
124
|
+
--va-c-brand: var(--hy-c-brand);
|
125
|
+
|
126
|
+
--hy-c-sponsor: #fd1d7c;
|
127
|
+
}
|
128
|
+
|
129
|
+
.dark {
|
130
|
+
--hy-c-bg: var(--hy-c-black-soft);
|
131
|
+
--hy-c-bg-soft: var(--hy-c-black-mute);
|
132
|
+
--hy-c-bg-mute: var(--hy-c-gray-dark-3);
|
133
|
+
--hy-c-bg-alt: var(--hy-c-black);
|
134
|
+
|
135
|
+
--hy-c-divider: var(--hy-c-divider-dark-1);
|
136
|
+
--hy-c-divider-light: var(--hy-c-divider-dark-2);
|
137
|
+
|
138
|
+
--hy-c-divider-inverse: var(--hy-c-divider-light-1);
|
139
|
+
--hy-c-divider-inverse-light: var(--hy-c-divider-light-2);
|
140
|
+
|
141
|
+
--hy-c-text-1: var(--hy-c-text-dark-1);
|
142
|
+
--hy-c-text-2: var(--hy-c-text-dark-2);
|
143
|
+
--hy-c-text-3: var(--hy-c-text-dark-3);
|
144
|
+
--hy-c-text-4: var(--hy-c-text-dark-4);
|
145
|
+
|
146
|
+
--hy-c-text-inverse-1: var(--hy-c-text-light-1);
|
147
|
+
--hy-c-text-inverse-2: var(--hy-c-text-light-2);
|
148
|
+
--hy-c-text-inverse-3: var(--hy-c-text-light-3);
|
149
|
+
--hy-c-text-inverse-4: var(--hy-c-text-light-4);
|
150
|
+
|
151
|
+
--hy-c-text-code: var(--hy-c-indigo-lighter);
|
152
|
+
}
|
153
|
+
|
154
|
+
/**
|
155
|
+
* element-plus Theme
|
156
|
+
* -------------------------------------------------------------------------- */
|
157
|
+
|
158
|
+
:root {
|
159
|
+
--el-color-primary: var(--hy-c-primary) !important;
|
160
|
+
--el-text-color-primary: var(--hy-c-text-2) !important;
|
161
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
.el-tabs__nav-wrap::after {
|
2
|
+
@apply bg-gray-200;
|
3
|
+
}
|
4
|
+
|
5
|
+
.dark .el-tabs__nav-wrap::after {
|
6
|
+
@apply bg-gray-500;
|
7
|
+
}
|
8
|
+
|
9
|
+
.el-tabs {
|
10
|
+
|
11
|
+
.el-tabs__active-bar,
|
12
|
+
.el-tabs__nav-wrap::after {
|
13
|
+
height: 1px;
|
14
|
+
}
|
15
|
+
|
16
|
+
.el-tabs__item {
|
17
|
+
@apply transition-colors;
|
18
|
+
padding: 0 10px;
|
19
|
+
}
|
20
|
+
|
21
|
+
.el-tabs__nav-scroll {
|
22
|
+
display: flex;
|
23
|
+
justify-content: center;
|
24
|
+
}
|
25
|
+
|
26
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
.el-timeline {
|
2
|
+
.el-timeline-item__content {
|
3
|
+
display: inline-block;
|
4
|
+
color: initial;
|
5
|
+
line-height: 1;
|
6
|
+
font-size: 1.5rem;
|
7
|
+
|
8
|
+
@media (max-width: 1200px) {
|
9
|
+
font-size: 1.3rem;
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
.el-timeline-item__wrapper {}
|
14
|
+
|
15
|
+
.el-timeline-item__node--normal,
|
16
|
+
.el-timeline-item__tail {
|
17
|
+
top: 4px;
|
18
|
+
}
|
19
|
+
}
|