valaxy-theme-hairy 1.0.1 → 1.0.2
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.
- 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
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 云游君
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 云游君
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/client/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../composables'
|
|
1
|
+
export * from '../composables'
|
package/components/HairyBody.vue
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
</script>
|
|
3
|
-
|
|
4
|
-
<template>
|
|
5
|
-
<div class="min-h-49vh relative z-5">
|
|
6
|
-
<div class="mx-auto container flex z-1 relative">
|
|
7
|
-
<div class="relative flex-1 pt-2 main">
|
|
8
|
-
<slot />
|
|
9
|
-
<HairyComment />
|
|
10
|
-
</div>
|
|
11
|
-
<div class="ml-4 w-60 lg:block hidden">
|
|
12
|
-
<div class="sticky top-3.125rem z-1">
|
|
13
|
-
<slot v-if="$slots.slide" name="slide" />
|
|
14
|
-
<HairySidebar v-else />
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
18
|
-
|
|
19
|
-
<div class="HairyBodyBackground" />
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<style lang="scss">
|
|
24
|
-
.HairyBodyBackground {
|
|
25
|
-
@apply absolute top-0 max-h-150vh top-5 bottom-0 w-full;
|
|
26
|
-
opacity: 0;
|
|
27
|
-
}
|
|
28
|
-
.main {
|
|
29
|
-
background: linear-gradient(to bottom,#fafafa 0,#fff 20%) no-repeat top;
|
|
30
|
-
padding: 1.25rem;
|
|
31
|
-
border-radius: 10px
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.dark {
|
|
35
|
-
.HairyBodyBackground {
|
|
36
|
-
opacity: 1;
|
|
37
|
-
background-image:
|
|
38
|
-
linear-gradient(to bottom, var(--hy-c-waves-dimm) 0%, transparent 60%, var(--hy-c-waves-dimm) 100%), url(./images/bg.jpg);
|
|
39
|
-
background-position: center;
|
|
40
|
-
opacity: 0.4;
|
|
41
|
-
background-repeat: no-repeat;
|
|
42
|
-
filter: blur(0px);
|
|
43
|
-
background-size: cover;
|
|
44
|
-
}
|
|
45
|
-
.main {
|
|
46
|
-
background: transparent;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
</style>
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
</script>
|
|
3
|
+
|
|
4
|
+
<template>
|
|
5
|
+
<div class="min-h-49vh relative z-5">
|
|
6
|
+
<div class="mx-auto container flex z-1 relative">
|
|
7
|
+
<div class="relative flex-1 pt-2 main">
|
|
8
|
+
<slot />
|
|
9
|
+
<HairyComment />
|
|
10
|
+
</div>
|
|
11
|
+
<div class="ml-4 w-60 lg:block hidden">
|
|
12
|
+
<div class="sticky top-3.125rem z-1">
|
|
13
|
+
<slot v-if="$slots.slide" name="slide" />
|
|
14
|
+
<HairySidebar v-else />
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div class="HairyBodyBackground" />
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<style lang="scss">
|
|
24
|
+
.HairyBodyBackground {
|
|
25
|
+
@apply absolute top-0 max-h-150vh top-5 bottom-0 w-full;
|
|
26
|
+
opacity: 0;
|
|
27
|
+
}
|
|
28
|
+
.main {
|
|
29
|
+
background: linear-gradient(to bottom,#fafafa 0,#fff 20%) no-repeat top;
|
|
30
|
+
padding: 1.25rem;
|
|
31
|
+
border-radius: 10px
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.dark {
|
|
35
|
+
.HairyBodyBackground {
|
|
36
|
+
opacity: 1;
|
|
37
|
+
background-image:
|
|
38
|
+
linear-gradient(to bottom, var(--hy-c-waves-dimm) 0%, transparent 60%, var(--hy-c-waves-dimm) 100%), url(./images/bg.jpg);
|
|
39
|
+
background-position: center;
|
|
40
|
+
opacity: 0.4;
|
|
41
|
+
background-repeat: no-repeat;
|
|
42
|
+
filter: blur(0px);
|
|
43
|
+
background-size: cover;
|
|
44
|
+
}
|
|
45
|
+
.main {
|
|
46
|
+
background: transparent;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
</style>
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { useScriptTag } from '@vueuse/core'
|
|
3
|
-
import { defineProps, withDefaults } from 'vue'
|
|
4
|
-
|
|
5
|
-
withDefaults(
|
|
6
|
-
defineProps<{
|
|
7
|
-
height: number | string
|
|
8
|
-
defaultTab: string
|
|
9
|
-
slugHash: string
|
|
10
|
-
user?: string
|
|
11
|
-
prefill?: Record<string, any>
|
|
12
|
-
title?: string
|
|
13
|
-
placeholder?: string
|
|
14
|
-
theme?: string
|
|
15
|
-
}>(),
|
|
16
|
-
{
|
|
17
|
-
height: 300,
|
|
18
|
-
defaultTab: 'html',
|
|
19
|
-
},
|
|
20
|
-
)
|
|
21
|
-
|
|
22
|
-
useScriptTag('https://cpwebassets.codepen.io/assets/embed/ei.js')
|
|
23
|
-
</script>
|
|
24
|
-
|
|
25
|
-
<template>
|
|
26
|
-
<div
|
|
27
|
-
class="codepen"
|
|
28
|
-
:data-height="300"
|
|
29
|
-
:data-default-tab="defaultTab"
|
|
30
|
-
:data-slug-hash="slugHash"
|
|
31
|
-
:data-user="user"
|
|
32
|
-
:data-prefill="prefill"
|
|
33
|
-
:data-pen-title="title"
|
|
34
|
-
:data-placeholder="placeholder"
|
|
35
|
-
:data-theme-id="theme"
|
|
36
|
-
/>
|
|
37
|
-
</template>
|
|
38
|
-
|
|
39
|
-
<style lang="scss" scoped>
|
|
40
|
-
</style>
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { useScriptTag } from '@vueuse/core'
|
|
3
|
+
import { defineProps, withDefaults } from 'vue'
|
|
4
|
+
|
|
5
|
+
withDefaults(
|
|
6
|
+
defineProps<{
|
|
7
|
+
height: number | string
|
|
8
|
+
defaultTab: string
|
|
9
|
+
slugHash: string
|
|
10
|
+
user?: string
|
|
11
|
+
prefill?: Record<string, any>
|
|
12
|
+
title?: string
|
|
13
|
+
placeholder?: string
|
|
14
|
+
theme?: string
|
|
15
|
+
}>(),
|
|
16
|
+
{
|
|
17
|
+
height: 300,
|
|
18
|
+
defaultTab: 'html',
|
|
19
|
+
},
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
useScriptTag('https://cpwebassets.codepen.io/assets/embed/ei.js')
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<div
|
|
27
|
+
class="codepen"
|
|
28
|
+
:data-height="300"
|
|
29
|
+
:data-default-tab="defaultTab"
|
|
30
|
+
:data-slug-hash="slugHash"
|
|
31
|
+
:data-user="user"
|
|
32
|
+
:data-prefill="prefill"
|
|
33
|
+
:data-pen-title="title"
|
|
34
|
+
:data-placeholder="placeholder"
|
|
35
|
+
:data-theme-id="theme"
|
|
36
|
+
/>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<style lang="scss" scoped>
|
|
40
|
+
</style>
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { useAddonWaline } from 'valaxy-addon-waline'
|
|
3
|
-
|
|
4
|
-
const addon = useAddonWaline()
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<template>
|
|
8
|
-
<WalineClient w="full" :options="addon.options" />
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<style lang="scss">
|
|
12
|
-
// 可以在此处覆盖 waline 样式
|
|
13
|
-
:root {
|
|
14
|
-
--waline-theme-color: var(--hy-c-primary);
|
|
15
|
-
--waline-active-color: var(--hy-c-primary-dark)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.wl-editor {
|
|
19
|
-
padding: 4px;
|
|
20
|
-
width: calc(100% - 1rem - 8px);
|
|
21
|
-
}
|
|
22
|
-
.wl-emoji-popup {
|
|
23
|
-
border-bottom: none !important;
|
|
24
|
-
z-index: 1000;
|
|
25
|
-
}
|
|
26
|
-
.wl-emoji-popup .wl-tabs {
|
|
27
|
-
height: auto !important;
|
|
28
|
-
overflow-x: auto !important;
|
|
29
|
-
padding: 0 !important;
|
|
30
|
-
margin-left: -1px;
|
|
31
|
-
margin-right: -1px;
|
|
32
|
-
}
|
|
33
|
-
</style>
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { useAddonWaline } from 'valaxy-addon-waline'
|
|
3
|
+
|
|
4
|
+
const addon = useAddonWaline()
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<WalineClient w="full" :options="addon.options" />
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<style lang="scss">
|
|
12
|
+
// 可以在此处覆盖 waline 样式
|
|
13
|
+
:root {
|
|
14
|
+
--waline-theme-color: var(--hy-c-primary);
|
|
15
|
+
--waline-active-color: var(--hy-c-primary-dark)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.wl-editor {
|
|
19
|
+
padding: 4px;
|
|
20
|
+
width: calc(100% - 1rem - 8px);
|
|
21
|
+
}
|
|
22
|
+
.wl-emoji-popup {
|
|
23
|
+
border-bottom: none !important;
|
|
24
|
+
z-index: 1000;
|
|
25
|
+
}
|
|
26
|
+
.wl-emoji-popup .wl-tabs {
|
|
27
|
+
height: auto !important;
|
|
28
|
+
overflow-x: auto !important;
|
|
29
|
+
padding: 0 !important;
|
|
30
|
+
margin-left: -1px;
|
|
31
|
+
margin-right: -1px;
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { onMounted } from 'vue'
|
|
3
|
-
import { setupDefaultDark } from '../composables'
|
|
4
|
-
|
|
5
|
-
import 'element-plus/theme-chalk/base.css'
|
|
6
|
-
import 'element-plus/theme-chalk/el-timeline.css'
|
|
7
|
-
import 'element-plus/theme-chalk/el-timeline-item.css'
|
|
8
|
-
|
|
9
|
-
onMounted(setupDefaultDark)
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<template>
|
|
13
|
-
<div class="min-h-80vh">
|
|
14
|
-
<slot />
|
|
15
|
-
<HairyDrawer />
|
|
16
|
-
</div>
|
|
17
|
-
</template>
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { onMounted } from 'vue'
|
|
3
|
+
import { setupDefaultDark } from '../composables'
|
|
4
|
+
|
|
5
|
+
import 'element-plus/theme-chalk/base.css'
|
|
6
|
+
import 'element-plus/theme-chalk/el-timeline.css'
|
|
7
|
+
import 'element-plus/theme-chalk/el-timeline-item.css'
|
|
8
|
+
|
|
9
|
+
onMounted(setupDefaultDark)
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<div class="min-h-80vh">
|
|
14
|
+
<slot />
|
|
15
|
+
<HairyDrawer />
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import 'element-plus/theme-chalk/el-dialog.css'
|
|
3
|
-
import { ElDrawer } from 'element-plus
|
|
4
|
-
import { useRoute } from 'vue-router'
|
|
5
|
-
import { watch } from 'vue'
|
|
6
|
-
import { storeToRefs } from 'pinia'
|
|
7
|
-
import { useGlobalStore } from '../store'
|
|
8
|
-
|
|
9
|
-
const route = useRoute()
|
|
10
|
-
|
|
11
|
-
const { showDrawer } = storeToRefs(useGlobalStore())
|
|
12
|
-
|
|
13
|
-
watch(() => route.fullPath, () => showDrawer.value = false)
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<template>
|
|
17
|
-
<ElDrawer v-model="showDrawer" direction="ltr" size="auto" @close="showDrawer = false">
|
|
18
|
-
<div class="h-24px" />
|
|
19
|
-
<HairyTabbar v-if="route.fullPath.includes('/posts/')" />
|
|
20
|
-
<HairySidebar v-else />
|
|
21
|
-
<div class="dark:hidden absolute inset-0 bg-white bg-opacity-85" />
|
|
22
|
-
</ElDrawer>
|
|
23
|
-
</template>
|
|
24
|
-
|
|
25
|
-
<style lang="scss">
|
|
26
|
-
.el-drawer {
|
|
27
|
-
background-color: transparent;
|
|
28
|
-
.el-drawer__header {
|
|
29
|
-
display: none;
|
|
30
|
-
}
|
|
31
|
-
.el-icon.el-drawer__close {
|
|
32
|
-
font-size: 24px;
|
|
33
|
-
}
|
|
34
|
-
@media (max-width: 375px) {
|
|
35
|
-
width: 100% !important;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
.dark {
|
|
39
|
-
.el-drawer {
|
|
40
|
-
background: radial-gradient(black, transparent);
|
|
41
|
-
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
</style>
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import 'element-plus/theme-chalk/el-dialog.css'
|
|
3
|
+
import { ElDrawer } from 'element-plus'
|
|
4
|
+
import { useRoute } from 'vue-router'
|
|
5
|
+
import { watch } from 'vue'
|
|
6
|
+
import { storeToRefs } from 'pinia'
|
|
7
|
+
import { useGlobalStore } from '../store'
|
|
8
|
+
|
|
9
|
+
const route = useRoute()
|
|
10
|
+
|
|
11
|
+
const { showDrawer } = storeToRefs(useGlobalStore())
|
|
12
|
+
|
|
13
|
+
watch(() => route.fullPath, () => showDrawer.value = false)
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<ElDrawer v-model="showDrawer" direction="ltr" size="auto" @close="showDrawer = false">
|
|
18
|
+
<div class="h-24px" />
|
|
19
|
+
<HairyTabbar v-if="route.fullPath.includes('/posts/')" />
|
|
20
|
+
<HairySidebar v-else />
|
|
21
|
+
<div class="dark:hidden absolute inset-0 bg-white bg-opacity-85" />
|
|
22
|
+
</ElDrawer>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<style lang="scss">
|
|
26
|
+
.el-drawer {
|
|
27
|
+
background-color: transparent;
|
|
28
|
+
.el-drawer__header {
|
|
29
|
+
display: none;
|
|
30
|
+
}
|
|
31
|
+
.el-icon.el-drawer__close {
|
|
32
|
+
font-size: 24px;
|
|
33
|
+
}
|
|
34
|
+
@media (max-width: 375px) {
|
|
35
|
+
width: 100% !important;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
.dark {
|
|
39
|
+
.el-drawer {
|
|
40
|
+
background: radial-gradient(black, transparent);
|
|
41
|
+
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
</style>
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { capitalize, computed } from 'vue'
|
|
3
|
-
import { useConfig, useSiteConfig, useThemeConfig } from 'valaxy'
|
|
4
|
-
import { useI18n } from 'vue-i18n'
|
|
5
|
-
import pkg from 'valaxy/package.json'
|
|
6
|
-
import type { HairyTheme } from 'valaxy-theme-hairy'
|
|
7
|
-
|
|
8
|
-
const { t } = useI18n()
|
|
9
|
-
|
|
10
|
-
const config = useConfig()
|
|
11
|
-
const sideConfig = useSiteConfig()
|
|
12
|
-
const themeConfig = useThemeConfig<HairyTheme.Config>()
|
|
13
|
-
|
|
14
|
-
const year = new Date().getFullYear()
|
|
15
|
-
|
|
16
|
-
const isThisYear = computed(() => {
|
|
17
|
-
return year === themeConfig.value.footer?.since
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
const poweredHtml = computed(() => t('footer.powered', [`<a href="${pkg.repository}" target="_blank" rel="noopener">Valaxy</a> v${pkg.version}`]))
|
|
21
|
-
const footerIcon = computed(() => themeConfig.value.footer?.icon)
|
|
22
|
-
|
|
23
|
-
// const frontmatter = useFrontmatter()
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<template>
|
|
27
|
-
<footer v-if="themeConfig.footer" class="va-footer pt-5" text="center sm" style="color:var(--va-c-text-light); overflow-x: hidden;">
|
|
28
|
-
<div class="z-5 relative">
|
|
29
|
-
<div v-if="themeConfig.footer.beian?.enable && themeConfig.footer.beian.icp" class="beian" m="y-2">
|
|
30
|
-
<a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener">
|
|
31
|
-
{{ themeConfig.footer.beian.icp }}
|
|
32
|
-
</a>
|
|
33
|
-
</div>
|
|
34
|
-
<div class="copyright flex justify-center items-center" p="1">
|
|
35
|
-
<span>
|
|
36
|
-
©
|
|
37
|
-
<template v-if="!isThisYear">
|
|
38
|
-
{{ themeConfig.footer.since }} -
|
|
39
|
-
</template>
|
|
40
|
-
{{ year }}
|
|
41
|
-
</span>
|
|
42
|
-
|
|
43
|
-
<a v-if="footerIcon" class="inline-flex animate-pulse ml-2" :href="footerIcon.url" target="_blank" :title="footerIcon.title">
|
|
44
|
-
<div :class="footerIcon.name" />
|
|
45
|
-
</a>
|
|
46
|
-
|
|
47
|
-
<span>{{ sideConfig.author.name }}</span>
|
|
48
|
-
<span class="mx-2">|</span>
|
|
49
|
-
<span class="flex items-center">
|
|
50
|
-
<div class="i-ri-eye-fill mr-1" />
|
|
51
|
-
<span class="waline-pageview-count" data-path="/">-</span>
|
|
52
|
-
</span>
|
|
53
|
-
</div>
|
|
54
|
-
<div v-if="themeConfig.footer.powered" class="powered" m="2">
|
|
55
|
-
<span v-html="poweredHtml" /> | <span>{{ t('footer.theme') }} - <a :href="themeConfig.pkg.homepage" :title="`valaxy-theme-${config.theme}`" target="_blank">{{ capitalize(config.theme) }}</a> v{{ themeConfig.pkg.version }}</span>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
|
|
59
|
-
<slot />
|
|
60
|
-
<HairyFootFish />
|
|
61
|
-
</footer>
|
|
62
|
-
</template>
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { capitalize, computed } from 'vue'
|
|
3
|
+
import { useConfig, useSiteConfig, useThemeConfig } from 'valaxy'
|
|
4
|
+
import { useI18n } from 'vue-i18n'
|
|
5
|
+
import pkg from 'valaxy/package.json'
|
|
6
|
+
import type { HairyTheme } from 'valaxy-theme-hairy'
|
|
7
|
+
|
|
8
|
+
const { t } = useI18n()
|
|
9
|
+
|
|
10
|
+
const config = useConfig()
|
|
11
|
+
const sideConfig = useSiteConfig()
|
|
12
|
+
const themeConfig = useThemeConfig<HairyTheme.Config>()
|
|
13
|
+
|
|
14
|
+
const year = new Date().getFullYear()
|
|
15
|
+
|
|
16
|
+
const isThisYear = computed(() => {
|
|
17
|
+
return year === themeConfig.value.footer?.since
|
|
18
|
+
})
|
|
19
|
+
|
|
20
|
+
const poweredHtml = computed(() => t('footer.powered', [`<a href="${pkg.repository}" target="_blank" rel="noopener">Valaxy</a> v${pkg.version}`]))
|
|
21
|
+
const footerIcon = computed(() => themeConfig.value.footer?.icon)
|
|
22
|
+
|
|
23
|
+
// const frontmatter = useFrontmatter()
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<footer v-if="themeConfig.footer" class="va-footer pt-5" text="center sm" style="color:var(--va-c-text-light); overflow-x: hidden;">
|
|
28
|
+
<div class="z-5 relative">
|
|
29
|
+
<div v-if="themeConfig.footer.beian?.enable && themeConfig.footer.beian.icp" class="beian" m="y-2">
|
|
30
|
+
<a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener">
|
|
31
|
+
{{ themeConfig.footer.beian.icp }}
|
|
32
|
+
</a>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="copyright flex justify-center items-center" p="1">
|
|
35
|
+
<span>
|
|
36
|
+
©
|
|
37
|
+
<template v-if="!isThisYear">
|
|
38
|
+
{{ themeConfig.footer.since }} -
|
|
39
|
+
</template>
|
|
40
|
+
{{ year }}
|
|
41
|
+
</span>
|
|
42
|
+
|
|
43
|
+
<a v-if="footerIcon" class="inline-flex animate-pulse ml-2" :href="footerIcon.url" target="_blank" :title="footerIcon.title">
|
|
44
|
+
<div :class="footerIcon.name" />
|
|
45
|
+
</a>
|
|
46
|
+
|
|
47
|
+
<span>{{ sideConfig.author.name }}</span>
|
|
48
|
+
<span class="mx-2">|</span>
|
|
49
|
+
<span class="flex items-center">
|
|
50
|
+
<div class="i-ri-eye-fill mr-1" />
|
|
51
|
+
<span class="waline-pageview-count" data-path="/">-</span>
|
|
52
|
+
</span>
|
|
53
|
+
</div>
|
|
54
|
+
<div v-if="themeConfig.footer.powered" class="powered" m="2">
|
|
55
|
+
<span v-html="poweredHtml" /> | <span>{{ t('footer.theme') }} - <a :href="themeConfig.pkg.homepage" :title="`valaxy-theme-${config.theme}`" target="_blank">{{ capitalize(config.theme) }}</a> v{{ themeConfig.pkg.version }}</span>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<slot />
|
|
60
|
+
<HairyFootFish />
|
|
61
|
+
</footer>
|
|
62
|
+
</template>
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { storeToRefs } from 'pinia'
|
|
3
|
-
import { useGlobalStore } from '../store'
|
|
4
|
-
|
|
5
|
-
defineProps<{
|
|
6
|
-
headline?: string
|
|
7
|
-
title?: string
|
|
8
|
-
description?: string
|
|
9
|
-
}>()
|
|
10
|
-
|
|
11
|
-
const { headerRef } = storeToRefs(useGlobalStore())
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<template>
|
|
15
|
-
<header ref="headerRef" class="relative animate__animated animate__fadeIn">
|
|
16
|
-
<div class="h-30vh lt-md:h-60vh min-h-80 flex-center">
|
|
17
|
-
<HairyHeadHero v-if="title || headline || description || $slots.description" class="relative z-2" :title="title" v-bind="$props">
|
|
18
|
-
<template #description>
|
|
19
|
-
<slot name="description" />
|
|
20
|
-
</template>
|
|
21
|
-
</HairyHeadHero>
|
|
22
|
-
</div>
|
|
23
|
-
<HairySwiperCarousel class="inset-0" style="position: absolute" />
|
|
24
|
-
<HairyHeadWaves class="relative z-10" />
|
|
25
|
-
</header>
|
|
26
|
-
</template>
|
|
27
|
-
|
|
28
|
-
<style>
|
|
29
|
-
.HairyHeader {
|
|
30
|
-
position: relative;
|
|
31
|
-
}
|
|
32
|
-
</style>
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { storeToRefs } from 'pinia'
|
|
3
|
+
import { useGlobalStore } from '../store'
|
|
4
|
+
|
|
5
|
+
defineProps<{
|
|
6
|
+
headline?: string
|
|
7
|
+
title?: string
|
|
8
|
+
description?: string
|
|
9
|
+
}>()
|
|
10
|
+
|
|
11
|
+
const { headerRef } = storeToRefs(useGlobalStore())
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<header ref="headerRef" class="relative animate__animated animate__fadeIn">
|
|
16
|
+
<div class="h-30vh lt-md:h-60vh min-h-80 flex-center">
|
|
17
|
+
<HairyHeadHero v-if="title || headline || description || $slots.description" class="relative z-2" :title="title" v-bind="$props">
|
|
18
|
+
<template #description>
|
|
19
|
+
<slot name="description" />
|
|
20
|
+
</template>
|
|
21
|
+
</HairyHeadHero>
|
|
22
|
+
</div>
|
|
23
|
+
<HairySwiperCarousel class="inset-0" style="position: absolute" />
|
|
24
|
+
<HairyHeadWaves class="relative z-10" />
|
|
25
|
+
</header>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<style>
|
|
29
|
+
.HairyHeader {
|
|
30
|
+
position: relative;
|
|
31
|
+
}
|
|
32
|
+
</style>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { ElImage, imageProps } from 'element-plus
|
|
3
|
-
import 'element-plus/theme-chalk/el-image.css'
|
|
4
|
-
import { inject } from 'vue'
|
|
5
|
-
|
|
6
|
-
const props = defineProps(imageProps)
|
|
7
|
-
|
|
8
|
-
const preview = inject<any>('HairyImageGroup:preview', undefined)
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<ElImage v-bind="props" class="HairyImage" :class="[preview && 'cursor-pointer rounded']" @click="preview?.(src)" />
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<style lang="scss" scoped></style>
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { ElImage, imageProps } from 'element-plus'
|
|
3
|
+
import 'element-plus/theme-chalk/el-image.css'
|
|
4
|
+
import { inject } from 'vue'
|
|
5
|
+
|
|
6
|
+
const props = defineProps(imageProps)
|
|
7
|
+
|
|
8
|
+
const preview = inject<any>('HairyImageGroup:preview', undefined)
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<ElImage v-bind="props" class="HairyImage" :class="[preview && 'cursor-pointer rounded']" @click="preview?.(src)" />
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<style lang="scss" scoped></style>
|