valaxy-theme-lolimeow 1.0.2 → 1.0.4
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/client/index.ts +1 -1
- package/components/LmBackgroundLayer.vue +2 -2
- package/components/LmComment.vue +4 -4
- package/components/LmFooter.vue +2 -2
- package/components/LmHelper.vue +1 -1
- package/components/LmNotice.vue +3 -3
- package/components/about/LmAbout.vue +1 -1
- package/components/about/LmAboutSocialLinks.vue +1 -1
- package/components/archive/LmArchiveEntryList.vue +1 -1
- package/components/archive/LmArchiveRail.vue +1 -1
- package/components/archive/LmArchiveTimeline.vue +2 -2
- package/components/archive/LmArchives.vue +2 -2
- package/components/article/LmArticleHeader.vue +1 -1
- package/components/article/LmPostNav.vue +1 -1
- package/components/article/LmToc.vue +1 -1
- package/components/article/LmTocMobile.vue +2 -2
- package/components/category/LmCategories.vue +2 -2
- package/components/category/LmCategoryEntryList.vue +1 -1
- package/components/category/LmCategoryTree.vue +1 -1
- package/components/core/layout.vue +1 -1
- package/components/home/LmHero.vue +6 -3
- package/components/home/LmHeroIdentity.vue +31 -8
- package/components/home/LmHeroSocialLinks.vue +1 -1
- package/components/home/LmHomeContent.vue +1 -1
- package/components/home/LmPagination.vue +2 -2
- package/components/home/LmPinned.vue +2 -2
- package/components/home/LmPostCard.vue +7 -3
- package/components/home/LmPostList.vue +2 -2
- package/components/link/LmLinkCard.vue +1 -1
- package/components/link/LmLinkList.vue +1 -1
- package/components/link/LmLinkStatus.vue +1 -1
- package/components/link/LmLinks.vue +2 -2
- package/components/navbar/LmMobileDrawer.vue +5 -5
- package/components/navbar/LmNav.vue +2 -2
- package/components/navbar/LmNavItem.vue +2 -2
- package/components/navbar/LmNavTools.vue +1 -1
- package/components/plugins/LmWaline.vue +11 -5
- package/components/search/LmFuseSearchProvider.vue +3 -3
- package/components/search/LmSearchBody.vue +1 -1
- package/components/search/LmSearchResultList.vue +16 -3
- package/components/search/LmSearchShell.vue +10 -2
- package/components/tag/LmTagCloud.vue +2 -2
- package/components/tag/LmTagEntryList.vue +1 -1
- package/components/tag/LmTagIndex.vue +1 -1
- package/components/tag/LmTags.vue +2 -2
- package/composables/config.ts +1 -1
- package/composables/use-about-profile.ts +1 -1
- package/composables/use-archive-groups.ts +1 -1
- package/composables/use-archive-timeline-state.ts +1 -1
- package/composables/use-article-header-meta.ts +1 -1
- package/composables/use-article-toc-state.ts +1 -1
- package/composables/use-background-runtime.ts +13 -7
- package/composables/use-category-groups.ts +1 -1
- package/composables/use-hero-motto.ts +86 -34
- package/composables/use-hero-stage.ts +1 -1
- package/composables/use-home-pagination-scroll.ts +1 -1
- package/composables/use-layout-shell.ts +1 -1
- package/composables/use-link-groups.ts +1 -1
- package/composables/use-link-status.ts +1 -1
- package/composables/use-lm-fuse-search.ts +83 -2
- package/composables/use-nav-active.ts +1 -1
- package/composables/use-navbar-visibility.ts +1 -1
- package/composables/use-pinned-entries.ts +1 -1
- package/composables/use-post-card-media-state.ts +24 -2
- package/composables/use-post-card-view-model.ts +1 -1
- package/composables/use-resolved-background.ts +3 -3
- package/composables/use-search-modal.ts +1 -1
- package/composables/use-tag-groups.ts +1 -1
- package/layouts/404.vue +1 -1
- package/node/config.ts +1 -12
- package/node/plugins.ts +1 -1
- package/package.json +5 -6
- package/types/hero.d.ts +26 -12
- package/utils/background.ts +1 -1
- package/utils/hitokoto.ts +56 -0
- package/utils/index.ts +1 -0
- package/valaxy.config.ts +0 -17
package/client/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '../composables'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { useBackgroundRuntime, useResolvedBackground } from '@theme/composables'
|
|
3
|
-
import { createBackgroundImageStyle } from '@theme/utils'
|
|
4
2
|
import { computed } from 'vue'
|
|
3
|
+
import { useBackgroundRuntime, useResolvedBackground } from '../composables'
|
|
4
|
+
import { createBackgroundImageStyle } from '../utils'
|
|
5
5
|
|
|
6
6
|
const background = useResolvedBackground('app')
|
|
7
7
|
const runtimeBackground = useBackgroundRuntime('app', background)
|
package/components/LmComment.vue
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
2
|
+
import { useAddonConfig, useFrontmatter, useSiteConfig } from 'valaxy'
|
|
3
3
|
import { computed, defineAsyncComponent } from 'vue'
|
|
4
4
|
|
|
5
5
|
type CommentProvider = 'waline'
|
|
6
6
|
|
|
7
|
-
const WalineComment = defineAsyncComponent(() => import('
|
|
7
|
+
const WalineComment = defineAsyncComponent(() => import('../components/plugins/LmWaline.vue'))
|
|
8
8
|
|
|
9
9
|
const siteConfig = useSiteConfig()
|
|
10
10
|
const frontmatter = useFrontmatter()
|
|
11
|
-
const
|
|
11
|
+
const waline = useAddonConfig('valaxy-addon-waline')
|
|
12
12
|
|
|
13
13
|
const provider = computed<CommentProvider | ''>(() => {
|
|
14
|
-
if (
|
|
14
|
+
if (waline.value)
|
|
15
15
|
return 'waline'
|
|
16
16
|
|
|
17
17
|
return ''
|
package/components/LmFooter.vue
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { useThemeConfig } from '@theme/composables'
|
|
3
2
|
import { useSiteConfig, useValaxyConfig } from 'valaxy'
|
|
4
3
|
import pkg from 'valaxy/package.json'
|
|
5
|
-
|
|
6
4
|
import { capitalize, computed } from 'vue'
|
|
5
|
+
|
|
7
6
|
import { useI18n } from 'vue-i18n'
|
|
7
|
+
import { useThemeConfig } from '../composables'
|
|
8
8
|
|
|
9
9
|
const { t } = useI18n()
|
|
10
10
|
|
package/components/LmHelper.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { getDocumentElement, getWindow } from '@theme/utils'
|
|
3
2
|
import { isClient, useWindowScroll } from '@vueuse/core'
|
|
4
3
|
import { computed } from 'vue'
|
|
4
|
+
import { getDocumentElement, getWindow } from '../utils'
|
|
5
5
|
|
|
6
6
|
const { y } = useWindowScroll()
|
|
7
7
|
|
package/components/LmNotice.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { useThemeConfig } from '@theme/composables'
|
|
3
|
-
import { getSessionStorage } from '@theme/utils'
|
|
4
2
|
import { computed, ref, watch } from 'vue'
|
|
3
|
+
import { useThemeConfig } from '../composables'
|
|
4
|
+
import { getSessionStorage } from '../utils'
|
|
5
5
|
|
|
6
6
|
const themeConfig = useThemeConfig()
|
|
7
7
|
|
|
@@ -79,7 +79,7 @@ function closeNotice() {
|
|
|
79
79
|
</template>
|
|
80
80
|
|
|
81
81
|
<style lang="scss" scoped>
|
|
82
|
-
@use '
|
|
82
|
+
@use '../styles/mixins/surface' as *;
|
|
83
83
|
|
|
84
84
|
.lm-notice {
|
|
85
85
|
@include lm-surface-panel(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { ArchiveGroup } from '
|
|
3
|
-
import { useArchiveTimelineState } from '
|
|
2
|
+
import type { ArchiveGroup } from '../../composables'
|
|
3
|
+
import { useArchiveTimelineState } from '../../composables'
|
|
4
4
|
|
|
5
5
|
const props = defineProps<{
|
|
6
6
|
groups: ArchiveGroup[]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { useArchiveGroups } from '@theme/composables'
|
|
3
|
-
import { resolveFrontmatterCover, resolveFrontmatterText } from '@theme/utils'
|
|
4
2
|
import { useFrontmatter } from 'valaxy'
|
|
5
3
|
import { computed } from 'vue'
|
|
6
4
|
import { useI18n } from 'vue-i18n'
|
|
5
|
+
import { useArchiveGroups } from '../../composables'
|
|
6
|
+
import { resolveFrontmatterCover, resolveFrontmatterText } from '../../utils'
|
|
7
7
|
|
|
8
8
|
const { t } = useI18n()
|
|
9
9
|
const frontmatter = useFrontmatter()
|
|
@@ -36,7 +36,7 @@ const hasPostNav = computed(() => navEnabled.value && (!!prevPath.value || !!nex
|
|
|
36
36
|
</template>
|
|
37
37
|
|
|
38
38
|
<style lang="scss" scoped>
|
|
39
|
-
@use '
|
|
39
|
+
@use '../../styles/mixins/surface' as *;
|
|
40
40
|
|
|
41
41
|
.lm-post-nav {
|
|
42
42
|
@apply mx-auto mt-4 flex w-full flex-col gap-3 md:flex-row md:justify-between px-4 sm:px-6 xl:px-0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { useArticleTocState } from '@theme/composables'
|
|
3
2
|
import { nextTick, ref, watch } from 'vue'
|
|
3
|
+
import { useArticleTocState } from '../../composables'
|
|
4
4
|
|
|
5
5
|
const { items, visible, activeLink, handleClick } = useArticleTocState()
|
|
6
6
|
const navRef = ref<HTMLElement>()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { useArticleTocState } from '@theme/composables'
|
|
3
|
-
import { removeDocumentClass, toggleDocumentClass } from '@theme/utils'
|
|
4
2
|
import { onBeforeUnmount, ref, watch } from 'vue'
|
|
3
|
+
import { useArticleTocState } from '../../composables'
|
|
4
|
+
import { removeDocumentClass, toggleDocumentClass } from '../../utils'
|
|
5
5
|
|
|
6
6
|
const { items, visible, activeLink, handleClick } = useArticleTocState()
|
|
7
7
|
const open = ref(false)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { useCategoryGroups } from '@theme/composables'
|
|
3
|
-
import { resolveFrontmatterCover, resolveFrontmatterText } from '@theme/utils'
|
|
4
2
|
import { useFrontmatter } from 'valaxy'
|
|
5
3
|
import { computed } from 'vue'
|
|
6
4
|
import { useI18n } from 'vue-i18n'
|
|
5
|
+
import { useCategoryGroups } from '../../composables'
|
|
6
|
+
import { resolveFrontmatterCover, resolveFrontmatterText } from '../../utils'
|
|
7
7
|
|
|
8
8
|
const { t } = useI18n()
|
|
9
9
|
const frontmatter = useFrontmatter()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { useHomePaginationScrollBehavior, useLayoutShell } from '@theme/composables'
|
|
3
2
|
import { useRouter } from 'vue-router'
|
|
3
|
+
import { useHomePaginationScrollBehavior, useLayoutShell } from '../../composables'
|
|
4
4
|
|
|
5
5
|
defineProps<{
|
|
6
6
|
hideFooter?: boolean
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { useHeroMotto, useHeroStage, useThemeConfig } from '@theme/composables'
|
|
3
2
|
import { useSiteConfig } from 'valaxy'
|
|
4
3
|
import { computed, useTemplateRef } from 'vue'
|
|
4
|
+
import { useHeroMotto, useHeroStage, useThemeConfig } from '../../composables'
|
|
5
5
|
|
|
6
6
|
interface SocialLink {
|
|
7
7
|
name: string
|
|
@@ -17,7 +17,7 @@ interface SiteAuthor {
|
|
|
17
17
|
|
|
18
18
|
const siteConfig = useSiteConfig()
|
|
19
19
|
const themeConfig = useThemeConfig()
|
|
20
|
-
const { hasMotto, renderedMotto } = useHeroMotto()
|
|
20
|
+
const { hasMotto, mottoRenderKey, renderedMotto, shouldFadeMotto, shouldShowMotto } = useHeroMotto()
|
|
21
21
|
const heroSection = useTemplateRef<HTMLElement>('heroSection')
|
|
22
22
|
|
|
23
23
|
const {
|
|
@@ -80,7 +80,10 @@ const showSocialIcons = computed(() => themeConfig.value.hero.showSocialIcons &&
|
|
|
80
80
|
:title="siteTitle"
|
|
81
81
|
:subtitle="siteSubtitle"
|
|
82
82
|
:has-motto="hasMotto"
|
|
83
|
+
:motto-render-key="mottoRenderKey"
|
|
83
84
|
:rendered-motto="renderedMotto"
|
|
85
|
+
:should-fade-motto="shouldFadeMotto"
|
|
86
|
+
:should-show-motto="shouldShowMotto"
|
|
84
87
|
/>
|
|
85
88
|
|
|
86
89
|
<LmHeroSocialLinks
|
|
@@ -102,7 +105,7 @@ const showSocialIcons = computed(() => themeConfig.value.hero.showSocialIcons &&
|
|
|
102
105
|
</template>
|
|
103
106
|
|
|
104
107
|
<style scoped lang="scss">
|
|
105
|
-
@use '
|
|
108
|
+
@use '../../styles/mixins/surface' as *;
|
|
106
109
|
|
|
107
110
|
.lm-hero-content {
|
|
108
111
|
@apply relative z-10 flex w-full max-w-5xl flex-col justify-center px-4 sm:px-6 lg:px-8;
|
|
@@ -5,7 +5,10 @@ const props = defineProps<{
|
|
|
5
5
|
title: string
|
|
6
6
|
subtitle?: string
|
|
7
7
|
hasMotto: boolean
|
|
8
|
+
mottoRenderKey: number
|
|
8
9
|
renderedMotto: string
|
|
10
|
+
shouldFadeMotto: boolean
|
|
11
|
+
shouldShowMotto: boolean
|
|
9
12
|
}>()
|
|
10
13
|
</script>
|
|
11
14
|
|
|
@@ -34,20 +37,23 @@ const props = defineProps<{
|
|
|
34
37
|
</div>
|
|
35
38
|
|
|
36
39
|
<div
|
|
37
|
-
v-if="props.
|
|
40
|
+
v-if="props.shouldShowMotto"
|
|
38
41
|
class="lm-hero-motto-strip"
|
|
39
42
|
>
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
<Transition name="lm-hero-motto-fade" mode="out-in">
|
|
44
|
+
<p
|
|
45
|
+
:key="props.shouldFadeMotto ? props.mottoRenderKey : 'typewriter'"
|
|
46
|
+
class="lm-hero-motto"
|
|
47
|
+
aria-live="polite"
|
|
48
|
+
>
|
|
49
|
+
{{ props.renderedMotto }}
|
|
50
|
+
</p>
|
|
51
|
+
</Transition>
|
|
46
52
|
</div>
|
|
47
53
|
</template>
|
|
48
54
|
|
|
49
55
|
<style scoped lang="scss">
|
|
50
|
-
@use '
|
|
56
|
+
@use '../../styles/mixins/surface' as *;
|
|
51
57
|
|
|
52
58
|
.lm-hero-avatar-badge {
|
|
53
59
|
@apply relative z-10 flex h-22 w-22 items-center justify-center rounded-full p-1.5 md:h-24 md:w-24;
|
|
@@ -179,6 +185,23 @@ const props = defineProps<{
|
|
|
179
185
|
text-wrap: balance;
|
|
180
186
|
}
|
|
181
187
|
|
|
188
|
+
.lm-hero-motto-fade-enter-active,
|
|
189
|
+
.lm-hero-motto-fade-leave-active {
|
|
190
|
+
transition:
|
|
191
|
+
opacity 180ms ease-out,
|
|
192
|
+
transform 180ms ease-out;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.lm-hero-motto-fade-enter-from {
|
|
196
|
+
opacity: 0;
|
|
197
|
+
transform: translateY(0.25rem);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.lm-hero-motto-fade-leave-to {
|
|
201
|
+
opacity: 0;
|
|
202
|
+
transform: translateY(-0.125rem);
|
|
203
|
+
}
|
|
204
|
+
|
|
182
205
|
@media (max-width: 767px) {
|
|
183
206
|
.lm-hero-identity-card {
|
|
184
207
|
width: min(100%, 34rem);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { usePaginationItems } from '
|
|
2
|
+
import { usePaginationItems } from '../../composables'
|
|
3
3
|
|
|
4
4
|
const props = withDefaults(defineProps<{
|
|
5
5
|
currentPage?: number
|
|
@@ -62,7 +62,7 @@ const {
|
|
|
62
62
|
</template>
|
|
63
63
|
|
|
64
64
|
<style lang="scss" scoped>
|
|
65
|
-
@use '
|
|
65
|
+
@use '../../styles/mixins/surface' as *;
|
|
66
66
|
|
|
67
67
|
.lm-pagination {
|
|
68
68
|
@apply mt-6 flex items-center justify-center gap-3;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { usePinnedEntries } from '
|
|
2
|
+
import { usePinnedEntries } from '../../composables'
|
|
3
3
|
|
|
4
4
|
const {
|
|
5
5
|
sectionTitle,
|
|
@@ -56,7 +56,7 @@ const {
|
|
|
56
56
|
</template>
|
|
57
57
|
|
|
58
58
|
<style scoped lang="scss">
|
|
59
|
-
@use '
|
|
59
|
+
@use '../../styles/mixins/surface' as *;
|
|
60
60
|
|
|
61
61
|
.lm-pinned {
|
|
62
62
|
@apply pt-6 md:pt-8;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import type { Post } from 'valaxy'
|
|
3
|
-
import {
|
|
3
|
+
import { shallowRef } from 'vue'
|
|
4
|
+
import { usePostCardMediaState, usePostCardViewModel } from '../../composables'
|
|
4
5
|
|
|
5
6
|
const props = defineProps<{
|
|
6
7
|
post: Post
|
|
@@ -18,11 +19,13 @@ const {
|
|
|
18
19
|
handleCoverError,
|
|
19
20
|
} = usePostCardViewModel(props.post, props.index ?? 0)
|
|
20
21
|
|
|
22
|
+
const imageElement = shallowRef<HTMLImageElement | null>(null)
|
|
23
|
+
|
|
21
24
|
const {
|
|
22
25
|
imageLoaded,
|
|
23
26
|
showLoadingPlaceholder,
|
|
24
27
|
handleImageLoad,
|
|
25
|
-
} = usePostCardMediaState(hasMedia, cover)
|
|
28
|
+
} = usePostCardMediaState(hasMedia, cover, imageElement)
|
|
26
29
|
</script>
|
|
27
30
|
|
|
28
31
|
<template>
|
|
@@ -41,6 +44,7 @@ const {
|
|
|
41
44
|
|
|
42
45
|
<img
|
|
43
46
|
v-if="cover"
|
|
47
|
+
ref="imageElement"
|
|
44
48
|
:src="cover"
|
|
45
49
|
alt=""
|
|
46
50
|
class="lm-post-card__image"
|
|
@@ -75,7 +79,7 @@ const {
|
|
|
75
79
|
</template>
|
|
76
80
|
|
|
77
81
|
<style lang="scss" scoped>
|
|
78
|
-
@use '
|
|
82
|
+
@use '../../styles/mixins/surface' as *;
|
|
79
83
|
|
|
80
84
|
.lm-post-card {
|
|
81
85
|
@include lm-surface-panel;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { Post } from 'valaxy'
|
|
3
|
-
import { useThemeConfig } from '@theme/composables'
|
|
4
|
-
import { clampColumnCount, getRootFontSize, resolveGridColumnCount, resolveLengthToPx } from '@theme/utils'
|
|
5
3
|
import { useElementSize } from '@vueuse/core'
|
|
6
4
|
import { useSiteStore } from 'valaxy'
|
|
7
5
|
import { computed, ref } from 'vue'
|
|
6
|
+
import { useThemeConfig } from '../../composables'
|
|
7
|
+
import { clampColumnCount, getRootFontSize, resolveGridColumnCount, resolveLengthToPx } from '../../utils'
|
|
8
8
|
|
|
9
9
|
const props = withDefaults(defineProps<{
|
|
10
10
|
type?: string
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { useLinkGroups } from '@theme/composables'
|
|
3
|
-
import { resolveFrontmatterCover, resolveFrontmatterText } from '@theme/utils'
|
|
4
2
|
import { useFrontmatter } from 'valaxy'
|
|
5
3
|
import { computed } from 'vue'
|
|
6
4
|
import { useI18n } from 'vue-i18n'
|
|
5
|
+
import { useLinkGroups } from '../../composables'
|
|
6
|
+
import { resolveFrontmatterCover, resolveFrontmatterText } from '../../utils'
|
|
7
7
|
|
|
8
8
|
const { t } = useI18n()
|
|
9
9
|
const frontmatter = useFrontmatter()
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import type { NavItem } from '
|
|
3
|
-
import type { BrowserTimeout } from '
|
|
4
|
-
import { useNavActive } from '@theme/composables'
|
|
5
|
-
import { clearBrowserTimeout, getWindow, setBrowserTimeout } from '@theme/utils'
|
|
2
|
+
import type { NavItem } from '../../types'
|
|
3
|
+
import type { BrowserTimeout } from '../../utils'
|
|
6
4
|
import { useRouter } from 'vue-router'
|
|
5
|
+
import { useNavActive } from '../../composables'
|
|
6
|
+
import { clearBrowserTimeout, getWindow, setBrowserTimeout } from '../../utils'
|
|
7
7
|
|
|
8
8
|
const props = defineProps<{
|
|
9
9
|
open: boolean
|
|
@@ -125,7 +125,7 @@ function leave(el: Element) {
|
|
|
125
125
|
</template>
|
|
126
126
|
|
|
127
127
|
<style lang="scss" scoped>
|
|
128
|
-
@use '
|
|
128
|
+
@use '../../styles/mixins/surface' as *;
|
|
129
129
|
|
|
130
130
|
.lm-mobile-nav-panel {
|
|
131
131
|
@include lm-surface-panel;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import type { NavItem } from '
|
|
2
|
+
import type { NavItem } from '../../types'
|
|
3
3
|
|
|
4
4
|
const props = defineProps<{
|
|
5
5
|
drawerOpen: boolean
|
|
@@ -37,7 +37,7 @@ const emit = defineEmits<{
|
|
|
37
37
|
</template>
|
|
38
38
|
|
|
39
39
|
<style lang="scss" scoped>
|
|
40
|
-
@use '
|
|
40
|
+
@use '../../styles/mixins/surface' as *;
|
|
41
41
|
|
|
42
42
|
.lm-nav {
|
|
43
43
|
@include lm-surface-nav;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import type { NavItem } from '
|
|
3
|
-
import { useNavActive } from '
|
|
2
|
+
import type { NavItem } from '../../types'
|
|
3
|
+
import { useNavActive } from '../../composables'
|
|
4
4
|
|
|
5
5
|
const props = defineProps<{
|
|
6
6
|
item: NavItem
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { useNavbarTools, useThemeConfig } from '@theme/composables'
|
|
3
2
|
import { useAppStore } from 'valaxy'
|
|
4
3
|
import { computed } from 'vue'
|
|
4
|
+
import { useNavbarTools, useThemeConfig } from '../../composables'
|
|
5
5
|
|
|
6
6
|
const props = defineProps<{
|
|
7
7
|
drawerOpen: boolean
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
// cspell:ignore waline
|
|
3
|
-
|
|
4
|
-
import {
|
|
3
|
+
import { useAddonConfig } from 'valaxy'
|
|
4
|
+
import { computed } from 'vue'
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
type WalineAddonOptions = {
|
|
7
|
+
serverURL: string
|
|
8
|
+
} & Record<string, unknown>
|
|
9
|
+
|
|
10
|
+
const waline = useAddonConfig<WalineAddonOptions>('valaxy-addon-waline')
|
|
11
|
+
|
|
12
|
+
const options = computed(() => waline.value?.options)
|
|
7
13
|
</script>
|
|
8
14
|
|
|
9
15
|
<template>
|
|
10
|
-
<div class="lm-waline">
|
|
11
|
-
<WalineClient w="full" :options="
|
|
16
|
+
<div v-if="options" class="lm-waline">
|
|
17
|
+
<WalineClient w="full" :options="options" />
|
|
12
18
|
</div>
|
|
13
19
|
</template>
|
|
14
20
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { LmFuseSearchResult } from '
|
|
3
|
-
import { useLmFuseSearch } from '@theme/composables'
|
|
4
|
-
import { createDebouncedFunction } from '@theme/utils'
|
|
2
|
+
import type { LmFuseSearchResult } from '../../composables'
|
|
5
3
|
import { computed, onUnmounted, ref, watch } from 'vue'
|
|
6
4
|
import { useRouter } from 'vue-router'
|
|
5
|
+
import { useLmFuseSearch } from '../../composables'
|
|
6
|
+
import { createDebouncedFunction } from '../../utils'
|
|
7
7
|
|
|
8
8
|
const props = defineProps<{
|
|
9
9
|
open: boolean
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { LmFuseSearchResult } from '
|
|
2
|
+
import type { LmFuseSearchResult } from '../../composables'
|
|
3
3
|
|
|
4
4
|
defineProps<{
|
|
5
5
|
results: LmFuseSearchResult[]
|
|
@@ -22,10 +22,18 @@ const emit = defineEmits<{
|
|
|
22
22
|
@click="emit('navigate', result)"
|
|
23
23
|
>
|
|
24
24
|
<span class="lm-search-result__title">
|
|
25
|
-
|
|
25
|
+
<span
|
|
26
|
+
v-for="(part, partIndex) in result.titleParts"
|
|
27
|
+
:key="`${result.id}-title-${partIndex}`"
|
|
28
|
+
:class="{ 'lm-search-result__highlight': part.highlighted }"
|
|
29
|
+
>{{ part.text }}</span>
|
|
26
30
|
</span>
|
|
27
31
|
<span v-if="result.excerpt" class="lm-search-result__excerpt">
|
|
28
|
-
|
|
32
|
+
<span
|
|
33
|
+
v-for="(part, partIndex) in result.excerptParts"
|
|
34
|
+
:key="`${result.id}-excerpt-${partIndex}`"
|
|
35
|
+
:class="{ 'lm-search-result__highlight': part.highlighted }"
|
|
36
|
+
>{{ part.text }}</span>
|
|
29
37
|
</span>
|
|
30
38
|
</button>
|
|
31
39
|
</div>
|
|
@@ -60,4 +68,9 @@ const emit = defineEmits<{
|
|
|
60
68
|
@apply mt-1 line-clamp-2 text-xs leading-5;
|
|
61
69
|
color: var(--lm-c-text-secondary);
|
|
62
70
|
}
|
|
71
|
+
|
|
72
|
+
.lm-search-result__highlight {
|
|
73
|
+
color: var(--lm-c-brand);
|
|
74
|
+
font-weight: 800;
|
|
75
|
+
}
|
|
63
76
|
</style>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { onMounted, ref } from 'vue'
|
|
3
|
+
|
|
2
4
|
const props = defineProps<{
|
|
3
5
|
open: boolean
|
|
4
6
|
}>()
|
|
@@ -6,10 +8,16 @@ const props = defineProps<{
|
|
|
6
8
|
const emit = defineEmits<{
|
|
7
9
|
close: []
|
|
8
10
|
}>()
|
|
11
|
+
|
|
12
|
+
const mounted = ref(false)
|
|
13
|
+
|
|
14
|
+
onMounted(() => {
|
|
15
|
+
mounted.value = true
|
|
16
|
+
})
|
|
9
17
|
</script>
|
|
10
18
|
|
|
11
19
|
<template>
|
|
12
|
-
<Teleport to="body">
|
|
20
|
+
<Teleport v-if="mounted" to="body">
|
|
13
21
|
<div class="lm-search-shell">
|
|
14
22
|
<Transition name="lm-search-backdrop">
|
|
15
23
|
<button
|
|
@@ -34,7 +42,7 @@ const emit = defineEmits<{
|
|
|
34
42
|
</template>
|
|
35
43
|
|
|
36
44
|
<style scoped lang="scss">
|
|
37
|
-
@use '
|
|
45
|
+
@use '../../styles/mixins/surface' as *;
|
|
38
46
|
|
|
39
47
|
.lm-search-shell {
|
|
40
48
|
@apply px-4 pt-[8vh] flex pointer-events-none items-start inset-0 justify-center fixed z-[var(--lm-z-modal)];
|