valaxy-theme-hairy 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. package/@types/markdown-it.d.ts +1 -0
  2. package/@types/markdown-toc.d.ts +1 -0
  3. package/@types/types.d.ts +1 -0
  4. package/@types/valaxy.d.ts +10 -0
  5. package/LICENSE +21 -0
  6. package/components/HairyAlgoliaSearchBox.vue +118 -0
  7. package/components/HairyArticleImage.vue +17 -0
  8. package/components/HairyArticleImageDefault.vue +127 -0
  9. package/components/HairyArticleImageSmall.vue +49 -0
  10. package/components/HairyArticleSeries.vue +73 -0
  11. package/components/HairyArticleText.vue +38 -0
  12. package/components/HairyArticleTop.vue +0 -0
  13. package/components/HairyBackToTop.vue +72 -0
  14. package/components/HairyBody.vue +55 -0
  15. package/components/HairyBreadcrumb.vue +51 -0
  16. package/components/HairyBreadcrumbItem.vue +14 -0
  17. package/components/HairyCarousel.vue +45 -0
  18. package/components/HairyDivider.vue +0 -0
  19. package/components/HairyHeader.vue +31 -0
  20. package/components/HairyImage.vue +14 -0
  21. package/components/HairyImageGroup.vue +69 -0
  22. package/components/HairyImageViewer.vue +22 -0
  23. package/components/HairyLayout.vue +29 -0
  24. package/components/HairyLink.vue +10 -0
  25. package/components/HairyMenu.vue +15 -0
  26. package/components/HairyMenuItem.vue +40 -0
  27. package/components/HairyMeting.vue +19 -0
  28. package/components/HairyNav.vue +39 -0
  29. package/components/HairyNavBackground.vue +7 -0
  30. package/components/HairyNavSearch.vue +265 -0
  31. package/components/HairyNavTitle.vue +13 -0
  32. package/components/HairyNavToggleDark.vue +16 -0
  33. package/components/HairyPostImageList.vue +28 -0
  34. package/components/HairyPostList.vue +24 -0
  35. package/components/HairyPostTitle.vue +33 -0
  36. package/components/HairySocialLinks.vue +27 -0
  37. package/components/HairyTimelinePostItem.vue +40 -0
  38. package/components/HairyToc.vue +135 -0
  39. package/components/HairyUserCard.vue +30 -0
  40. package/components/HairyUserNav.vue +68 -0
  41. package/components/HairyUserTab.vue +40 -0
  42. package/components/HairyWaline.vue +25 -0
  43. package/components/HairyWaves.vue +67 -0
  44. package/components/ValaxyMain.vue +45 -0
  45. package/hooks/useCategory.ts +18 -0
  46. package/hooks/useCategoryPost.ts +21 -0
  47. package/hooks/useContext.ts +16 -0
  48. package/hooks/useHeaderHeight.ts +9 -0
  49. package/hooks/usePostLayout.ts +9 -0
  50. package/hooks/useYearArchives.ts +43 -0
  51. package/images.json +101 -0
  52. package/index.d.ts +54 -0
  53. package/layouts/archives.vue +11 -0
  54. package/layouts/categories.vue +6 -0
  55. package/layouts/default.vue +9 -0
  56. package/layouts/home.vue +23 -0
  57. package/layouts/month.vue +6 -0
  58. package/layouts/post.vue +26 -0
  59. package/layouts/tag.vue +6 -0
  60. package/layouts/tags.vue +6 -0
  61. package/layouts/year.vue +6 -0
  62. package/locales/en.yml +1 -0
  63. package/locales/zh-CN.yml +3 -0
  64. package/modules/context.ts +5 -0
  65. package/modules/loading.scss +531 -0
  66. package/modules/loading.ts +42 -0
  67. package/modules/scroll.ts +21 -0
  68. package/node/addon-hairy.ts +18 -0
  69. package/node/addon-images.ts +61 -0
  70. package/node/addon-meting.ts +13 -0
  71. package/node/addon-statistics.ts +19 -0
  72. package/node/addon-toc.ts +20 -0
  73. package/node/utils.ts +20 -0
  74. package/package.json +47 -0
  75. package/pages/archives/[year]/[month]/index.vue +52 -0
  76. package/pages/archives/[year]/index.vue +73 -0
  77. package/pages/archives/index.vue +53 -0
  78. package/pages/categories/[...categories].vue +115 -0
  79. package/pages/index.vue +14 -0
  80. package/pages/tags/[tag].vue +40 -0
  81. package/pages/tags/index.vue +31 -0
  82. package/setup/main.ts +11 -0
  83. package/shims.d.ts +8 -0
  84. package/styles/css-vars.scss +161 -0
  85. package/styles/element-plus/index.scss +2 -0
  86. package/styles/element-plus/tabs.scss +26 -0
  87. package/styles/element-plus/timeline.scss +19 -0
  88. package/styles/font-face.scss +20 -0
  89. package/styles/fonts/FrederickatheGreat.ttf +0 -0
  90. package/styles/fonts/Modesty.ttf +0 -0
  91. package/styles/fonts/MountainsofChristmas-Bold.ttf +0 -0
  92. package/styles/fonts/MountainsofChristmas-Regular.ttf +0 -0
  93. package/styles/fonts/Seto.ttf +0 -0
  94. package/styles/index.scss +65 -0
  95. package/styles/markdown.scss +60 -0
  96. package/styles/scrollbar.scss +26 -0
  97. package/unocss.config.ts +29 -0
  98. package/utils/createContext.ts +40 -0
  99. package/utils/index.ts +28 -0
  100. package/utils/loading.scss +531 -0
  101. package/utils/loading.ts +30 -0
  102. package/valaxy.config.ts +26 -0
package/images.json ADDED
@@ -0,0 +1,101 @@
1
+ [
2
+ "https://tva2.sinaimg.cn/large/6833939bly1giciryrr3rj20zk0m8nhk.jpg",
3
+ "https://tva2.sinaimg.cn/large/6833939bly1gicis081o9j20zk0m8dmr.jpg",
4
+ "https://tva2.sinaimg.cn/large/6833939bly1gicis3attqj20zk0m8k7l.jpg",
5
+ "https://tva2.sinaimg.cn/large/6833939bly1giciszlczyj20zk0m816d.jpg",
6
+ "https://tva2.sinaimg.cn/large/6833939bly1gicit31ffoj20zk0m8naf.jpg",
7
+ "https://tva2.sinaimg.cn/large/6833939bly1gicit4jrvuj20zk0m8785.jpg",
8
+ "https://tva2.sinaimg.cn/large/6833939bly1gicitcxhpij20zk0m8hdt.jpg",
9
+ "https://tva2.sinaimg.cn/large/6833939bly1gicitf0kl1j20zk0m87fe.jpg",
10
+ "https://tva2.sinaimg.cn/large/6833939bly1gicitht3xtj20zk0m8k5v.jpg",
11
+ "https://tva2.sinaimg.cn/large/6833939bly1gicitspjpbj20zk0m81ky.jpg",
12
+ "https://tva2.sinaimg.cn/large/6833939bly1gicitzannuj20zk0m8b29.jpg",
13
+ "https://tva2.sinaimg.cn/large/6833939bly1giciub8ja1j20zk0m81ky.jpg",
14
+ "https://tva2.sinaimg.cn/large/6833939bly1giciuja1j1j20zk0m8kjl.jpg",
15
+ "https://tva2.sinaimg.cn/large/6833939bly1giciukx8a7j20zk0m8aio.jpg",
16
+ "https://tva2.sinaimg.cn/large/6833939bly1giciundwu5j20zk0m8n9e.jpg",
17
+ "https://tva2.sinaimg.cn/large/6833939bly1giciusoyjnj219g0u0x56.jpg",
18
+ "https://tva2.sinaimg.cn/large/6833939bly1giciuv0socj20zk0m8qes.jpg",
19
+ "https://tva2.sinaimg.cn/large/6833939bly1gicivghyooj20zk0m8dir.jpg",
20
+ "https://tva2.sinaimg.cn/large/6833939bly1giclfb3vzhj20zk0m8wny.jpg",
21
+ "https://tva2.sinaimg.cn/large/6833939bly1giclfdu6exj20zk0m87hw.jpg",
22
+ "https://tva2.sinaimg.cn/large/6833939bly1giclffsa1cj20zk0m811l.jpg",
23
+ "https://tva2.sinaimg.cn/large/6833939bly1giclflwv2aj20zk0m84qp.jpg",
24
+ "https://tva2.sinaimg.cn/large/6833939bly1giclfw2t96j20zk0m8x6p.jpg",
25
+ "https://tva2.sinaimg.cn/large/6833939bly1giclg5ms2rj20zk0m8u0x.jpg",
26
+ "https://tva2.sinaimg.cn/large/6833939bly1giclga70tsj20zk0m84mr.jpg",
27
+ "https://tva2.sinaimg.cn/large/6833939bly1giclgi503lj20zk0m8hdt.jpg",
28
+ "https://tva2.sinaimg.cn/large/6833939bly1giclgrvbd6j20zk0m8qv5.jpg",
29
+ "https://tva2.sinaimg.cn/large/6833939bly1giclh0m9pdj20zk0m8hdt.jpg",
30
+ "https://tva2.sinaimg.cn/large/6833939bly1giclh3brzpj20zk0m8ann.jpg",
31
+ "https://tva2.sinaimg.cn/large/6833939bly1giclh5u05ej20zk0m87df.jpg",
32
+ "https://tva2.sinaimg.cn/large/6833939bly1giclhfehz7j20zk0m8u0x.jpg",
33
+ "https://tva2.sinaimg.cn/large/6833939bly1giclhnx9glj20zk0m8npd.jpg",
34
+ "https://tva2.sinaimg.cn/large/6833939bly1giclhpw3lwj20zk0m8gvw.jpg",
35
+ "https://tva2.sinaimg.cn/large/6833939bly1giclhtuo6nj20zk0m8ttm.jpg",
36
+ "https://tva2.sinaimg.cn/large/6833939bly1gicli3sbvtj20zk0m8x6p.jpg",
37
+ "https://tva2.sinaimg.cn/large/6833939bly1gicli9lfebj20zk0m84qp.jpg",
38
+ "https://tva2.sinaimg.cn/large/6833939bly1gicliierfjj20zk0m8npd.jpg",
39
+ "https://tva2.sinaimg.cn/large/6833939bly1giclil3m4ej20zk0m8tn8.jpg",
40
+ "https://tva2.sinaimg.cn/large/6833939bly1giclimtf7dj20zk0m8qav.jpg",
41
+ "https://tva2.sinaimg.cn/large/6833939bly1giclip4jbpj20zk0m87cv.jpg",
42
+ "https://tva2.sinaimg.cn/large/6833939bly1gicliwyw55j20zk0m8hdt.jpg",
43
+ "https://tva2.sinaimg.cn/large/6833939bly1giclize41wj20zk0m87gk.jpg",
44
+ "https://tva2.sinaimg.cn/large/6833939bly1giclj61ylzj20zk0m8b29.jpg",
45
+ "https://tva2.sinaimg.cn/large/6833939bly1giclj9410cj20zk0m8h12.jpg",
46
+ "https://tva2.sinaimg.cn/large/6833939bly1gicljgocqbj20zk0m8e81.jpg",
47
+ "https://tva2.sinaimg.cn/large/6833939bly1gicljitigmj20zk0m87fp.jpg",
48
+ "https://tva2.sinaimg.cn/large/6833939bly1giclwrdwyaj20zk0m8are.jpg",
49
+ "https://tva2.sinaimg.cn/large/6833939bly1giclwuom7cj20zk0m8dvn.jpg",
50
+ "https://tva2.sinaimg.cn/large/6833939bly1giclx29mstj20zk0m8hdt.jpg",
51
+ "https://tva2.sinaimg.cn/large/6833939bly1giclx6phq6j20zk0m8e36.jpg",
52
+ "https://tva2.sinaimg.cn/large/6833939bly1giclxfdlttj20zk0m8npd.jpg",
53
+ "https://tva2.sinaimg.cn/large/6833939bly1giclxp31goj20zk0m8qv5.jpg",
54
+ "https://tva2.sinaimg.cn/large/6833939bly1giclxxcb6rj20zk0m8b29.jpg",
55
+ "https://tva2.sinaimg.cn/large/6833939bly1gicm07ih54j20zk0m84qp.jpg",
56
+ "https://tva2.sinaimg.cn/large/6833939bly1gicm0fdw5cj20zk0m8hdt.jpg",
57
+ "https://tva2.sinaimg.cn/large/6833939bly1gicm0n457cj20zk0m8e81.jpg",
58
+ "https://tva2.sinaimg.cn/large/6833939bly1gicmnywqgpj20zk0m8dwx.jpg",
59
+ "https://tva2.sinaimg.cn/large/6833939bly1gipesng5oej20zk0m87d4.jpg",
60
+ "https://tva2.sinaimg.cn/large/6833939bly1gipesrnqv3j20zk0m8ava.jpg",
61
+ "https://tva2.sinaimg.cn/large/6833939bly1gipesx5fdwj20zk0m81kx.jpg",
62
+ "https://tva2.sinaimg.cn/large/6833939bly1gipet4bz0yj20zk0m8e81.jpg",
63
+ "https://tva2.sinaimg.cn/large/6833939bly1gipet8c1a2j20zk0m8kct.jpg",
64
+ "https://tva2.sinaimg.cn/large/6833939bly1gipetfk5zwj20zk0m8e81.jpg",
65
+ "https://tva2.sinaimg.cn/large/6833939bly1gipetlbztpj20zk0m84qp.jpg",
66
+ "https://tva2.sinaimg.cn/large/6833939bly1gipetv6p75j20zk0m8x6p.jpg",
67
+ "https://tva2.sinaimg.cn/large/6833939bly1gipeu1usa7j20zk0m8b29.jpg",
68
+ "https://tva2.sinaimg.cn/large/6833939bly1gipeu7txpzj20zk0m81kx.jpg",
69
+ "https://tva2.sinaimg.cn/large/6833939bly1gipeubcbajj20zk0m8h1h.jpg",
70
+ "https://tva2.sinaimg.cn/large/6833939bly1gipeudstjqj20zk0m8k3r.jpg",
71
+ "https://tva2.sinaimg.cn/large/6833939bly1gipeuibk9fj20zk0m8ay2.jpg",
72
+ "https://tva2.sinaimg.cn/large/6833939bly1gipeun65urj20zk0m81ii.jpg",
73
+ "https://tva2.sinaimg.cn/large/6833939bly1gipeuv80yoj20zk0m8kjl.jpg",
74
+ "https://tva2.sinaimg.cn/large/6833939bly1gipev1x5e4j20zk0m8b29.jpg",
75
+ "https://tva2.sinaimg.cn/large/6833939bly1gipevarprfj20zk0m8npd.jpg",
76
+ "https://tva2.sinaimg.cn/large/6833939bly1gipevgoki5j20zk0m84qp.jpg",
77
+ "https://tva2.sinaimg.cn/large/6833939bly1gipevo9j1jj20zk0m8e81.jpg",
78
+ "https://tva2.sinaimg.cn/large/6833939bly1gipevuctzzj20zk0m84qp.jpg",
79
+ "https://tva2.sinaimg.cn/large/6833939bly1gipew28b65j20zk0m8hdt.jpg",
80
+ "https://tva2.sinaimg.cn/large/6833939bly1gipew8gmvyj20zk0m87wh.jpg",
81
+ "https://tva2.sinaimg.cn/large/6833939bly1gipewf5l51j20zk0m8b29.jpg",
82
+ "https://tva2.sinaimg.cn/large/6833939bly1gipewkhf1zj20zk0m81kx.jpg",
83
+ "https://tva2.sinaimg.cn/large/6833939bly1gipewr8iypj20zk0m8b29.jpg",
84
+ "https://tva2.sinaimg.cn/large/6833939bly1gipex2cdtbj20zk0m8x6p.jpg",
85
+ "https://tva2.sinaimg.cn/large/6833939bly1gipexbei4hj20zk0m8npd.jpg",
86
+ "https://tva2.sinaimg.cn/large/6833939bly1gipexe4oykj20zk0m87ji.jpg",
87
+ "https://tva2.sinaimg.cn/large/6833939bly1gipexj2jgzj20zk0m8b09.jpg",
88
+ "https://tva2.sinaimg.cn/large/6833939bly1gipexoj0moj20zk0m8kgu.jpg",
89
+ "https://tva2.sinaimg.cn/large/6833939bly1gipexw3o58j20zk0m8e81.jpg",
90
+ "https://tva2.sinaimg.cn/large/6833939bly1gipey0a334j20zk0m8qpt.jpg",
91
+ "https://tva2.sinaimg.cn/large/6833939bly1gipey84bjtj20zk0m8hdt.jpg",
92
+ "https://tva2.sinaimg.cn/large/6833939bly1gipeybxm1pj20zk0m8niv.jpg",
93
+ "https://tva2.sinaimg.cn/large/6833939bly1gipeyhsblkj20zk0m81kx.jpg",
94
+ "https://tva2.sinaimg.cn/large/6833939bly1gipeyonbf9j20zk0m8e81.jpg",
95
+ "https://tva2.sinaimg.cn/large/6833939bly1gipeyvx1d4j20zk0m8hdt.jpg",
96
+ "https://tva2.sinaimg.cn/large/6833939bly1giph47e9vtj20zk0m8x6l.jpg",
97
+ "https://tva2.sinaimg.cn/large/6833939bly1giph4baakhj20zk0m8h5q.jpg",
98
+ "https://tva2.sinaimg.cn/large/6833939bly1giph4fomxoj20zk0m8axp.jpg",
99
+ "https://tva2.sinaimg.cn/large/6833939bly1giph4lm9i7j20zk0m84qp.jpg",
100
+ "https://tva2.sinaimg.cn/large/6833939bly1giph4wqtg4j20zk0m8x6p.jpg"
101
+ ]
package/index.d.ts ADDED
@@ -0,0 +1,54 @@
1
+ import type { ViteSSGContext } from 'vite-ssg'
2
+
3
+ export interface HairyTheme {
4
+ nav?: NavItem[];
5
+ home?: {
6
+ images?: string[]
7
+ }
8
+ user?: {
9
+ name?: string;
10
+ description?: string;
11
+ };
12
+ post?: {
13
+ layout?: 'text' | 'markdown' | 'image' | 'image:slice' | 'image:slice:reverse'
14
+ images?: string[]
15
+ }
16
+ categories?: {
17
+ layout?: 'timeline' | 'post'
18
+ }
19
+ /**
20
+ * meting options
21
+ * @see https://github.com/metowolf/MetingJS#option
22
+ */
23
+ meting?: {
24
+ id?: string
25
+ server?: string
26
+ type?: string
27
+ auto?: string
28
+ fixed?: boolean
29
+ mini?: boolean
30
+ autoplay?: boolean
31
+ theme?: string
32
+ loop?: string
33
+ order?: string
34
+ preload?: string
35
+ volume?: number
36
+ work?: string
37
+ mutex?: boolean
38
+ start?: string
39
+ 'lrc-type'?: number
40
+ 'list-folded'?: boolean
41
+ 'list-max-height'?: string
42
+ 'storage-name'?: string
43
+ [key: string]: any
44
+ }
45
+ }
46
+ export interface NavItem {
47
+ text: string;
48
+ icon?: string;
49
+ link?: string;
50
+ items?: NavItem[];
51
+ }
52
+
53
+
54
+ export type UserModule = (ctx: ViteSSGContext) => void
@@ -0,0 +1,11 @@
1
+ <script lang="ts" setup>
2
+ import { useFrontmatter } from 'valaxy'
3
+ const post = useFrontmatter()
4
+ </script>
5
+
6
+ <template>
7
+ <HairyLayout :header="{ title: post.title }">
8
+ <router-view />
9
+ </HairyLayout>
10
+ </template>
11
+
@@ -0,0 +1,6 @@
1
+ <template>
2
+ <HairyLayout :header="{ title: '分类' }">
3
+ <router-view />
4
+ </HairyLayout>
5
+ </template>
6
+
@@ -0,0 +1,9 @@
1
+ <script lang="ts" setup>
2
+ </script>
3
+
4
+ <template>
5
+ <HairyLayout :header="$route.meta.frontmatter">
6
+ <router-view />
7
+ </HairyLayout>
8
+ </template>
9
+
@@ -0,0 +1,23 @@
1
+ <script lang="ts" setup>
2
+ import { useConfig } from 'valaxy'
3
+ const config = useConfig()
4
+ </script>
5
+
6
+ <template>
7
+ <HairyLayout
8
+ class="HairyHomeLayout"
9
+ :header="{
10
+ headline: config.title,
11
+ title: config.author.name,
12
+ description: 'good evening, how are you doing?',
13
+ }"
14
+ >
15
+ <router-view />
16
+ </HairyLayout>
17
+ </template>
18
+
19
+ <style>
20
+ .HairyHomeHeader .title {
21
+ @apply tracking-5;
22
+ }
23
+ </style>
@@ -0,0 +1,6 @@
1
+ <template>
2
+ <HairyLayout :header="{ title: `发表于'${$route.params.year}年${$route.params.month}'的文章` }">
3
+ <router-view />
4
+ </HairyLayout>
5
+ </template>
6
+
@@ -0,0 +1,26 @@
1
+ <script lang="ts" setup>
2
+ import { useFrontmatter } from 'valaxy'
3
+ import dayjs from 'dayjs'
4
+
5
+ const post = useFrontmatter()
6
+ </script>
7
+
8
+ <template>
9
+ <HairyLayout :header="{ title: post.title }">
10
+ <template #header-description>
11
+ <div class="text-center">
12
+ {{ post.description }}
13
+ </div>
14
+ <div class="flex gap-2">
15
+ <span>发表于 {{ dayjs(post.date).format('YYYY-MM-DD') }}</span>
16
+ <span>本文字数 {{ (post.length / 1000).toFixed(1) }}k 字</span>
17
+ <span>阅读时长 {{ post.durations.minutes.toFixed(2) }} 分钟</span>
18
+ </div>
19
+ </template>
20
+ <router-view />
21
+ <template #body-slide>
22
+ <HairyUserTab />
23
+ </template>
24
+ </HairyLayout>
25
+ </template>
26
+
@@ -0,0 +1,6 @@
1
+ <template>
2
+ <HairyLayout :header="{ title: `保护标签'${$route.params.tag}'的标签` }">
3
+ <router-view />
4
+ </HairyLayout>
5
+ </template>
6
+
@@ -0,0 +1,6 @@
1
+ <template>
2
+ <HairyLayout :header="{ title: '所有标签' }">
3
+ <router-view />
4
+ </HairyLayout>
5
+ </template>
6
+
@@ -0,0 +1,6 @@
1
+ <template>
2
+ <HairyLayout :header="{ title: `发表于'${$route.params.year}年'的文章` }">
3
+ <router-view />
4
+ </HairyLayout>
5
+ </template>
6
+
package/locales/en.yml ADDED
@@ -0,0 +1 @@
1
+ valaxy_theme_starter: Valaxy Theme Starter
@@ -0,0 +1,3 @@
1
+ valaxy_theme_starter: Valaxy 主题 Starter
2
+ Uncategorized: '未分类'
3
+ Valaxy Notes: 'Valaxy 笔记'
@@ -0,0 +1,5 @@
1
+ import HairyContext from '../hooks/useContext'
2
+ import type { UserModule } from '..'
3
+ export const install: UserModule = ({ app }) => {
4
+ app.provide(HairyContext.key, HairyContext.getter())
5
+ }