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,36 +1,36 @@
|
|
1
|
-
<script lang="ts" setup>
|
2
|
-
import { useElementSize, useScroll } from '@vueuse/core'
|
3
|
-
import { computed } from 'vue'
|
4
|
-
import { storeToRefs } from 'pinia'
|
5
|
-
import { useGlobalStore } from '../../store'
|
6
|
-
import { useLayoutPost } from '../../composables'
|
7
|
-
|
8
|
-
const layout = useLayoutPost()
|
9
|
-
|
10
|
-
const layouts = [
|
11
|
-
{ layout: 'image:slice:reverse' as const, icon: 'i-fluent-text-align-distributed-24-filled' },
|
12
|
-
{ layout: 'image:slice' as const, icon: 'i-fluent-text-align-left-16-filled' },
|
13
|
-
{ layout: 'image' as const, icon: 'i-fluent-text-align-justify-20-filled' },
|
14
|
-
{ layout: 'markdown' as const, icon: 'i-fluent-markdown-20-filled' },
|
15
|
-
{ layout: 'text' as const, icon: 'i-fluent-code-text-16-filled' },
|
16
|
-
]
|
17
|
-
|
18
|
-
const globalStore = useGlobalStore()
|
19
|
-
const { headerRef } = storeToRefs(globalStore)
|
20
|
-
const { height: headerHeight } = useElementSize(headerRef)
|
21
|
-
const scroll = useScroll(document)
|
22
|
-
|
23
|
-
const show = computed(() => {
|
24
|
-
return scroll.y.value > headerHeight.value
|
25
|
-
})
|
26
|
-
</script>
|
27
|
-
|
28
|
-
<template>
|
29
|
-
<div class="inline-flex gap-2 sticky top-15 inset-0 rounded-2" :class="[show && 'bg-white bg-opacity-85 dark:bg-black dark:bg-opacity-80 z-100']">
|
30
|
-
<div v-for="(item) in layouts" :key="item.layout" class="p-2 rounded-full cursor-pointer" :class="[layout === item.layout && 'text-primary']" @click="layout = item.layout">
|
31
|
-
<div class="text-size-xl" :class="item.icon" />
|
32
|
-
</div>
|
33
|
-
</div>
|
34
|
-
</template>
|
35
|
-
|
36
|
-
<style lang="scss" scoped></style>
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { useElementSize, useScroll } from '@vueuse/core'
|
3
|
+
import { computed } from 'vue'
|
4
|
+
import { storeToRefs } from 'pinia'
|
5
|
+
import { useGlobalStore } from '../../store'
|
6
|
+
import { useLayoutPost } from '../../composables'
|
7
|
+
|
8
|
+
const layout = useLayoutPost()
|
9
|
+
|
10
|
+
const layouts = [
|
11
|
+
{ layout: 'image:slice:reverse' as const, icon: 'i-fluent-text-align-distributed-24-filled' },
|
12
|
+
{ layout: 'image:slice' as const, icon: 'i-fluent-text-align-left-16-filled' },
|
13
|
+
{ layout: 'image' as const, icon: 'i-fluent-text-align-justify-20-filled' },
|
14
|
+
{ layout: 'markdown' as const, icon: 'i-fluent-markdown-20-filled' },
|
15
|
+
{ layout: 'text' as const, icon: 'i-fluent-code-text-16-filled' },
|
16
|
+
]
|
17
|
+
|
18
|
+
const globalStore = useGlobalStore()
|
19
|
+
const { headerRef } = storeToRefs(globalStore)
|
20
|
+
const { height: headerHeight } = useElementSize(headerRef)
|
21
|
+
const scroll = useScroll(document)
|
22
|
+
|
23
|
+
const show = computed(() => {
|
24
|
+
return scroll.y.value > headerHeight.value
|
25
|
+
})
|
26
|
+
</script>
|
27
|
+
|
28
|
+
<template>
|
29
|
+
<div class="inline-flex gap-2 sticky top-15 inset-0 rounded-2" :class="[show && 'bg-white bg-opacity-85 dark:bg-black dark:bg-opacity-80 z-100']">
|
30
|
+
<div v-for="(item) in layouts" :key="item.layout" class="p-2 rounded-full cursor-pointer" :class="[layout === item.layout && 'text-primary']" @click="layout = item.layout">
|
31
|
+
<div class="text-size-xl" :class="item.icon" />
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
</template>
|
35
|
+
|
36
|
+
<style lang="scss" scoped></style>
|
@@ -1,17 +1,17 @@
|
|
1
|
-
<script lang="ts" setup>
|
2
|
-
import * as addonAlgolia from 'valaxy-addon-algolia'
|
3
|
-
import { isEmptyAddon } from 'valaxy'
|
4
|
-
import { whenever } from '@vueuse/core'
|
5
|
-
|
6
|
-
if (isEmptyAddon(addonAlgolia))
|
7
|
-
throw new Error('Algolia addon is not installed')
|
8
|
-
|
9
|
-
const { loaded, load, dispatchEvent } = addonAlgolia.useAddonAlgolia()
|
10
|
-
|
11
|
-
whenever(loaded, dispatchEvent)
|
12
|
-
</script>
|
13
|
-
|
14
|
-
<template>
|
15
|
-
<AlgoliaSearchBox v-if="loaded" class="VPNavBarSearch" />
|
16
|
-
<HairySearchBtnDisplay v-else @click="load()" />
|
17
|
-
</template>
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import * as addonAlgolia from 'valaxy-addon-algolia'
|
3
|
+
import { isEmptyAddon } from 'valaxy'
|
4
|
+
import { whenever } from '@vueuse/core'
|
5
|
+
|
6
|
+
if (isEmptyAddon(addonAlgolia))
|
7
|
+
throw new Error('Algolia addon is not installed')
|
8
|
+
|
9
|
+
const { loaded, load, dispatchEvent } = addonAlgolia.useAddonAlgolia()
|
10
|
+
|
11
|
+
whenever(loaded, dispatchEvent)
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<template>
|
15
|
+
<AlgoliaSearchBox v-if="loaded" class="VPNavBarSearch" />
|
16
|
+
<HairySearchBtnDisplay v-else @click="load()" />
|
17
|
+
</template>
|
@@ -1,10 +1,10 @@
|
|
1
|
-
<script lang="ts" setup>
|
2
|
-
import { ref } from 'vue'
|
3
|
-
|
4
|
-
const visible = ref(false)
|
5
|
-
</script>
|
6
|
-
|
7
|
-
<template>
|
8
|
-
<HairySearchBtnDisplay @click="visible = true" />
|
9
|
-
<HairyFuseSearchDialog v-model:visible="visible" />
|
10
|
-
</template>
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { ref } from 'vue'
|
3
|
+
|
4
|
+
const visible = ref(false)
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<template>
|
8
|
+
<HairySearchBtnDisplay @click="visible = true" />
|
9
|
+
<HairyFuseSearchDialog v-model:visible="visible" />
|
10
|
+
</template>
|
@@ -1,32 +1,32 @@
|
|
1
|
-
<script lang="ts" setup>
|
2
|
-
import { ref, useModel } from 'vue'
|
3
|
-
import { onKeyDown, whenever } from '@vueuse/core'
|
4
|
-
|
5
|
-
const props = defineProps<{
|
6
|
-
visible: boolean
|
7
|
-
}>()
|
8
|
-
const visible = useModel(props, 'visible')
|
9
|
-
|
10
|
-
const text = ref('')
|
11
|
-
|
12
|
-
onKeyDown('Escape', () => {
|
13
|
-
if (!visible.value)
|
14
|
-
return
|
15
|
-
visible.value = false
|
16
|
-
})
|
17
|
-
whenever(() => !visible.value, () => {
|
18
|
-
text.value = ''
|
19
|
-
})
|
20
|
-
</script>
|
21
|
-
|
22
|
-
<template>
|
23
|
-
<div v-if="visible" role="button" class="DocSearch DocSearch-Container " @click="visible = false">
|
24
|
-
<div class="DocSearch-Modal" style="--docsearch-vh: 5.5200000000000005px;" @click.stop>
|
25
|
-
<HairyFuseSearchHeader v-model:text="text" v-model:visible="visible" />
|
26
|
-
<HairyFuseSearchDropdown v-model:visible="visible" :text="text" />
|
27
|
-
<HairyFuseSearchFooter />
|
28
|
-
</div>
|
29
|
-
</div>
|
30
|
-
</template>
|
31
|
-
|
32
|
-
<style lang="scss" scoped></style>
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { ref, useModel } from 'vue'
|
3
|
+
import { onKeyDown, whenever } from '@vueuse/core'
|
4
|
+
|
5
|
+
const props = defineProps<{
|
6
|
+
visible: boolean
|
7
|
+
}>()
|
8
|
+
const visible = useModel(props, 'visible')
|
9
|
+
|
10
|
+
const text = ref('')
|
11
|
+
|
12
|
+
onKeyDown('Escape', () => {
|
13
|
+
if (!visible.value)
|
14
|
+
return
|
15
|
+
visible.value = false
|
16
|
+
})
|
17
|
+
whenever(() => !visible.value, () => {
|
18
|
+
text.value = ''
|
19
|
+
})
|
20
|
+
</script>
|
21
|
+
|
22
|
+
<template>
|
23
|
+
<div v-if="visible" role="button" class="DocSearch DocSearch-Container " @click="visible = false">
|
24
|
+
<div class="DocSearch-Modal" style="--docsearch-vh: 5.5200000000000005px;" @click.stop>
|
25
|
+
<HairyFuseSearchHeader v-model:text="text" v-model:visible="visible" />
|
26
|
+
<HairyFuseSearchDropdown v-model:visible="visible" :text="text" />
|
27
|
+
<HairyFuseSearchFooter />
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</template>
|
31
|
+
|
32
|
+
<style lang="scss" scoped></style>
|
@@ -1,77 +1,77 @@
|
|
1
|
-
<script lang="ts" setup>
|
2
|
-
import { ref, toRef, useModel, watch } from 'vue'
|
3
|
-
import { useRouter } from 'vue-router'
|
4
|
-
import { onKeyDown } from '@vueuse/core'
|
5
|
-
import { useFuseParsed } from '../../composables'
|
6
|
-
|
7
|
-
const props = defineProps<{
|
8
|
-
text: string
|
9
|
-
visible: boolean
|
10
|
-
}>()
|
11
|
-
const visible = useModel(props, 'visible')
|
12
|
-
|
13
|
-
const router = useRouter()
|
14
|
-
|
15
|
-
const input = toRef(props, 'text')
|
16
|
-
|
17
|
-
const { results } = useFuseParsed(input)
|
18
|
-
|
19
|
-
function navigation(link: string) {
|
20
|
-
router.push(link)
|
21
|
-
visible.value = false
|
22
|
-
}
|
23
|
-
const selected = ref(0)
|
24
|
-
|
25
|
-
onKeyDown('ArrowDown', () => {
|
26
|
-
if (!results.value.length || selected.value === results.value.length - 1)
|
27
|
-
return
|
28
|
-
selected.value++
|
29
|
-
})
|
30
|
-
onKeyDown('ArrowUp', () => {
|
31
|
-
if (!results.value.length || selected.value === 0)
|
32
|
-
return
|
33
|
-
selected.value--
|
34
|
-
})
|
35
|
-
onKeyDown('Enter', () => {
|
36
|
-
if (!results.value.length)
|
37
|
-
return
|
38
|
-
navigation(results.value[selected.value].item.link)
|
39
|
-
visible.value = false
|
40
|
-
})
|
41
|
-
watch(results, () => selected.value = 0)
|
42
|
-
</script>
|
43
|
-
|
44
|
-
<template>
|
45
|
-
<div class="DocSearch-Dropdown">
|
46
|
-
<div class="DocSearch-Dropdown-Container">
|
47
|
-
<section v-if="results.length" class="DocSearch-Hits">
|
48
|
-
<div class="DocSearch-Hit-source">
|
49
|
-
Recent
|
50
|
-
</div>
|
51
|
-
<ul id="docsearch-list" role="listbox" aria-labelledby="docsearch-label">
|
52
|
-
<HairyFuseSearchHit
|
53
|
-
v-for="({ item }, index) of results" :key="index"
|
54
|
-
:title="item.title"
|
55
|
-
:selected="selected === index"
|
56
|
-
:excerpt="item.excerpt"
|
57
|
-
:path="item.link"
|
58
|
-
@click="navigation(item.link)"
|
59
|
-
@hover="selected = index"
|
60
|
-
/>
|
61
|
-
</ul>
|
62
|
-
</section>
|
63
|
-
<div v-else-if="!text" class="DocSearch-StartScreen">
|
64
|
-
<p class="DocSearch-Help">
|
65
|
-
No recent searches
|
66
|
-
</p>
|
67
|
-
</div>
|
68
|
-
<div v-else class="DocSearch-NoResults">
|
69
|
-
<div class="DocSearch-Screen-Icon">
|
70
|
-
<svg width="40" height="40" viewBox="0 0 20 20" fill="none" fill-rule="evenodd" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><path d="M15.5 4.8c2 3 1.7 7-1 9.7h0l4.3 4.3-4.3-4.3a7.8 7.8 0 01-9.8 1m-2.2-2.2A7.8 7.8 0 0113.2 2.4M2 18L18 2" /></svg>
|
71
|
-
</div><p class="DocSearch-Title">
|
72
|
-
No results for "<strong>{{ text }}</strong>"
|
73
|
-
</p>
|
74
|
-
</div>
|
75
|
-
</div>
|
76
|
-
</div>
|
77
|
-
</template>
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { ref, toRef, useModel, watch } from 'vue'
|
3
|
+
import { useRouter } from 'vue-router'
|
4
|
+
import { onKeyDown } from '@vueuse/core'
|
5
|
+
import { useFuseParsed } from '../../composables'
|
6
|
+
|
7
|
+
const props = defineProps<{
|
8
|
+
text: string
|
9
|
+
visible: boolean
|
10
|
+
}>()
|
11
|
+
const visible = useModel(props, 'visible')
|
12
|
+
|
13
|
+
const router = useRouter()
|
14
|
+
|
15
|
+
const input = toRef(props, 'text')
|
16
|
+
|
17
|
+
const { results } = useFuseParsed(input)
|
18
|
+
|
19
|
+
function navigation(link: string) {
|
20
|
+
router.push(link)
|
21
|
+
visible.value = false
|
22
|
+
}
|
23
|
+
const selected = ref(0)
|
24
|
+
|
25
|
+
onKeyDown('ArrowDown', () => {
|
26
|
+
if (!results.value.length || selected.value === results.value.length - 1)
|
27
|
+
return
|
28
|
+
selected.value++
|
29
|
+
})
|
30
|
+
onKeyDown('ArrowUp', () => {
|
31
|
+
if (!results.value.length || selected.value === 0)
|
32
|
+
return
|
33
|
+
selected.value--
|
34
|
+
})
|
35
|
+
onKeyDown('Enter', () => {
|
36
|
+
if (!results.value.length)
|
37
|
+
return
|
38
|
+
navigation(results.value[selected.value].item.link)
|
39
|
+
visible.value = false
|
40
|
+
})
|
41
|
+
watch(results, () => selected.value = 0)
|
42
|
+
</script>
|
43
|
+
|
44
|
+
<template>
|
45
|
+
<div class="DocSearch-Dropdown">
|
46
|
+
<div class="DocSearch-Dropdown-Container">
|
47
|
+
<section v-if="results.length" class="DocSearch-Hits">
|
48
|
+
<div class="DocSearch-Hit-source">
|
49
|
+
Recent
|
50
|
+
</div>
|
51
|
+
<ul id="docsearch-list" role="listbox" aria-labelledby="docsearch-label">
|
52
|
+
<HairyFuseSearchHit
|
53
|
+
v-for="({ item }, index) of results" :key="index"
|
54
|
+
:title="item.title"
|
55
|
+
:selected="selected === index"
|
56
|
+
:excerpt="item.excerpt"
|
57
|
+
:path="item.link"
|
58
|
+
@click="navigation(item.link)"
|
59
|
+
@hover="selected = index"
|
60
|
+
/>
|
61
|
+
</ul>
|
62
|
+
</section>
|
63
|
+
<div v-else-if="!text" class="DocSearch-StartScreen">
|
64
|
+
<p class="DocSearch-Help">
|
65
|
+
No recent searches
|
66
|
+
</p>
|
67
|
+
</div>
|
68
|
+
<div v-else class="DocSearch-NoResults">
|
69
|
+
<div class="DocSearch-Screen-Icon">
|
70
|
+
<svg width="40" height="40" viewBox="0 0 20 20" fill="none" fill-rule="evenodd" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"><path d="M15.5 4.8c2 3 1.7 7-1 9.7h0l4.3 4.3-4.3-4.3a7.8 7.8 0 01-9.8 1m-2.2-2.2A7.8 7.8 0 0113.2 2.4M2 18L18 2" /></svg>
|
71
|
+
</div><p class="DocSearch-Title">
|
72
|
+
No results for "<strong>{{ text }}</strong>"
|
73
|
+
</p>
|
74
|
+
</div>
|
75
|
+
</div>
|
76
|
+
</div>
|
77
|
+
</template>
|
@@ -1,28 +1,28 @@
|
|
1
|
-
<script lang="ts" setup>
|
2
|
-
</script>
|
3
|
-
|
4
|
-
<template>
|
5
|
-
<footer class="DocSearch-Footer">
|
6
|
-
<div class="DocSearch-Logo">
|
7
|
-
<a class="flex items-center text-black dark:text-white" target="_blank" href="https://www.fusejs.io/">
|
8
|
-
<span mr-2 class="DocSearch-Label">Search by</span>
|
9
|
-
<img mr-1 w-6 h-6 src="https://www.fusejs.io/assets/img/logo.png">
|
10
|
-
<span>Fuse.js</span>
|
11
|
-
</a>
|
12
|
-
</div>
|
13
|
-
<ul class="DocSearch-Commands">
|
14
|
-
<li><kbd class="DocSearch-Commands-Key"><svg width="15" height="15" aria-label="Enter key" role="img"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.2"><path d="M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3" /></g></svg></kbd><span class="DocSearch-Label">to select</span></li><li><kbd class="DocSearch-Commands-Key"><svg width="15" height="15" aria-label="Arrow down" role="img"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.2"><path d="M7.5 3.5v8M10.5 8.5l-3 3-3-3" /></g></svg></kbd><kbd class="DocSearch-Commands-Key"><svg width="15" height="15" aria-label="Arrow up" role="img"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.2"><path d="M7.5 11.5v-8M10.5 6.5l-3-3-3 3" /></g></svg></kbd><span class="DocSearch-Label">to navigate</span></li><li><kbd class="DocSearch-Commands-Key"><svg width="15" height="15" aria-label="Escape key" role="img"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.2"><path d="M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956" /></g></svg></kbd><span class="DocSearch-Label">to close</span></li>
|
15
|
-
</ul>
|
16
|
-
</footer>
|
17
|
-
</template>
|
18
|
-
|
19
|
-
<style>
|
20
|
-
.cls-1,
|
21
|
-
.cls-2 {
|
22
|
-
fill: #003dff;
|
23
|
-
}
|
24
|
-
|
25
|
-
.cls-2 {
|
26
|
-
fill-rule: evenodd;
|
27
|
-
}
|
28
|
-
</style>
|
1
|
+
<script lang="ts" setup>
|
2
|
+
</script>
|
3
|
+
|
4
|
+
<template>
|
5
|
+
<footer class="DocSearch-Footer">
|
6
|
+
<div class="DocSearch-Logo">
|
7
|
+
<a class="flex items-center text-black dark:text-white" target="_blank" href="https://www.fusejs.io/">
|
8
|
+
<span mr-2 class="DocSearch-Label">Search by</span>
|
9
|
+
<img mr-1 w-6 h-6 src="https://www.fusejs.io/assets/img/logo.png">
|
10
|
+
<span>Fuse.js</span>
|
11
|
+
</a>
|
12
|
+
</div>
|
13
|
+
<ul class="DocSearch-Commands">
|
14
|
+
<li><kbd class="DocSearch-Commands-Key"><svg width="15" height="15" aria-label="Enter key" role="img"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.2"><path d="M12 3.53088v3c0 1-1 2-2 2H4M7 11.53088l-3-3 3-3" /></g></svg></kbd><span class="DocSearch-Label">to select</span></li><li><kbd class="DocSearch-Commands-Key"><svg width="15" height="15" aria-label="Arrow down" role="img"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.2"><path d="M7.5 3.5v8M10.5 8.5l-3 3-3-3" /></g></svg></kbd><kbd class="DocSearch-Commands-Key"><svg width="15" height="15" aria-label="Arrow up" role="img"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.2"><path d="M7.5 11.5v-8M10.5 6.5l-3-3-3 3" /></g></svg></kbd><span class="DocSearch-Label">to navigate</span></li><li><kbd class="DocSearch-Commands-Key"><svg width="15" height="15" aria-label="Escape key" role="img"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.2"><path d="M13.6167 8.936c-.1065.3583-.6883.962-1.4875.962-.7993 0-1.653-.9165-1.653-2.1258v-.5678c0-1.2548.7896-2.1016 1.653-2.1016.8634 0 1.3601.4778 1.4875 1.0724M9 6c-.1352-.4735-.7506-.9219-1.46-.8972-.7092.0246-1.344.57-1.344 1.2166s.4198.8812 1.3445.9805C8.465 7.3992 8.968 7.9337 9 8.5c.032.5663-.454 1.398-1.4595 1.398C6.6593 9.898 6 9 5.963 8.4851m-1.4748.5368c-.2635.5941-.8099.876-1.5443.876s-1.7073-.6248-1.7073-2.204v-.4603c0-1.0416.721-2.131 1.7073-2.131.9864 0 1.6425 1.031 1.5443 2.2492h-2.956" /></g></svg></kbd><span class="DocSearch-Label">to close</span></li>
|
15
|
+
</ul>
|
16
|
+
</footer>
|
17
|
+
</template>
|
18
|
+
|
19
|
+
<style>
|
20
|
+
.cls-1,
|
21
|
+
.cls-2 {
|
22
|
+
fill: #003dff;
|
23
|
+
}
|
24
|
+
|
25
|
+
.cls-2 {
|
26
|
+
fill-rule: evenodd;
|
27
|
+
}
|
28
|
+
</style>
|
@@ -1,30 +1,30 @@
|
|
1
|
-
<script lang="ts" setup>
|
2
|
-
import { useModel } from 'vue'
|
3
|
-
|
4
|
-
const props = defineProps<{
|
5
|
-
text: string
|
6
|
-
visible: boolean
|
7
|
-
}>()
|
8
|
-
|
9
|
-
const text = useModel(props, 'text')
|
10
|
-
const visible = useModel(props, 'visible')
|
11
|
-
</script>
|
12
|
-
|
13
|
-
<template>
|
14
|
-
<header class="DocSearch-SearchBar">
|
15
|
-
<div class="DocSearch-Form">
|
16
|
-
<label id="docsearch-label" class="DocSearch-MagnifierLabel" for="docsearch-input">
|
17
|
-
<svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" /></svg>
|
18
|
-
</label>
|
19
|
-
<input id="docsearch-input" v-model="text" class="DocSearch-Input" aria-autocomplete="both" aria-labelledby="docsearch-label" autocomplete="off" autocorrect="off" autocapitalize="off" enterkeyhint="go" spellcheck="false" autofocus="true" placeholder="Search docs" maxlength="64" type="search" aria-activedescendant="docsearch-item-0" aria-controls="docsearch-list">
|
20
|
-
<button type="reset" title="Clear the query" class="DocSearch-Reset" aria-label="Clear the query" :hidden="!text" @click="text = ''">
|
21
|
-
<svg width="20" height="20" viewBox="0 0 20 20"><path d="M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" /></svg>
|
22
|
-
</button>
|
23
|
-
</div>
|
24
|
-
<button class="DocSearch-Cancel" type="reset" aria-label="Cancel" @click="visible = false">
|
25
|
-
Cancel
|
26
|
-
</button>
|
27
|
-
</header>
|
28
|
-
</template>
|
29
|
-
|
30
|
-
<style lang="scss" scoped></style>
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { useModel } from 'vue'
|
3
|
+
|
4
|
+
const props = defineProps<{
|
5
|
+
text: string
|
6
|
+
visible: boolean
|
7
|
+
}>()
|
8
|
+
|
9
|
+
const text = useModel(props, 'text')
|
10
|
+
const visible = useModel(props, 'visible')
|
11
|
+
</script>
|
12
|
+
|
13
|
+
<template>
|
14
|
+
<header class="DocSearch-SearchBar">
|
15
|
+
<div class="DocSearch-Form">
|
16
|
+
<label id="docsearch-label" class="DocSearch-MagnifierLabel" for="docsearch-input">
|
17
|
+
<svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" /></svg>
|
18
|
+
</label>
|
19
|
+
<input id="docsearch-input" v-model="text" class="DocSearch-Input" aria-autocomplete="both" aria-labelledby="docsearch-label" autocomplete="off" autocorrect="off" autocapitalize="off" enterkeyhint="go" spellcheck="false" autofocus="true" placeholder="Search docs" maxlength="64" type="search" aria-activedescendant="docsearch-item-0" aria-controls="docsearch-list">
|
20
|
+
<button type="reset" title="Clear the query" class="DocSearch-Reset" aria-label="Clear the query" :hidden="!text" @click="text = ''">
|
21
|
+
<svg width="20" height="20" viewBox="0 0 20 20"><path d="M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" /></svg>
|
22
|
+
</button>
|
23
|
+
</div>
|
24
|
+
<button class="DocSearch-Cancel" type="reset" aria-label="Cancel" @click="visible = false">
|
25
|
+
Cancel
|
26
|
+
</button>
|
27
|
+
</header>
|
28
|
+
</template>
|
29
|
+
|
30
|
+
<style lang="scss" scoped></style>
|
@@ -1,52 +1,52 @@
|
|
1
|
-
<script lang="ts" setup>
|
2
|
-
import { defineEmits, ref } from 'vue'
|
3
|
-
import { useElementHover, whenever } from '@vueuse/core'
|
4
|
-
|
5
|
-
withDefaults(
|
6
|
-
defineProps<{
|
7
|
-
selected: boolean
|
8
|
-
title: string
|
9
|
-
excerpt: string
|
10
|
-
path: string
|
11
|
-
history?: boolean
|
12
|
-
}>(),
|
13
|
-
{
|
14
|
-
selected: false,
|
15
|
-
},
|
16
|
-
)
|
17
|
-
|
18
|
-
const emit = defineEmits(['hover'])
|
19
|
-
|
20
|
-
const itemRef = ref()
|
21
|
-
|
22
|
-
whenever(useElementHover(itemRef), () => emit('hover'))
|
23
|
-
</script>
|
24
|
-
|
25
|
-
<template>
|
26
|
-
<li id="docsearch-item-0" ref="itemRef" class="DocSearch-Hit" role="option" :aria-selected="selected">
|
27
|
-
<a :href="path" onclick="return false">
|
28
|
-
<div class="DocSearch-Hit-Container">
|
29
|
-
<div class="DocSearch-Hit-icon">
|
30
|
-
<svg v-if="history" width="20" height="20" viewBox="0 0 20 20"><g stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"><path d="M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0" /><path d="M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13" /></g></svg>
|
31
|
-
<svg v-else width="20" height="20" viewBox="0 0 20 20"><path d="M17 5H3h14zm0 5H3h14zm0 5H3h14z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linejoin="round" /></svg>
|
32
|
-
</div>
|
33
|
-
<div class="DocSearch-Hit-content-wrapper">
|
34
|
-
<span class="DocSearch-Hit-title">{{ title }}</span>
|
35
|
-
<span class="DocSearch-Hit-path">{{ excerpt }}</span>
|
36
|
-
</div>
|
37
|
-
<div v-if="history" class="DocSearch-Hit-action">
|
38
|
-
<button class="DocSearch-Hit-action-button" title="Save this search" type="submit">
|
39
|
-
<svg width="20" height="20" viewBox="0 0 20 20"><path d="M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linejoin="round" /></svg>
|
40
|
-
</button>
|
41
|
-
</div>
|
42
|
-
<div v-if="history" class="DocSearch-Hit-action">
|
43
|
-
<button class="DocSearch-Hit-action-button" title="Remove this search from history" type="submit"><svg width="20" height="20" viewBox="0 0 20 20"><path d="M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" /></svg>
|
44
|
-
</button>
|
45
|
-
</div>
|
46
|
-
<div class="DocSearch-Hit-action">
|
47
|
-
<svg class="DocSearch-Hit-Select-Icon" width="20" height="20" viewBox="0 0 20 20"><g stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"><path d="M18 3v4c0 2-2 4-4 4H2" /><path d="M8 17l-6-6 6-6" /></g></svg>
|
48
|
-
</div>
|
49
|
-
</div>
|
50
|
-
</a>
|
51
|
-
</li>
|
52
|
-
</template>
|
1
|
+
<script lang="ts" setup>
|
2
|
+
import { defineEmits, ref } from 'vue'
|
3
|
+
import { useElementHover, whenever } from '@vueuse/core'
|
4
|
+
|
5
|
+
withDefaults(
|
6
|
+
defineProps<{
|
7
|
+
selected: boolean
|
8
|
+
title: string
|
9
|
+
excerpt: string
|
10
|
+
path: string
|
11
|
+
history?: boolean
|
12
|
+
}>(),
|
13
|
+
{
|
14
|
+
selected: false,
|
15
|
+
},
|
16
|
+
)
|
17
|
+
|
18
|
+
const emit = defineEmits(['hover'])
|
19
|
+
|
20
|
+
const itemRef = ref()
|
21
|
+
|
22
|
+
whenever(useElementHover(itemRef), () => emit('hover'))
|
23
|
+
</script>
|
24
|
+
|
25
|
+
<template>
|
26
|
+
<li id="docsearch-item-0" ref="itemRef" class="DocSearch-Hit" role="option" :aria-selected="selected">
|
27
|
+
<a :href="path" onclick="return false">
|
28
|
+
<div class="DocSearch-Hit-Container">
|
29
|
+
<div class="DocSearch-Hit-icon">
|
30
|
+
<svg v-if="history" width="20" height="20" viewBox="0 0 20 20"><g stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"><path d="M3.18 6.6a8.23 8.23 0 1112.93 9.94h0a8.23 8.23 0 01-11.63 0" /><path d="M6.44 7.25H2.55V3.36M10.45 6v5.6M10.45 11.6L13 13" /></g></svg>
|
31
|
+
<svg v-else width="20" height="20" viewBox="0 0 20 20"><path d="M17 5H3h14zm0 5H3h14zm0 5H3h14z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linejoin="round" /></svg>
|
32
|
+
</div>
|
33
|
+
<div class="DocSearch-Hit-content-wrapper">
|
34
|
+
<span class="DocSearch-Hit-title">{{ title }}</span>
|
35
|
+
<span class="DocSearch-Hit-path">{{ excerpt }}</span>
|
36
|
+
</div>
|
37
|
+
<div v-if="history" class="DocSearch-Hit-action">
|
38
|
+
<button class="DocSearch-Hit-action-button" title="Save this search" type="submit">
|
39
|
+
<svg width="20" height="20" viewBox="0 0 20 20"><path d="M10 14.2L5 17l1-5.6-4-4 5.5-.7 2.5-5 2.5 5 5.6.8-4 4 .9 5.5z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linejoin="round" /></svg>
|
40
|
+
</button>
|
41
|
+
</div>
|
42
|
+
<div v-if="history" class="DocSearch-Hit-action">
|
43
|
+
<button class="DocSearch-Hit-action-button" title="Remove this search from history" type="submit"><svg width="20" height="20" viewBox="0 0 20 20"><path d="M10 10l5.09-5.09L10 10l5.09 5.09L10 10zm0 0L4.91 4.91 10 10l-5.09 5.09L10 10z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" /></svg>
|
44
|
+
</button>
|
45
|
+
</div>
|
46
|
+
<div class="DocSearch-Hit-action">
|
47
|
+
<svg class="DocSearch-Hit-Select-Icon" width="20" height="20" viewBox="0 0 20 20"><g stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"><path d="M18 3v4c0 2-2 4-4 4H2" /><path d="M8 17l-6-6 6-6" /></g></svg>
|
48
|
+
</div>
|
49
|
+
</div>
|
50
|
+
</a>
|
51
|
+
</li>
|
52
|
+
</template>
|