valaxy-theme-hairy 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +21 -21
- package/client/index.ts +1 -1
- package/components/HairyBody.vue +49 -49
- package/components/HairyCodepen.vue +40 -40
- package/components/HairyComment.vue +33 -33
- package/components/HairyContainer.vue +17 -17
- package/components/HairyDrawer.vue +44 -44
- package/components/HairyFooter.vue +62 -62
- package/components/HairyHeader.vue +32 -32
- package/components/HairyImage.vue +15 -15
- package/components/HairyImageGroup.vue +65 -65
- package/components/HairyNavbar.vue +56 -56
- package/components/HairyPageArchives.vue +59 -59
- package/components/HairyPageTags.vue +48 -48
- package/components/HairyPosts.vue +54 -54
- package/components/HairySearch.vue +201 -201
- package/components/HairySidebar.vue +30 -30
- package/components/HairyTabbar.vue +56 -56
- package/components/PageTags.vue +48 -48
- package/components/ValaxyMain.vue +45 -45
- package/components/navbar/HairyNav.vue +16 -16
- package/components/navbar/HairyNavExpand.vue +12 -12
- package/components/navbar/HairyNavItem.vue +35 -35
- package/components/navbar/HairyNavbarBackground.vue +7 -7
- package/components/navbar/HairyNavbarSearch.vue +8 -8
- package/components/navbar/HairyNavbarTitle.vue +15 -15
- package/components/navbar/HairyNavbarToggleDark.vue +22 -22
- package/components/parts/HairyBreadcrumb.vue +51 -51
- package/components/parts/HairyBreadcrumbItem.vue +11 -11
- package/components/parts/HairyFootFish.js +352 -352
- package/components/parts/HairyFootFish.vue +38 -38
- package/components/parts/HairyHeadHero.vue +34 -34
- package/components/parts/HairyHeadWaves.vue +67 -67
- package/components/parts/HairyImageGlobal.vue +51 -51
- package/components/parts/HairyImageViewer.vue +23 -23
- package/components/parts/HairyLink.vue +21 -21
- package/components/parts/HairyMenu.vue +16 -16
- package/components/parts/HairyMenuItem.vue +47 -47
- package/components/parts/HairyOutline.vue +99 -99
- package/components/parts/HairyOutlineItem.vue +48 -48
- package/components/parts/HairySocialLinks.vue +27 -27
- package/components/parts/HairyTimelineContent.vue +39 -39
- package/components/parts/HairyUserNav.vue +95 -95
- package/components/parts/HairyUserStats.vue +18 -18
- package/components/posts/HairyArticleImage.vue +126 -126
- package/components/posts/HairyArticleSeries.vue +89 -89
- package/components/posts/HairyArticleText.vue +43 -43
- package/components/posts/HairyPostFooter.vue +15 -15
- package/components/posts/HairyPostImageList.vue +27 -27
- package/components/posts/HairyPostTextsList.vue +22 -22
- package/components/posts/HairyPostToggleLayout.vue +36 -36
- package/components/third/HairyAlgoliaSearch.vue +17 -17
- package/components/third/HairyFuseSearch.vue +10 -10
- package/components/third/HairyFuseSearchDialog.vue +32 -32
- package/components/third/HairyFuseSearchDropdown.vue +77 -77
- package/components/third/HairyFuseSearchFooter.vue +28 -28
- package/components/third/HairyFuseSearchHeader.vue +30 -30
- package/components/third/HairyFuseSearchHit.vue +52 -52
- package/components/third/HairySearchBtnDisplay.vue +29 -29
- package/components/third/HairySearchBtnInput.vue +20 -20
- package/components/third/HairySearchBtnKeys.vue +19 -19
- package/components/third/HairySwiperCarousel.vue +45 -45
- package/composables/archives.ts +48 -48
- package/composables/category.ts +43 -43
- package/composables/config.ts +11 -11
- package/composables/dark.ts +13 -13
- package/composables/fuse.ts +60 -60
- package/composables/index.ts +7 -7
- package/composables/layout.ts +16 -16
- package/composables/outline.ts +49 -49
- package/composables/tags.ts +36 -36
- package/layouts/archive-month.vue +13 -13
- package/layouts/archive-year.vue +13 -13
- package/layouts/archives.vue +11 -11
- package/layouts/categories.vue +13 -13
- package/layouts/default.vue +13 -15
- package/layouts/home.vue +33 -33
- package/layouts/post.vue +54 -54
- package/layouts/tag.vue +10 -10
- package/layouts/tags.vue +10 -14
- package/library/loading.scss +535 -535
- package/library/loading.ts +60 -60
- package/library/scroll.ts +22 -22
- package/locales/en.yml +1 -1
- package/locales/zh-CN.yml +1 -1
- package/node/images/default.json +139 -139
- package/node/images/index.ts +46 -46
- package/node/images/shims.d.ts +8 -8
- package/node/index.ts +2 -2
- package/node/theme/index.ts +78 -78
- package/package.json +1 -1
- package/pages/archives/[year]/[month]/index.vue +48 -48
- package/pages/archives/[year]/index.vue +73 -73
- package/pages/archives/index.md +6 -0
- package/pages/categories/[...its].vue +108 -108
- package/pages/index.vue +8 -8
- package/pages/page/[page].vue +12 -12
- package/pages/tags/[tag]/index.vue +38 -38
- package/pages/tags/index.md +7 -0
- package/setup/main.ts +9 -9
- package/store/index.ts +1 -1
- package/store/modules/global.ts +12 -12
- package/styles/components/aplayer.scss +75 -75
- package/styles/components/index.scss +3 -3
- package/styles/components/markdown.scss +89 -89
- package/styles/components/nprogress.scss +15 -15
- package/styles/components/scrollbar.scss +25 -25
- package/styles/css-vars.scss +171 -171
- package/styles/element-plus/index.scss +1 -1
- package/styles/element-plus/tabs.scss +25 -25
- package/styles/element-plus/timeline.scss +18 -18
- package/styles/font-face.scss +19 -19
- package/styles/global.scss +38 -38
- package/styles/index.scss +3 -3
- package/tsconfig.json +27 -27
- package/types/index.d.ts +163 -163
- package/unocss.config.ts +43 -43
- package/utils/index.ts +37 -37
- package/valaxy.config.ts +26 -26
- package/pages/archives/index.vue +0 -6
- package/pages/tags/index.vue +0 -6
@@ -1,201 +1,201 @@
|
|
1
|
-
<script lang="ts" setup>
|
2
|
-
import { useSiteConfig } from 'valaxy'
|
3
|
-
import { computed } from 'vue'
|
4
|
-
|
5
|
-
const siteConfig = useSiteConfig()
|
6
|
-
const isAlgolia = computed(() => siteConfig.value.search.type === 'algolia')
|
7
|
-
const isFuse = computed(() => siteConfig.value.search.type === 'fuse')
|
8
|
-
</script>
|
9
|
-
|
10
|
-
<template>
|
11
|
-
<HairyAlgoliaSearch v-if="isAlgolia" />
|
12
|
-
<HairyFuseSearch v-if="isFuse" />
|
13
|
-
</template>
|
14
|
-
|
15
|
-
<style lang="scss">
|
16
|
-
.VPNavBarSearch {
|
17
|
-
display: flex;
|
18
|
-
align-items: center;
|
19
|
-
}
|
20
|
-
|
21
|
-
@media (min-width: 768px) {
|
22
|
-
.VPNavBarSearch {
|
23
|
-
flex-grow: 1;
|
24
|
-
padding-left: 24px;
|
25
|
-
}
|
26
|
-
}
|
27
|
-
|
28
|
-
@media (min-width: 960px) {
|
29
|
-
.VPNavBarSearch {
|
30
|
-
padding-left: 32px;
|
31
|
-
}
|
32
|
-
}
|
33
|
-
|
34
|
-
.DocSearch {
|
35
|
-
--docsearch-primary-color: var(--hy-c-brand);
|
36
|
-
--docsearch-highlight-color: var(--docsearch-primary-color);
|
37
|
-
--docsearch-text-color: var(--hy-c-text-1);
|
38
|
-
--docsearch-muted-color: var(--hy-c-text-2);
|
39
|
-
--docsearch-searchbox-shadow: none;
|
40
|
-
--docsearch-searchbox-focus-background: transparent;
|
41
|
-
--docsearch-key-gradient: transparent;
|
42
|
-
--docsearch-key-shadow: none;
|
43
|
-
--docsearch-modal-background: var(--hy-c-bg-soft);
|
44
|
-
--docsearch-footer-background: var(--hy-c-bg);
|
45
|
-
}
|
46
|
-
|
47
|
-
.dark .DocSearch {
|
48
|
-
--docsearch-modal-shadow: none;
|
49
|
-
--docsearch-footer-shadow: none;
|
50
|
-
--docsearch-logo-color: var(--hy-c-text-2);
|
51
|
-
--docsearch-hit-background: var(--hy-c-bg-mute);
|
52
|
-
--docsearch-hit-color: var(--hy-c-text-2);
|
53
|
-
--docsearch-hit-shadow: none;
|
54
|
-
}
|
55
|
-
|
56
|
-
.DocSearch-Button {
|
57
|
-
display: flex;
|
58
|
-
justify-content: center;
|
59
|
-
align-items: center;
|
60
|
-
margin: 0;
|
61
|
-
padding: 0;
|
62
|
-
width: 32px;
|
63
|
-
height: 55px;
|
64
|
-
background: transparent;
|
65
|
-
transition: all 0.25s;
|
66
|
-
}
|
67
|
-
|
68
|
-
.DocSearch-Button:hover {
|
69
|
-
background: transparent;
|
70
|
-
}
|
71
|
-
|
72
|
-
.DocSearch-Button:focus {
|
73
|
-
outline: 1px dotted;
|
74
|
-
outline: 5px auto -webkit-focus-ring-color;
|
75
|
-
}
|
76
|
-
|
77
|
-
.DocSearch-Button:focus:not(:focus-visible) {
|
78
|
-
outline: none;
|
79
|
-
}
|
80
|
-
|
81
|
-
@media (min-width: 768px) {
|
82
|
-
.DocSearch-Button {
|
83
|
-
justify-content: flex-start;
|
84
|
-
border: 1px solid transparent;
|
85
|
-
border-radius: 8px;
|
86
|
-
padding: 0 10px 0 12px;
|
87
|
-
width: 100%;
|
88
|
-
height: 40px;
|
89
|
-
/* background-color: var(--hy-c-bg-alt); */
|
90
|
-
}
|
91
|
-
|
92
|
-
.DocSearch-Button:hover {
|
93
|
-
background-color: rgba(255, 255, 255, 0.4);
|
94
|
-
border-color: var(--hy-c-brand);
|
95
|
-
}
|
96
|
-
|
97
|
-
.dark {
|
98
|
-
.DocSearch-Button:hover {
|
99
|
-
background-color: transparent;
|
100
|
-
border-color: var(--hy-c-brand);
|
101
|
-
}
|
102
|
-
}
|
103
|
-
}
|
104
|
-
|
105
|
-
.DocSearch-Button .DocSearch-Button-Container {
|
106
|
-
display: flex;
|
107
|
-
align-items: center;
|
108
|
-
}
|
109
|
-
|
110
|
-
.DocSearch-Button .DocSearch-Search-Icon {
|
111
|
-
position: relative;
|
112
|
-
width: 1em;
|
113
|
-
height: 1em;
|
114
|
-
color: var(--hy-c-text-1);
|
115
|
-
fill: currentColor;
|
116
|
-
transition: color 0.5s;
|
117
|
-
}
|
118
|
-
|
119
|
-
.DocSearch-Button:hover .DocSearch-Search-Icon {
|
120
|
-
color: var(--hy-c-text-1);
|
121
|
-
}
|
122
|
-
|
123
|
-
@media (min-width: 768px) {
|
124
|
-
.DocSearch-Button .DocSearch-Search-Icon {
|
125
|
-
top: 1px;
|
126
|
-
margin-right: 8px;
|
127
|
-
width: 14px;
|
128
|
-
height: 14px;
|
129
|
-
color: var(--hy-c-text-2);
|
130
|
-
}
|
131
|
-
}
|
132
|
-
|
133
|
-
.DocSearch-Button .DocSearch-Button-Placeholder {
|
134
|
-
display: none;
|
135
|
-
margin-top: 2px;
|
136
|
-
padding: 0 16px 0 0;
|
137
|
-
font-size: 13px;
|
138
|
-
font-weight: 500;
|
139
|
-
color: var(--hy-c-text-2);
|
140
|
-
transition: color 0.5s;
|
141
|
-
}
|
142
|
-
|
143
|
-
.DocSearch-Button:hover .DocSearch-Button-Placeholder {
|
144
|
-
color: var(--hy-c-text-1);
|
145
|
-
}
|
146
|
-
|
147
|
-
@media (min-width: 768px) {
|
148
|
-
.DocSearch-Button .DocSearch-Button-Placeholder {
|
149
|
-
display: inline-block;
|
150
|
-
}
|
151
|
-
}
|
152
|
-
|
153
|
-
.DocSearch-Button .DocSearch-Button-Keys {
|
154
|
-
display: none;
|
155
|
-
min-width: auto;
|
156
|
-
}
|
157
|
-
|
158
|
-
@media (min-width: 768px) {
|
159
|
-
.DocSearch-Button .DocSearch-Button-Keys {
|
160
|
-
display: flex;
|
161
|
-
align-items: center;
|
162
|
-
}
|
163
|
-
}
|
164
|
-
|
165
|
-
.DocSearch-Button .DocSearch-Button-Key {
|
166
|
-
display: block;
|
167
|
-
margin: 2px 0 0 0;
|
168
|
-
border: 1px solid var(--hy-c-divider);
|
169
|
-
border-right: none;
|
170
|
-
border-radius: 4px 0 0 4px;
|
171
|
-
padding-left: 6px;
|
172
|
-
min-width: 0;
|
173
|
-
width: auto;
|
174
|
-
height: 22px;
|
175
|
-
line-height: 22px;
|
176
|
-
font-size: 12px;
|
177
|
-
font-weight: 500;
|
178
|
-
transition: color 0.5s, border-color 0.5s;
|
179
|
-
}
|
180
|
-
|
181
|
-
.DocSearch-Button .DocSearch-Button-Key+.DocSearch-Button-Key {
|
182
|
-
border-right: 1px solid var(--hy-c-divider);
|
183
|
-
border-left: none;
|
184
|
-
border-radius: 0 4px 4px 0;
|
185
|
-
padding-left: 2px;
|
186
|
-
padding-right: 6px;
|
187
|
-
}
|
188
|
-
|
189
|
-
.DocSearch-Form {
|
190
|
-
border: 1px solid var(--hy-c-brand);
|
191
|
-
background-color: var(--hy-c-white);
|
192
|
-
}
|
193
|
-
|
194
|
-
.dark .DocSearch-Form {
|
195
|
-
background-color: var(--hy-c-bg-mute);
|
196
|
-
}
|
197
|
-
|
198
|
-
.dark .DocSearch-Footer {
|
199
|
-
border-top: 1px solid var(--hy-c-divider);
|
200
|
-
}
|
201
|
-
</style>
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { useSiteConfig } from 'valaxy'
|
3
|
+
import { computed } from 'vue'
|
4
|
+
|
5
|
+
const siteConfig = useSiteConfig()
|
6
|
+
const isAlgolia = computed(() => siteConfig.value.search.type === 'algolia')
|
7
|
+
const isFuse = computed(() => siteConfig.value.search.type === 'fuse')
|
8
|
+
</script>
|
9
|
+
|
10
|
+
<template>
|
11
|
+
<HairyAlgoliaSearch v-if="isAlgolia" />
|
12
|
+
<HairyFuseSearch v-if="isFuse" />
|
13
|
+
</template>
|
14
|
+
|
15
|
+
<style lang="scss">
|
16
|
+
.VPNavBarSearch {
|
17
|
+
display: flex;
|
18
|
+
align-items: center;
|
19
|
+
}
|
20
|
+
|
21
|
+
@media (min-width: 768px) {
|
22
|
+
.VPNavBarSearch {
|
23
|
+
flex-grow: 1;
|
24
|
+
padding-left: 24px;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
@media (min-width: 960px) {
|
29
|
+
.VPNavBarSearch {
|
30
|
+
padding-left: 32px;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
.DocSearch {
|
35
|
+
--docsearch-primary-color: var(--hy-c-brand);
|
36
|
+
--docsearch-highlight-color: var(--docsearch-primary-color);
|
37
|
+
--docsearch-text-color: var(--hy-c-text-1);
|
38
|
+
--docsearch-muted-color: var(--hy-c-text-2);
|
39
|
+
--docsearch-searchbox-shadow: none;
|
40
|
+
--docsearch-searchbox-focus-background: transparent;
|
41
|
+
--docsearch-key-gradient: transparent;
|
42
|
+
--docsearch-key-shadow: none;
|
43
|
+
--docsearch-modal-background: var(--hy-c-bg-soft);
|
44
|
+
--docsearch-footer-background: var(--hy-c-bg);
|
45
|
+
}
|
46
|
+
|
47
|
+
.dark .DocSearch {
|
48
|
+
--docsearch-modal-shadow: none;
|
49
|
+
--docsearch-footer-shadow: none;
|
50
|
+
--docsearch-logo-color: var(--hy-c-text-2);
|
51
|
+
--docsearch-hit-background: var(--hy-c-bg-mute);
|
52
|
+
--docsearch-hit-color: var(--hy-c-text-2);
|
53
|
+
--docsearch-hit-shadow: none;
|
54
|
+
}
|
55
|
+
|
56
|
+
.DocSearch-Button {
|
57
|
+
display: flex;
|
58
|
+
justify-content: center;
|
59
|
+
align-items: center;
|
60
|
+
margin: 0;
|
61
|
+
padding: 0;
|
62
|
+
width: 32px;
|
63
|
+
height: 55px;
|
64
|
+
background: transparent;
|
65
|
+
transition: all 0.25s;
|
66
|
+
}
|
67
|
+
|
68
|
+
.DocSearch-Button:hover {
|
69
|
+
background: transparent;
|
70
|
+
}
|
71
|
+
|
72
|
+
.DocSearch-Button:focus {
|
73
|
+
outline: 1px dotted;
|
74
|
+
outline: 5px auto -webkit-focus-ring-color;
|
75
|
+
}
|
76
|
+
|
77
|
+
.DocSearch-Button:focus:not(:focus-visible) {
|
78
|
+
outline: none;
|
79
|
+
}
|
80
|
+
|
81
|
+
@media (min-width: 768px) {
|
82
|
+
.DocSearch-Button {
|
83
|
+
justify-content: flex-start;
|
84
|
+
border: 1px solid transparent;
|
85
|
+
border-radius: 8px;
|
86
|
+
padding: 0 10px 0 12px;
|
87
|
+
width: 100%;
|
88
|
+
height: 40px;
|
89
|
+
/* background-color: var(--hy-c-bg-alt); */
|
90
|
+
}
|
91
|
+
|
92
|
+
.DocSearch-Button:hover {
|
93
|
+
background-color: rgba(255, 255, 255, 0.4);
|
94
|
+
border-color: var(--hy-c-brand);
|
95
|
+
}
|
96
|
+
|
97
|
+
.dark {
|
98
|
+
.DocSearch-Button:hover {
|
99
|
+
background-color: transparent;
|
100
|
+
border-color: var(--hy-c-brand);
|
101
|
+
}
|
102
|
+
}
|
103
|
+
}
|
104
|
+
|
105
|
+
.DocSearch-Button .DocSearch-Button-Container {
|
106
|
+
display: flex;
|
107
|
+
align-items: center;
|
108
|
+
}
|
109
|
+
|
110
|
+
.DocSearch-Button .DocSearch-Search-Icon {
|
111
|
+
position: relative;
|
112
|
+
width: 1em;
|
113
|
+
height: 1em;
|
114
|
+
color: var(--hy-c-text-1);
|
115
|
+
fill: currentColor;
|
116
|
+
transition: color 0.5s;
|
117
|
+
}
|
118
|
+
|
119
|
+
.DocSearch-Button:hover .DocSearch-Search-Icon {
|
120
|
+
color: var(--hy-c-text-1);
|
121
|
+
}
|
122
|
+
|
123
|
+
@media (min-width: 768px) {
|
124
|
+
.DocSearch-Button .DocSearch-Search-Icon {
|
125
|
+
top: 1px;
|
126
|
+
margin-right: 8px;
|
127
|
+
width: 14px;
|
128
|
+
height: 14px;
|
129
|
+
color: var(--hy-c-text-2);
|
130
|
+
}
|
131
|
+
}
|
132
|
+
|
133
|
+
.DocSearch-Button .DocSearch-Button-Placeholder {
|
134
|
+
display: none;
|
135
|
+
margin-top: 2px;
|
136
|
+
padding: 0 16px 0 0;
|
137
|
+
font-size: 13px;
|
138
|
+
font-weight: 500;
|
139
|
+
color: var(--hy-c-text-2);
|
140
|
+
transition: color 0.5s;
|
141
|
+
}
|
142
|
+
|
143
|
+
.DocSearch-Button:hover .DocSearch-Button-Placeholder {
|
144
|
+
color: var(--hy-c-text-1);
|
145
|
+
}
|
146
|
+
|
147
|
+
@media (min-width: 768px) {
|
148
|
+
.DocSearch-Button .DocSearch-Button-Placeholder {
|
149
|
+
display: inline-block;
|
150
|
+
}
|
151
|
+
}
|
152
|
+
|
153
|
+
.DocSearch-Button .DocSearch-Button-Keys {
|
154
|
+
display: none;
|
155
|
+
min-width: auto;
|
156
|
+
}
|
157
|
+
|
158
|
+
@media (min-width: 768px) {
|
159
|
+
.DocSearch-Button .DocSearch-Button-Keys {
|
160
|
+
display: flex;
|
161
|
+
align-items: center;
|
162
|
+
}
|
163
|
+
}
|
164
|
+
|
165
|
+
.DocSearch-Button .DocSearch-Button-Key {
|
166
|
+
display: block;
|
167
|
+
margin: 2px 0 0 0;
|
168
|
+
border: 1px solid var(--hy-c-divider);
|
169
|
+
border-right: none;
|
170
|
+
border-radius: 4px 0 0 4px;
|
171
|
+
padding-left: 6px;
|
172
|
+
min-width: 0;
|
173
|
+
width: auto;
|
174
|
+
height: 22px;
|
175
|
+
line-height: 22px;
|
176
|
+
font-size: 12px;
|
177
|
+
font-weight: 500;
|
178
|
+
transition: color 0.5s, border-color 0.5s;
|
179
|
+
}
|
180
|
+
|
181
|
+
.DocSearch-Button .DocSearch-Button-Key+.DocSearch-Button-Key {
|
182
|
+
border-right: 1px solid var(--hy-c-divider);
|
183
|
+
border-left: none;
|
184
|
+
border-radius: 0 4px 4px 0;
|
185
|
+
padding-left: 2px;
|
186
|
+
padding-right: 6px;
|
187
|
+
}
|
188
|
+
|
189
|
+
.DocSearch-Form {
|
190
|
+
border: 1px solid var(--hy-c-brand);
|
191
|
+
background-color: var(--hy-c-white);
|
192
|
+
}
|
193
|
+
|
194
|
+
.dark .DocSearch-Form {
|
195
|
+
background-color: var(--hy-c-bg-mute);
|
196
|
+
}
|
197
|
+
|
198
|
+
.dark .DocSearch-Footer {
|
199
|
+
border-top: 1px solid var(--hy-c-divider);
|
200
|
+
}
|
201
|
+
</style>
|
@@ -1,30 +1,30 @@
|
|
1
|
-
<script lang="ts" setup>
|
2
|
-
import { useSiteConfig, useThemeConfig } from 'valaxy'
|
3
|
-
import { computed } from 'vue'
|
4
|
-
import type { HairyTheme } from 'valaxy-theme-hairy'
|
5
|
-
|
6
|
-
const config = useSiteConfig()
|
7
|
-
const theme = useThemeConfig<HairyTheme.Config>()
|
8
|
-
|
9
|
-
const name = computed(() => theme.value.user?.name || config.value.author.name)
|
10
|
-
const description = computed(() => theme.value.user?.description || config.value.description)
|
11
|
-
</script>
|
12
|
-
|
13
|
-
<template>
|
14
|
-
<div class="pt-5 animate__animated animate__fadeIn relative z-1">
|
15
|
-
<div class="flex flex-col items-center">
|
16
|
-
<img class="mx-auto w-40 rounded-full -mx-1px" :src="config.author.avatar">
|
17
|
-
<div class="leading-loose mt-2">
|
18
|
-
{{ name }}
|
19
|
-
</div>
|
20
|
-
<div class="text-coolgray">
|
21
|
-
{{ description }}
|
22
|
-
</div>
|
23
|
-
</div>
|
24
|
-
<HairyUserNav />
|
25
|
-
</div>
|
26
|
-
</template>
|
27
|
-
|
28
|
-
<style lang="scss">
|
29
|
-
|
30
|
-
</style>
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { useSiteConfig, useThemeConfig } from 'valaxy'
|
3
|
+
import { computed } from 'vue'
|
4
|
+
import type { HairyTheme } from 'valaxy-theme-hairy'
|
5
|
+
|
6
|
+
const config = useSiteConfig()
|
7
|
+
const theme = useThemeConfig<HairyTheme.Config>()
|
8
|
+
|
9
|
+
const name = computed(() => theme.value.user?.name || config.value.author.name)
|
10
|
+
const description = computed(() => theme.value.user?.description || config.value.description)
|
11
|
+
</script>
|
12
|
+
|
13
|
+
<template>
|
14
|
+
<div class="pt-5 animate__animated animate__fadeIn relative z-1">
|
15
|
+
<div class="flex flex-col items-center">
|
16
|
+
<img class="mx-auto w-40 rounded-full -mx-1px" :src="config.author.avatar">
|
17
|
+
<div class="leading-loose mt-2">
|
18
|
+
{{ name }}
|
19
|
+
</div>
|
20
|
+
<div class="text-coolgray">
|
21
|
+
{{ description }}
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
<HairyUserNav />
|
25
|
+
</div>
|
26
|
+
</template>
|
27
|
+
|
28
|
+
<style lang="scss">
|
29
|
+
|
30
|
+
</style>
|
@@ -1,56 +1,56 @@
|
|
1
|
-
<script lang="ts" setup>
|
2
|
-
import { ElTabPane, ElTabs } from 'element-plus
|
3
|
-
import 'element-plus/theme-chalk/el-tabs.css'
|
4
|
-
import 'element-plus/theme-chalk/el-tab-pane.css'
|
5
|
-
import { computed, provide, ref } from 'vue'
|
6
|
-
|
7
|
-
import type { DefaultTheme } from 'valaxy/types'
|
8
|
-
import { useFrontmatter, useThemeConfig } from 'valaxy'
|
9
|
-
|
10
|
-
const active = ref('aside')
|
11
|
-
|
12
|
-
const frontmatter = useFrontmatter()
|
13
|
-
const themeConfig = useThemeConfig()
|
14
|
-
|
15
|
-
const pageOutline = computed<DefaultTheme.Config['outline']>(
|
16
|
-
() => frontmatter.value.outline ?? themeConfig.value.outline,
|
17
|
-
)
|
18
|
-
|
19
|
-
const pageOutlineNotUndefined = computed(() =>
|
20
|
-
typeof pageOutline.value !== 'undefined',
|
21
|
-
)
|
22
|
-
|
23
|
-
provide('HairyUserTab:active', active)
|
24
|
-
</script>
|
25
|
-
|
26
|
-
<template>
|
27
|
-
<ElTabs v-model="active" class="pt-3">
|
28
|
-
<ElTabPane v-if="pageOutlineNotUndefined" name="aside">
|
29
|
-
<template #label>
|
30
|
-
<div class="flex items-center">
|
31
|
-
<div class="i-ri-list-check-2" />
|
32
|
-
<span class="ml-1">Aside</span>
|
33
|
-
</div>
|
34
|
-
</template>
|
35
|
-
<HairyOutline />
|
36
|
-
</ElTabPane>
|
37
|
-
<ElTabPane label="Series" name="series">
|
38
|
-
<template #label>
|
39
|
-
<div class="flex items-center gap-1">
|
40
|
-
<div class="i-ri-flow-chart" />
|
41
|
-
<span class="ml-1">Series</span>
|
42
|
-
</div>
|
43
|
-
</template>
|
44
|
-
<HairyArticleSeries />
|
45
|
-
</ElTabPane>
|
46
|
-
<ElTabPane label="User" name="user">
|
47
|
-
<template #label>
|
48
|
-
<div class="flex items-center gap-1">
|
49
|
-
<div class="i-ri-user-line" />
|
50
|
-
<span class="ml-1">User</span>
|
51
|
-
</div>
|
52
|
-
</template>
|
53
|
-
<HairySidebar />
|
54
|
-
</ElTabPane>
|
55
|
-
</ElTabs>
|
56
|
-
</template>
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { ElTabPane, ElTabs } from 'element-plus'
|
3
|
+
import 'element-plus/theme-chalk/el-tabs.css'
|
4
|
+
import 'element-plus/theme-chalk/el-tab-pane.css'
|
5
|
+
import { computed, provide, ref } from 'vue'
|
6
|
+
|
7
|
+
import type { DefaultTheme } from 'valaxy/types'
|
8
|
+
import { useFrontmatter, useThemeConfig } from 'valaxy'
|
9
|
+
|
10
|
+
const active = ref('aside')
|
11
|
+
|
12
|
+
const frontmatter = useFrontmatter()
|
13
|
+
const themeConfig = useThemeConfig()
|
14
|
+
|
15
|
+
const pageOutline = computed<DefaultTheme.Config['outline']>(
|
16
|
+
() => frontmatter.value.outline ?? themeConfig.value.outline,
|
17
|
+
)
|
18
|
+
|
19
|
+
const pageOutlineNotUndefined = computed(() =>
|
20
|
+
typeof pageOutline.value !== 'undefined',
|
21
|
+
)
|
22
|
+
|
23
|
+
provide('HairyUserTab:active', active)
|
24
|
+
</script>
|
25
|
+
|
26
|
+
<template>
|
27
|
+
<ElTabs v-model="active" class="pt-3">
|
28
|
+
<ElTabPane v-if="pageOutlineNotUndefined" name="aside">
|
29
|
+
<template #label>
|
30
|
+
<div class="flex items-center">
|
31
|
+
<div class="i-ri-list-check-2" />
|
32
|
+
<span class="ml-1">Aside</span>
|
33
|
+
</div>
|
34
|
+
</template>
|
35
|
+
<HairyOutline />
|
36
|
+
</ElTabPane>
|
37
|
+
<ElTabPane label="Series" name="series">
|
38
|
+
<template #label>
|
39
|
+
<div class="flex items-center gap-1">
|
40
|
+
<div class="i-ri-flow-chart" />
|
41
|
+
<span class="ml-1">Series</span>
|
42
|
+
</div>
|
43
|
+
</template>
|
44
|
+
<HairyArticleSeries />
|
45
|
+
</ElTabPane>
|
46
|
+
<ElTabPane label="User" name="user">
|
47
|
+
<template #label>
|
48
|
+
<div class="flex items-center gap-1">
|
49
|
+
<div class="i-ri-user-line" />
|
50
|
+
<span class="ml-1">User</span>
|
51
|
+
</div>
|
52
|
+
</template>
|
53
|
+
<HairySidebar />
|
54
|
+
</ElTabPane>
|
55
|
+
</ElTabs>
|
56
|
+
</template>
|
package/components/PageTags.vue
CHANGED
@@ -1,48 +1,48 @@
|
|
1
|
-
<script lang="ts" setup>
|
2
|
-
import { useRouter } from 'vue-router'
|
3
|
-
import { useHairyTags } from '../../composables'
|
4
|
-
|
5
|
-
const router = useRouter()
|
6
|
-
|
7
|
-
const { getTagStyle, tags } = useHairyTags({
|
8
|
-
primary: '#1bc9a6',
|
9
|
-
})
|
10
|
-
|
11
|
-
function displayTag(tag: string) {
|
12
|
-
router.push(`/tags/${tag}`)
|
13
|
-
}
|
14
|
-
</script>
|
15
|
-
|
16
|
-
<template>
|
17
|
-
<div class="min-h-59vh flex-center flex-col">
|
18
|
-
<div text="center" class="text-size-2.5em pt-10 mb-5">
|
19
|
-
目前共计 {{ Array.from(tags).length }} 个标签
|
20
|
-
</div>
|
21
|
-
<div text="center" class="max-w-7xl flex flex-wrap justify-center items-center gap-2">
|
22
|
-
<a
|
23
|
-
v-for="[key, tag] in Array.from(tags).sort()"
|
24
|
-
:key="key" class="post-tag cursor-pointer"
|
25
|
-
:style="getTagStyle(tag.count)"
|
26
|
-
p="1"
|
27
|
-
@click="displayTag(key.toString())"
|
28
|
-
>
|
29
|
-
{{ key }}
|
30
|
-
</a>
|
31
|
-
</div>
|
32
|
-
</div>
|
33
|
-
</template>
|
34
|
-
|
35
|
-
<route lang="yaml">
|
36
|
-
meta:
|
37
|
-
layout: tags
|
38
|
-
</route>
|
39
|
-
|
40
|
-
<style lang="scss" scoped>
|
41
|
-
a {
|
42
|
-
color: var(--yun-tag-color);
|
43
|
-
&:hover {
|
44
|
-
--un-text-opacity: 1;
|
45
|
-
color: var(--hy-c-primary-dark);
|
46
|
-
}
|
47
|
-
}
|
48
|
-
</style>
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { useRouter } from 'vue-router'
|
3
|
+
import { useHairyTags } from '../../composables'
|
4
|
+
|
5
|
+
const router = useRouter()
|
6
|
+
|
7
|
+
const { getTagStyle, tags } = useHairyTags({
|
8
|
+
primary: '#1bc9a6',
|
9
|
+
})
|
10
|
+
|
11
|
+
function displayTag(tag: string) {
|
12
|
+
router.push(`/tags/${tag}`)
|
13
|
+
}
|
14
|
+
</script>
|
15
|
+
|
16
|
+
<template>
|
17
|
+
<div class="min-h-59vh flex-center flex-col">
|
18
|
+
<div text="center" class="text-size-2.5em pt-10 mb-5">
|
19
|
+
目前共计 {{ Array.from(tags).length }} 个标签
|
20
|
+
</div>
|
21
|
+
<div text="center" class="max-w-7xl flex flex-wrap justify-center items-center gap-2">
|
22
|
+
<a
|
23
|
+
v-for="[key, tag] in Array.from(tags).sort()"
|
24
|
+
:key="key" class="post-tag cursor-pointer"
|
25
|
+
:style="getTagStyle(tag.count)"
|
26
|
+
p="1"
|
27
|
+
@click="displayTag(key.toString())"
|
28
|
+
>
|
29
|
+
{{ key }}
|
30
|
+
</a>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
</template>
|
34
|
+
|
35
|
+
<route lang="yaml">
|
36
|
+
meta:
|
37
|
+
layout: tags
|
38
|
+
</route>
|
39
|
+
|
40
|
+
<style lang="scss" scoped>
|
41
|
+
a {
|
42
|
+
color: var(--yun-tag-color);
|
43
|
+
&:hover {
|
44
|
+
--un-text-opacity: 1;
|
45
|
+
color: var(--hy-c-primary-dark);
|
46
|
+
}
|
47
|
+
}
|
48
|
+
</style>
|