valaxy-theme-lolimeow 1.1.8 → 1.2.0
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 -3
- package/components/LmComment.vue +19 -4
- package/components/LmFooter.vue +8 -7
- package/components/LmHelper.vue +96 -221
- package/components/LmNotice.vue +6 -6
- package/components/about/LmAbout.vue +35 -53
- package/components/about/LmAboutSocialLinks.vue +1 -2
- package/components/aggregate/LmAggregateEmpty.vue +27 -0
- package/components/aggregate/LmAggregateHeader.vue +1 -6
- package/components/aggregate/LmAggregateMeta.vue +7 -4
- package/components/aggregate/LmAggregatePage.vue +30 -0
- package/components/aggregate/LmAggregateSectionHeader.vue +48 -0
- package/components/archive/LmArchiveEntryList.vue +64 -42
- package/components/archive/LmArchiveRail.vue +45 -33
- package/components/archive/LmArchiveTimeline.vue +7 -15
- package/components/archive/LmArchives.vue +7 -25
- package/components/article/LmArticle.vue +22 -6
- package/components/article/LmArticleMeta.vue +5 -5
- package/components/article/LmArticleOutline.vue +16 -0
- package/components/article/LmToc.vue +21 -12
- package/components/article/LmTocMobile.vue +21 -17
- package/components/category/LmCategories.vue +8 -26
- package/components/category/LmCategoryEntryList.vue +27 -18
- package/components/category/LmCategoryTree.vue +85 -134
- package/components/core/layout.vue +19 -10
- package/components/home/LmHero.vue +1 -1
- package/components/home/LmHeroSocialLinks.vue +1 -1
- package/components/home/LmPagination.vue +4 -4
- package/components/home/LmPinned.vue +7 -11
- package/components/home/LmPostCard.vue +4 -4
- package/components/link/LmLinkCard.vue +20 -13
- package/components/link/LmLinkList.vue +4 -21
- package/components/link/LmLinkStatus.vue +6 -6
- package/components/link/LmLinks.vue +10 -36
- package/components/navbar/LmMobileDrawer.vue +10 -167
- package/components/navbar/LmMobileNavGroup.vue +10 -4
- package/components/navbar/LmNavItem.vue +9 -6
- package/components/navbar/LmNavSubmenu.vue +9 -4
- package/components/navbar/LmNavTools.vue +11 -2
- package/components/plugins/LmWaline.vue +54 -15
- package/components/project/LmProjectCard.vue +54 -27
- package/components/project/LmProjectList.vue +4 -35
- package/components/project/LmProjects.vue +9 -35
- package/components/search/LmSearchResultList.vue +4 -4
- package/components/tag/LmTagCloud.vue +50 -62
- package/components/tag/LmTagEntryList.vue +4 -3
- package/components/tag/LmTagIndex.vue +6 -27
- package/components/tag/LmTags.vue +6 -24
- package/features/archive/archive-transition.ts +11 -0
- package/features/archive/archive.ts +62 -29
- package/features/archive/index.ts +1 -1
- package/features/archive/types.ts +2 -0
- package/features/archive/use-archive-groups.ts +3 -2
- package/features/archive/use-archive-timeline-state.ts +3 -2
- package/features/article/toc-context.ts +29 -0
- package/features/article/use-article-toc-state.ts +7 -22
- package/features/article/use-toc-scroll.ts +109 -0
- package/features/background/background-image.ts +2 -2
- package/features/background/index.ts +2 -2
- package/features/background/resolve-background.ts +2 -15
- package/features/background/{background-cache.ts → runtime/background-cache.ts} +2 -55
- package/features/background/runtime/background-rotation.ts +123 -0
- package/features/background/{background-transition.ts → runtime/background-transition.ts} +2 -2
- package/features/background/{image-loader.ts → runtime/image-loader.ts} +1 -1
- package/features/background/{use-background-preload.ts → runtime/use-background-preload.ts} +3 -3
- package/features/background/{use-background-runtime.ts → runtime/use-background-runtime.ts} +12 -6
- package/features/background/types.ts +2 -2
- package/features/category/category.ts +6 -18
- package/features/hero/index.ts +1 -1
- package/features/hero/{hitokoto.ts → motto/hitokoto.ts} +2 -2
- package/features/hero/{typewriter.ts → motto/typewriter.ts} +3 -3
- package/features/hero/motto/use-motto-playback.ts +64 -0
- package/features/hero/motto/use-motto-source.ts +72 -0
- package/features/hero/use-hero-motto.ts +14 -345
- package/features/home/history/home-history-state.ts +280 -0
- package/features/home/history/home-scroll-task.ts +192 -0
- package/features/home/history/use-home-pagination-scroll.ts +185 -0
- package/features/home/index.ts +3 -3
- package/features/home/{pagination-scope.ts → pagination/pagination-scope.ts} +1 -1
- package/features/home/use-home-post-feed.ts +3 -7
- package/features/link/use-link-groups.ts +1 -1
- package/features/navigation/drawer/use-drawer-navigation.ts +74 -0
- package/features/navigation/use-nav-active.ts +4 -43
- package/features/post/post-list.ts +1 -1
- package/features/project/use-project-groups.ts +1 -1
- package/features/search/highlight.ts +19 -38
- package/features/tag/index.ts +0 -1
- package/features/tag/tag-cloud.ts +17 -158
- package/features/tag/tag.ts +7 -14
- package/features/tag/types.ts +0 -11
- package/features/tag/use-packed-tag-cloud.ts +158 -0
- package/layouts/404.vue +14 -14
- package/layouts/post.vue +10 -0
- package/locales/en.yml +2 -0
- package/locales/zh-CN.yml +2 -0
- package/node/colors.ts +139 -0
- package/node/config.ts +3 -2
- package/node/plugins.ts +10 -37
- package/package.json +30 -6
- package/shared/browser/body-scroll-lock.ts +149 -0
- package/shared/browser/modal.ts +16 -225
- package/shared/browser/motion.ts +1 -0
- package/shared/browser/rate-limit.ts +1 -0
- package/shared/browser/runtime.ts +4 -0
- package/styles/css-vars.scss +9 -19
- package/styles/layout.scss +7 -11
- package/styles/main.scss +16 -1
- package/styles/markdown/_blockquote-list.scss +4 -4
- package/styles/markdown/_code.scss +26 -1
- package/styles/markdown/_custom-block.scss +9 -9
- package/styles/markdown/_footnotes.scss +1 -1
- package/styles/markdown/_interactive.scss +7 -6
- package/styles/markdown/_table-media.scss +6 -5
- package/styles/markdown/_typography.scss +10 -5
- package/styles/mixins/surface.scss +0 -12
- package/styles/palette.scss +211 -0
- package/styles/vars.scss +20 -61
- package/types/config.d.ts +0 -1
- package/types/ui.d.ts +51 -6
- package/valaxy.config.ts +0 -3
- package/features/archive/use-archive-transition-leave.ts +0 -125
- package/features/background/background-rotation.ts +0 -287
- package/features/home/home-history-state.ts +0 -253
- package/features/home/use-home-pagination-scroll.ts +0 -397
- package/features/tag/use-tag-cloud.ts +0 -14
- /package/features/home/{pagination-normalization.ts → pagination/pagination-normalization.ts} +0 -0
- /package/features/home/{use-pagination-items.ts → pagination/use-pagination-items.ts} +0 -0
package/client/index.ts
CHANGED
|
@@ -79,19 +79,17 @@ export {
|
|
|
79
79
|
} from '../features/search'
|
|
80
80
|
|
|
81
81
|
export type {
|
|
82
|
-
TagCloudRow,
|
|
83
82
|
TagCloudSourceItem,
|
|
84
83
|
TagCloudViewItem,
|
|
85
84
|
TagEntry,
|
|
86
85
|
TagGroup,
|
|
87
86
|
} from '../features/tag'
|
|
88
87
|
export {
|
|
89
|
-
|
|
88
|
+
buildTagCloudItems,
|
|
90
89
|
buildTagGroups,
|
|
91
90
|
countTaggedPosts,
|
|
92
91
|
createTagId,
|
|
93
92
|
normalizeTags,
|
|
94
|
-
useTagCloud,
|
|
95
93
|
useTagGroups,
|
|
96
94
|
} from '../features/tag'
|
|
97
95
|
|
package/components/LmComment.vue
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import { useIntersectionObserver } from '@vueuse/core'
|
|
2
3
|
import { useAddonConfig, useFrontmatter, useSiteConfig } from 'valaxy'
|
|
3
|
-
import { computed, defineAsyncComponent } from 'vue'
|
|
4
|
+
import { computed, defineAsyncComponent, ref, useTemplateRef, watch } from 'vue'
|
|
4
5
|
import { useI18n } from 'vue-i18n'
|
|
6
|
+
import { useRoute } from 'vue-router'
|
|
5
7
|
|
|
6
8
|
type CommentProvider = 'waline'
|
|
7
9
|
|
|
@@ -11,6 +13,17 @@ const { t } = useI18n()
|
|
|
11
13
|
const siteConfig = useSiteConfig()
|
|
12
14
|
const frontmatter = useFrontmatter()
|
|
13
15
|
const waline = useAddonConfig('valaxy-addon-waline')
|
|
16
|
+
const route = useRoute()
|
|
17
|
+
const section = useTemplateRef<HTMLElement>('section')
|
|
18
|
+
const activated = ref(false)
|
|
19
|
+
|
|
20
|
+
watch(() => route.path, () => {
|
|
21
|
+
activated.value = false
|
|
22
|
+
})
|
|
23
|
+
useIntersectionObserver(section, ([entry]) => {
|
|
24
|
+
if (entry?.isIntersecting)
|
|
25
|
+
activated.value = true
|
|
26
|
+
}, { rootMargin: '400px 0px' })
|
|
14
27
|
|
|
15
28
|
const provider = computed<CommentProvider | ''>(() => {
|
|
16
29
|
if (waline.value)
|
|
@@ -36,12 +49,14 @@ const providerComponent = computed(() => {
|
|
|
36
49
|
<template>
|
|
37
50
|
<section
|
|
38
51
|
v-if="enabled"
|
|
52
|
+
:key="route.path"
|
|
53
|
+
ref="section"
|
|
39
54
|
class="lm-comment comment"
|
|
40
55
|
:aria-label="t('comment.label')"
|
|
41
56
|
>
|
|
42
57
|
<div class="lm-comment__content">
|
|
43
58
|
<div class="lm-comment__body">
|
|
44
|
-
<component :is="providerComponent" />
|
|
59
|
+
<component :is="providerComponent" :active="activated" />
|
|
45
60
|
</div>
|
|
46
61
|
</div>
|
|
47
62
|
</section>
|
|
@@ -54,10 +69,10 @@ const providerComponent = computed(() => {
|
|
|
54
69
|
|
|
55
70
|
.lm-comment__content {
|
|
56
71
|
@apply w-full border-t pt-4;
|
|
57
|
-
border-color:
|
|
72
|
+
border-color: var(--lm-c-primary-border);
|
|
58
73
|
}
|
|
59
74
|
|
|
60
75
|
.lm-comment__body {
|
|
61
|
-
@apply w-full;
|
|
76
|
+
@apply min-h-80 w-full;
|
|
62
77
|
}
|
|
63
78
|
</style>
|
package/components/LmFooter.vue
CHANGED
|
@@ -3,7 +3,7 @@ import { useSiteConfig, useValaxyConfig } from 'valaxy'
|
|
|
3
3
|
import pkg from 'valaxy/package.json'
|
|
4
4
|
import { capitalize, computed } from 'vue'
|
|
5
5
|
|
|
6
|
-
import { useI18n } from 'vue-i18n'
|
|
6
|
+
import { I18nT, useI18n } from 'vue-i18n'
|
|
7
7
|
import { useThemeConfig } from '../shared/config'
|
|
8
8
|
|
|
9
9
|
const { t } = useI18n()
|
|
@@ -19,7 +19,6 @@ const isThisYear = computed(() => {
|
|
|
19
19
|
return year.value === themeConfig.value.footer.since
|
|
20
20
|
})
|
|
21
21
|
|
|
22
|
-
const poweredHtml = computed(() => t('footer.powered', [`<a href="${pkg.repository}" target="_blank" rel="noopener">Valaxy</a> v${pkg.version}`]))
|
|
23
22
|
const footerIcon = computed(() => themeConfig.value.footer.icon!)
|
|
24
23
|
const showFooterIcon = computed(() => Boolean(footerIcon.value.enable && (footerIcon.value.name || footerIcon.value.img)))
|
|
25
24
|
const authorName = computed(() => siteConfig.value.author?.name || '')
|
|
@@ -81,7 +80,9 @@ const icpInfo = computed(() => {
|
|
|
81
80
|
</div>
|
|
82
81
|
|
|
83
82
|
<div v-if="themeConfig.footer.powered" class="lm-footer__powered">
|
|
84
|
-
<span
|
|
83
|
+
<I18nT keypath="footer.powered" tag="span" scope="global">
|
|
84
|
+
<span><a :href="pkg.homepage" target="_blank" rel="noopener noreferrer">Valaxy</a> v{{ pkg.version }}</span>
|
|
85
|
+
</I18nT>
|
|
85
86
|
<span class="lm-footer__dot" aria-hidden="true" />
|
|
86
87
|
<span>
|
|
87
88
|
{{ t('footer.theme') }}
|
|
@@ -120,7 +121,7 @@ const icpInfo = computed(() => {
|
|
|
120
121
|
|
|
121
122
|
.lm-footer__glow {
|
|
122
123
|
@apply pointer-events-none absolute left-1/2 top-0 h-px w-[min(34rem,72vw)] -translate-x-1/2;
|
|
123
|
-
background: linear-gradient(90deg, transparent,
|
|
124
|
+
background: linear-gradient(90deg, transparent, var(--lm-c-primary-border-strong), transparent);
|
|
124
125
|
}
|
|
125
126
|
|
|
126
127
|
.lm-footer__inner {
|
|
@@ -131,7 +132,7 @@ const icpInfo = computed(() => {
|
|
|
131
132
|
@apply relative inline-flex flex-wrap items-center justify-center gap-2.5 rounded-full px-4 py-1.5;
|
|
132
133
|
color: var(--lm-c-text-secondary);
|
|
133
134
|
background:
|
|
134
|
-
radial-gradient(circle at 18% 0%,
|
|
135
|
+
radial-gradient(circle at 18% 0%, var(--lm-c-primary-soft), transparent 42%),
|
|
135
136
|
color-mix(in srgb, var(--lm-c-bg-glass) 28%, transparent);
|
|
136
137
|
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lm-c-border) 58%, transparent);
|
|
137
138
|
}
|
|
@@ -168,12 +169,12 @@ const icpInfo = computed(() => {
|
|
|
168
169
|
|
|
169
170
|
.lm-footer__powered :deep(a:hover),
|
|
170
171
|
.lm-footer__icp:hover {
|
|
171
|
-
color: var(--lm-c-text-
|
|
172
|
+
color: var(--lm-c-primary-text-hover);
|
|
172
173
|
}
|
|
173
174
|
|
|
174
175
|
.lm-footer__dot {
|
|
175
176
|
@apply h-1 w-1 rounded-full;
|
|
176
|
-
background:
|
|
177
|
+
background: var(--lm-c-primary-border-strong);
|
|
177
178
|
}
|
|
178
179
|
|
|
179
180
|
.lm-footer__icp {
|
package/components/LmHelper.vue
CHANGED
|
@@ -1,190 +1,71 @@
|
|
|
1
|
-
<script lang="ts"
|
|
2
|
-
import {
|
|
3
|
-
import { computed } from 'vue'
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useResizeObserver, useWindowScroll, useWindowSize } from '@vueuse/core'
|
|
3
|
+
import { computed, onMounted, ref, shallowRef, useId, watch } from 'vue'
|
|
4
4
|
import { useI18n } from 'vue-i18n'
|
|
5
|
-
import { getDocumentElement, getWindow } from '../shared/browser'
|
|
5
|
+
import { getDocumentBody, getDocumentElement, getWindow, prefersReducedMotion } from '../shared/browser'
|
|
6
6
|
|
|
7
7
|
const { t } = useI18n()
|
|
8
8
|
const { y } = useWindowScroll()
|
|
9
|
+
const { height: viewportHeight } = useWindowSize({ initialHeight: 0 })
|
|
10
|
+
const documentBody = shallowRef<HTMLElement>()
|
|
11
|
+
const documentHeight = ref(0)
|
|
12
|
+
const shapeId = `${useId()}-helper-cat`
|
|
13
|
+
const clipId = `${shapeId}-progress`
|
|
14
|
+
|
|
15
|
+
/** 内容加载、折叠或视口变化后重新测量可滚动高度。 */
|
|
16
|
+
function measureDocument() {
|
|
17
|
+
documentHeight.value = getDocumentElement()?.scrollHeight ?? 0
|
|
18
|
+
}
|
|
9
19
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
// 整只猫爪共享同一条填充水平线:主掌垫和脚趾都按同一高度被裁切。
|
|
14
|
-
// 这样用户看到的是“整只猫爪逐步被填满”,而不是五块独立图形各自长进度。
|
|
15
|
-
const scrollProgress = computed(() => {
|
|
16
|
-
if (!isClient)
|
|
17
|
-
return 0
|
|
18
|
-
|
|
19
|
-
const root = getDocumentElement()
|
|
20
|
-
const currentWindow = getWindow()
|
|
21
|
-
|
|
22
|
-
if (!root || !currentWindow)
|
|
23
|
-
return 0
|
|
24
|
-
|
|
25
|
-
const maxScroll = root.scrollHeight - currentWindow.innerHeight
|
|
26
|
-
if (maxScroll <= 0)
|
|
27
|
-
return 0
|
|
28
|
-
|
|
29
|
-
return Math.min(100, Math.max(0, (y.value / maxScroll) * 100))
|
|
20
|
+
onMounted(() => {
|
|
21
|
+
documentBody.value = getDocumentBody()
|
|
22
|
+
measureDocument()
|
|
30
23
|
})
|
|
24
|
+
useResizeObserver(documentBody, measureDocument)
|
|
25
|
+
watch(viewportHeight, measureDocument)
|
|
31
26
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return
|
|
37
|
-
...bounds,
|
|
38
|
-
y: bounds.y + bounds.height - height,
|
|
39
|
-
height,
|
|
40
|
-
}
|
|
27
|
+
// 首屏保持安静;整只猫头共用同一条进度水平线。
|
|
28
|
+
const showBackToTop = computed(() => y.value > 120)
|
|
29
|
+
const scrollProgress = computed(() => {
|
|
30
|
+
const maxScroll = documentHeight.value - viewportHeight.value
|
|
31
|
+
return maxScroll > 0 ? Math.min(1, Math.max(0, y.value / maxScroll)) : 0
|
|
41
32
|
})
|
|
33
|
+
const fillHeight = computed(() => 50 * scrollProgress.value)
|
|
34
|
+
const buttonTitle = computed(() => `${t('button.backToTop')} · ${Math.round(scrollProgress.value * 100)}%`)
|
|
42
35
|
|
|
43
|
-
/**
|
|
36
|
+
/** 按用户动态效果偏好返回顶部。 */
|
|
44
37
|
function backToTop() {
|
|
45
|
-
|
|
46
|
-
return
|
|
47
|
-
|
|
48
|
-
getWindow()?.scrollTo({ top: 0, behavior: 'smooth' })
|
|
38
|
+
getWindow()?.scrollTo({ top: 0, behavior: prefersReducedMotion() ? 'instant' : 'smooth' })
|
|
49
39
|
}
|
|
50
40
|
</script>
|
|
51
41
|
|
|
52
42
|
<template>
|
|
53
43
|
<div class="lm-helper-stage">
|
|
54
|
-
<Transition name="lm-helper-
|
|
44
|
+
<Transition name="lm-helper-cat">
|
|
55
45
|
<button
|
|
56
46
|
v-if="showBackToTop"
|
|
57
|
-
class="lm-helper-
|
|
47
|
+
class="lm-helper-cat"
|
|
58
48
|
type="button"
|
|
59
49
|
:aria-label="t('button.backToTop')"
|
|
50
|
+
:title="buttonTitle"
|
|
60
51
|
@click="backToTop"
|
|
61
52
|
>
|
|
62
|
-
<svg
|
|
63
|
-
class="lm-helper-paw-svg"
|
|
64
|
-
viewBox="0 0 512 512"
|
|
65
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
66
|
-
aria-hidden="true"
|
|
67
|
-
>
|
|
53
|
+
<svg class="lm-helper-cat__svg" viewBox="0 0 64 64" aria-hidden="true">
|
|
68
54
|
<defs>
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
cx="295.77"
|
|
73
|
-
cy="176.77"
|
|
74
|
-
rx="38.75"
|
|
75
|
-
ry="29.72"
|
|
76
|
-
transform="translate(55.53 423.78) rotate(-76.66)"
|
|
77
|
-
fill="white"
|
|
78
|
-
/>
|
|
79
|
-
<ellipse
|
|
80
|
-
cx="212.93"
|
|
81
|
-
cy="176.77"
|
|
82
|
-
rx="29.72"
|
|
83
|
-
ry="38.75"
|
|
84
|
-
transform="translate(-35.04 53.89) rotate(-13.34)"
|
|
85
|
-
fill="white"
|
|
86
|
-
/>
|
|
87
|
-
<ellipse
|
|
88
|
-
cx="148.91"
|
|
89
|
-
cy="240.32"
|
|
90
|
-
rx="26.12"
|
|
91
|
-
ry="34.05"
|
|
92
|
-
transform="translate(-100.21 106.65) rotate(-30)"
|
|
93
|
-
fill="white"
|
|
94
|
-
/>
|
|
95
|
-
<ellipse
|
|
96
|
-
cx="363.09"
|
|
97
|
-
cy="231.51"
|
|
98
|
-
rx="34.05"
|
|
99
|
-
ry="26.12"
|
|
100
|
-
transform="translate(-18.94 430.2) rotate(-60)"
|
|
101
|
-
fill="white"
|
|
102
|
-
/>
|
|
103
|
-
<path
|
|
104
|
-
d="M324.5,282.26c-11.49-19.8-36.22-33.5-64.9-33.5s-53.41,13.7-64.9,33.5c-20.53,9.58-33.5,23.62-33.5,39.28,0,28.87,44.05,52.27,98.4,52.27s98.4-23.4,98.4-52.27c0-15.66-12.97-29.7-33.5-39.28Z"
|
|
105
|
-
fill="white"
|
|
106
|
-
/>
|
|
107
|
-
</mask>
|
|
108
|
-
</defs>
|
|
109
|
-
|
|
110
|
-
<g class="lm-helper-paw-base">
|
|
111
|
-
<ellipse
|
|
112
|
-
cx="295.77"
|
|
113
|
-
cy="176.77"
|
|
114
|
-
rx="38.75"
|
|
115
|
-
ry="29.72"
|
|
116
|
-
transform="translate(55.53 423.78) rotate(-76.66)"
|
|
117
|
-
/>
|
|
118
|
-
<ellipse
|
|
119
|
-
cx="212.93"
|
|
120
|
-
cy="176.77"
|
|
121
|
-
rx="29.72"
|
|
122
|
-
ry="38.75"
|
|
123
|
-
transform="translate(-35.04 53.89) rotate(-13.34)"
|
|
124
|
-
/>
|
|
125
|
-
<ellipse
|
|
126
|
-
cx="148.91"
|
|
127
|
-
cy="240.32"
|
|
128
|
-
rx="26.12"
|
|
129
|
-
ry="34.05"
|
|
130
|
-
transform="translate(-100.21 106.65) rotate(-30)"
|
|
131
|
-
/>
|
|
132
|
-
<ellipse
|
|
133
|
-
cx="363.09"
|
|
134
|
-
cy="231.51"
|
|
135
|
-
rx="34.05"
|
|
136
|
-
ry="26.12"
|
|
137
|
-
transform="translate(-18.94 430.2) rotate(-60)"
|
|
138
|
-
/>
|
|
139
|
-
<path d="M324.5,282.26c-11.49-19.8-36.22-33.5-64.9-33.5s-53.41,13.7-64.9,33.5c-20.53,9.58-33.5,23.62-33.5,39.28,0,28.87,44.05,52.27,98.4,52.27s98.4-23.4,98.4-52.27c0-15.66-12.97-29.7-33.5-39.28Z" />
|
|
140
|
-
</g>
|
|
141
|
-
|
|
142
|
-
<g mask="url(#lm-helper-paw-shape-mask)">
|
|
143
|
-
<rect
|
|
144
|
-
class="lm-helper-paw-progress"
|
|
145
|
-
:x="pawFillRect.x"
|
|
146
|
-
:y="pawFillRect.y"
|
|
147
|
-
:width="pawFillRect.width"
|
|
148
|
-
:height="pawFillRect.height"
|
|
149
|
-
/>
|
|
150
|
-
</g>
|
|
151
|
-
|
|
152
|
-
<g class="lm-helper-paw-outline">
|
|
153
|
-
<ellipse
|
|
154
|
-
cx="295.77"
|
|
155
|
-
cy="176.77"
|
|
156
|
-
rx="38.75"
|
|
157
|
-
ry="29.72"
|
|
158
|
-
transform="translate(55.53 423.78) rotate(-76.66)"
|
|
55
|
+
<path
|
|
56
|
+
:id="shapeId"
|
|
57
|
+
d="M8.5 22.7C5.9 19.5 5.7 15.4 8.7 10.4C10.2 8.2 15.9 9.5 20.9 12.7C27.2 11.1 35.6 11.5 42.2 12C45.6 10.5 51.4 7.5 54 8.8C57.2 10.3 58.2 16.1 56.9 21.9C59.1 26.5 61 32.9 59.4 39.7C57.2 48.9 45.6 54.7 32.1 54.4C18.6 54.3 8.1 50.8 5.2 41C3.1 34 4.8 28.5 8.5 22.7Z"
|
|
159
58
|
/>
|
|
160
|
-
<
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
rx="26.12"
|
|
171
|
-
ry="34.05"
|
|
172
|
-
transform="translate(-100.21 106.65) rotate(-30)"
|
|
173
|
-
/>
|
|
174
|
-
<ellipse
|
|
175
|
-
cx="363.09"
|
|
176
|
-
cy="231.51"
|
|
177
|
-
rx="34.05"
|
|
178
|
-
ry="26.12"
|
|
179
|
-
transform="translate(-18.94 430.2) rotate(-60)"
|
|
180
|
-
/>
|
|
181
|
-
<path d="M324.5,282.26c-11.49-19.8-36.22-33.5-64.9-33.5s-53.41,13.7-64.9,33.5c-20.53,9.58-33.5,23.62-33.5,39.28,0,28.87,44.05,52.27,98.4,52.27s98.4-23.4,98.4-52.27c0-15.66-12.97-29.7-33.5-39.28Z" />
|
|
182
|
-
</g>
|
|
183
|
-
|
|
184
|
-
<path
|
|
185
|
-
class="lm-helper-paw-arrow"
|
|
186
|
-
d="M256 295 L228 325 M256 295 L284 325"
|
|
187
|
-
/>
|
|
59
|
+
<path :id="`${shapeId}-arrow`" d="m24 39 8-8 8 8" />
|
|
60
|
+
<clipPath :id="clipId" clipPathUnits="userSpaceOnUse">
|
|
61
|
+
<rect x="0" :y="56 - fillHeight" width="64" :height="fillHeight" />
|
|
62
|
+
</clipPath>
|
|
63
|
+
</defs>
|
|
64
|
+
<use :href="`#${shapeId}`" class="lm-helper-cat__base" />
|
|
65
|
+
<use :href="`#${shapeId}`" class="lm-helper-cat__progress" :clip-path="`url(#${clipId})`" />
|
|
66
|
+
<use :href="`#${shapeId}`" class="lm-helper-cat__outline" />
|
|
67
|
+
<use :href="`#${shapeId}-arrow`" class="lm-helper-cat__arrow" />
|
|
68
|
+
<use :href="`#${shapeId}-arrow`" class="lm-helper-cat__arrow lm-helper-cat__arrow--filled" :clip-path="`url(#${clipId})`" />
|
|
188
69
|
</svg>
|
|
189
70
|
</button>
|
|
190
71
|
</Transition>
|
|
@@ -193,90 +74,84 @@ function backToTop() {
|
|
|
193
74
|
|
|
194
75
|
<style scoped lang="scss">
|
|
195
76
|
.lm-helper-stage {
|
|
196
|
-
@apply
|
|
77
|
+
@apply fixed right-4 z-[var(--lm-z-floating)] sm:right-6 md:right-[1.6rem] xl:right-6;
|
|
78
|
+
bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
|
|
197
79
|
}
|
|
198
80
|
|
|
199
|
-
.lm-helper-
|
|
200
|
-
@apply inline-flex items-center justify-center border-none bg-transparent p-0
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
filter: drop-shadow(0 14px 24px rgb(15 23 42 / 0.16))
|
|
205
|
-
drop-shadow(0 0 0 color-mix(in srgb, var(--lm-c-brand) 0%, transparent));
|
|
206
|
-
transition:
|
|
207
|
-
transform 220ms ease,
|
|
208
|
-
filter 220ms ease;
|
|
209
|
-
transform-origin: center;
|
|
81
|
+
.lm-helper-cat {
|
|
82
|
+
@apply inline-flex h-11 w-11 cursor-pointer items-center justify-center border-none bg-transparent p-0 xl:h-14 xl:w-14;
|
|
83
|
+
border-radius: var(--lm-radius-md);
|
|
84
|
+
filter: drop-shadow(0 2px 3px rgb(15 23 42 / 0.12));
|
|
85
|
+
transition: transform 180ms ease-out;
|
|
210
86
|
}
|
|
211
87
|
|
|
212
|
-
.lm-helper-
|
|
213
|
-
|
|
214
|
-
|
|
88
|
+
.lm-helper-cat:focus-visible {
|
|
89
|
+
outline: 2px solid var(--lm-c-primary-border-strong);
|
|
90
|
+
outline-offset: 3px;
|
|
215
91
|
}
|
|
216
92
|
|
|
217
|
-
.lm-helper-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
filter: drop-shadow(0 18px 28px rgb(15 23 42 / 0.18))
|
|
221
|
-
drop-shadow(0 0 10px color-mix(in srgb, var(--lm-c-brand) 12%, transparent));
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.lm-helper-paw-svg {
|
|
225
|
-
width: 5.25rem;
|
|
226
|
-
height: 5.25rem;
|
|
93
|
+
.lm-helper-cat__svg {
|
|
94
|
+
width: 100%;
|
|
95
|
+
height: 100%;
|
|
227
96
|
overflow: visible;
|
|
228
97
|
}
|
|
229
98
|
|
|
230
|
-
.lm-helper-
|
|
99
|
+
.lm-helper-cat__base {
|
|
231
100
|
fill: color-mix(in srgb, var(--lm-surface-panel-bg) 98%, var(--lm-c-bg-base));
|
|
232
101
|
}
|
|
233
102
|
|
|
234
|
-
.lm-helper-
|
|
235
|
-
fill: var(--lm-c-brand);
|
|
236
|
-
transition:
|
|
237
|
-
y 260ms ease,
|
|
238
|
-
height 260ms ease,
|
|
239
|
-
fill 220ms ease;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.lm-helper-paw-outline {
|
|
103
|
+
.lm-helper-cat__outline {
|
|
243
104
|
fill: none;
|
|
244
105
|
stroke: color-mix(in srgb, var(--lm-c-border-hover) 88%, white 10%);
|
|
245
|
-
stroke-width:
|
|
246
|
-
|
|
106
|
+
stroke-width: 1.4;
|
|
107
|
+
stroke-linecap: round;
|
|
108
|
+
stroke-linejoin: round;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.lm-helper-cat__progress {
|
|
112
|
+
fill: var(--lm-c-primary-base);
|
|
247
113
|
}
|
|
248
114
|
|
|
249
|
-
.lm-helper-
|
|
115
|
+
.lm-helper-cat__arrow {
|
|
116
|
+
fill: none;
|
|
250
117
|
stroke: var(--lm-c-text-primary);
|
|
251
|
-
stroke-width:
|
|
118
|
+
stroke-width: 3.5;
|
|
252
119
|
stroke-linecap: round;
|
|
253
120
|
stroke-linejoin: round;
|
|
254
|
-
transition:
|
|
255
|
-
stroke 220ms ease,
|
|
256
|
-
transform 220ms ease;
|
|
257
|
-
transform-origin: center;
|
|
258
121
|
}
|
|
259
122
|
|
|
260
|
-
.lm-helper-
|
|
261
|
-
|
|
262
|
-
stroke: color-mix(in srgb, var(--lm-c-brand) 40%, var(--lm-c-border-hover));
|
|
123
|
+
.lm-helper-cat__arrow--filled {
|
|
124
|
+
stroke: var(--lm-c-primary-on-solid);
|
|
263
125
|
}
|
|
264
126
|
|
|
265
|
-
|
|
266
|
-
.lm-helper-
|
|
267
|
-
|
|
127
|
+
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
|
|
128
|
+
.lm-helper-cat:hover {
|
|
129
|
+
transform: translateY(-3px);
|
|
130
|
+
}
|
|
268
131
|
}
|
|
269
132
|
|
|
270
|
-
.lm-helper-
|
|
271
|
-
.lm-helper-
|
|
272
|
-
transition:
|
|
273
|
-
opacity 220ms ease,
|
|
274
|
-
transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
|
|
133
|
+
.lm-helper-cat-enter-active,
|
|
134
|
+
.lm-helper-cat-leave-active {
|
|
135
|
+
transition: opacity 160ms ease-out;
|
|
275
136
|
}
|
|
276
137
|
|
|
277
|
-
.lm-helper-
|
|
278
|
-
.lm-helper-
|
|
138
|
+
.lm-helper-cat-enter-from,
|
|
139
|
+
.lm-helper-cat-leave-to {
|
|
279
140
|
opacity: 0;
|
|
280
|
-
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@media (max-width: 1279px) {
|
|
144
|
+
:global(body:has(.lm-toc-mobile__trigger) .lm-helper-stage) {
|
|
145
|
+
bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
@media (prefers-reduced-motion: reduce) {
|
|
150
|
+
.lm-helper-cat,
|
|
151
|
+
.lm-helper-cat-enter-active,
|
|
152
|
+
.lm-helper-cat-leave-active {
|
|
153
|
+
transition: none;
|
|
154
|
+
transform: none;
|
|
155
|
+
}
|
|
281
156
|
}
|
|
282
157
|
</style>
|
package/components/LmNotice.vue
CHANGED
|
@@ -124,7 +124,7 @@ function closeNotice() {
|
|
|
124
124
|
position: absolute;
|
|
125
125
|
inset: 0 auto 0 0;
|
|
126
126
|
width: 4px;
|
|
127
|
-
background:
|
|
127
|
+
background: var(--lm-c-primary-base);
|
|
128
128
|
opacity: 0.9;
|
|
129
129
|
}
|
|
130
130
|
|
|
@@ -135,21 +135,21 @@ function closeNotice() {
|
|
|
135
135
|
width: 8rem;
|
|
136
136
|
height: 8rem;
|
|
137
137
|
border-radius: 999px;
|
|
138
|
-
background:
|
|
138
|
+
background: var(--lm-c-primary-soft);
|
|
139
139
|
filter: blur(18px);
|
|
140
140
|
pointer-events: none;
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
.lm-notice__icon {
|
|
144
144
|
@include lm-surface-nav(
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
var(--lm-c-primary-soft),
|
|
146
|
+
var(--lm-c-primary-border-subtle),
|
|
147
147
|
0 8px 18px rgb(15 23 42 / 0.06),
|
|
148
148
|
10px
|
|
149
149
|
);
|
|
150
150
|
|
|
151
151
|
@apply relative z-[var(--lm-z-raised)] inline-flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-full;
|
|
152
|
-
color: var(--lm-c-
|
|
152
|
+
color: var(--lm-c-primary-text);
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
.lm-notice__content {
|
|
@@ -173,7 +173,7 @@ function closeNotice() {
|
|
|
173
173
|
.lm-notice__close:hover,
|
|
174
174
|
.lm-notice__close:focus-visible {
|
|
175
175
|
color: var(--lm-c-text-primary);
|
|
176
|
-
background:
|
|
176
|
+
background: var(--lm-c-primary-soft);
|
|
177
177
|
transform: translateY(-1px);
|
|
178
178
|
}
|
|
179
179
|
</style>
|