valaxy-theme-yun 1.2.2 → 1.3.1
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/App.vue +27 -12
- package/client/components/YunArtalk.vue +12 -0
- package/client/components/YunFireworks.vue +29 -0
- package/client/components/YunFuseSearch.vue +418 -0
- package/client/components/YunTwikoo.vue +14 -0
- package/client/components/YunWaline.vue +17 -0
- package/components/YunBanner.vue +12 -3
- package/components/YunCloud.vue +14 -1
- package/components/YunFireworks.vue +4 -27
- package/components/YunFuseSearch.vue +4 -476
- package/components/YunPostCategories.vue +6 -3
- package/components/YunPostDateMeta.vue +26 -9
- package/components/YunSearchTrigger.vue +8 -2
- package/components/author/YunAuthorAvatar.vue +2 -0
- package/components/collection/YunCollectionCard.vue +6 -18
- package/components/menu/YunNavMenuItem.vue +4 -1
- package/components/prologue/YunPrologueSquare.vue +23 -100
- package/components/theme/nimbo/YunNimboNavMenu.vue +56 -79
- package/components/theme/strato/YunStratoNavMenu.vue +25 -46
- package/components/third/YunArtalk.vue +4 -10
- package/components/third/YunTwikoo.vue +4 -12
- package/components/third/YunWaline.vue +4 -15
- package/layouts/home.vue +31 -25
- package/layouts/post.vue +14 -5
- package/package.json +2 -2
- package/stores/app.ts +3 -3
- package/styles/common/nav.scss +3 -3
- package/styles/index.ts +1 -0
- package/styles/widgets/search.scss +57 -0
- package/types/index.d.ts +3 -0
- package/utils/animation.ts +4 -8
- package/utils/scroll.ts +7 -0
package/stores/app.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useToggle } from '@vueuse/core'
|
|
2
2
|
import { acceptHMRUpdate, defineStore } from 'pinia'
|
|
3
|
-
import { useScreenSize } from 'valaxy'
|
|
3
|
+
import { useScreenSize, useWindowScrollY } from 'valaxy'
|
|
4
4
|
import { computed, ref } from 'vue'
|
|
5
5
|
import { useThemeConfig } from '../composables'
|
|
6
6
|
|
|
@@ -38,7 +38,7 @@ export const useYunAppStore = defineStore('yun-app', () => {
|
|
|
38
38
|
isOpen: isFullscreenMenuOpen,
|
|
39
39
|
toggle: toggleFullscreenMenu,
|
|
40
40
|
},
|
|
41
|
-
scrollY:
|
|
41
|
+
scrollY: useWindowScrollY(),
|
|
42
42
|
|
|
43
43
|
isStrato,
|
|
44
44
|
isNimbo,
|
package/styles/common/nav.scss
CHANGED
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
// Keep the homepage entrance soft and brief; no spring or overshoot.
|
|
34
|
-
.yun-nav-menu.
|
|
35
|
-
animation: yun-nav-arrive 600ms cubic-bezier(0.22, 1, 0.36, 1)
|
|
34
|
+
.yun-nav-menu.is-home-nav {
|
|
35
|
+
animation: yun-nav-arrive 600ms cubic-bezier(0.22, 1, 0.36, 1);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
@keyframes yun-nav-arrive {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
@media (prefers-reduced-motion: reduce) {
|
|
51
|
-
.yun-nav-menu.
|
|
51
|
+
.yun-nav-menu.is-home-nav {
|
|
52
52
|
animation: none;
|
|
53
53
|
}
|
|
54
54
|
}
|
package/styles/index.ts
CHANGED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
.yun-search-popup {
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
backdrop-filter: blur(30px);
|
|
8
|
+
/* stylelint-disable-next-line property-no-vendor-prefix */
|
|
9
|
+
-webkit-backdrop-filter: blur(30px);
|
|
10
|
+
text-align: center;
|
|
11
|
+
margin: 0;
|
|
12
|
+
z-index: var(--yun-z-search-popup);
|
|
13
|
+
transition: opacity var(--va-transition-duration-fast);
|
|
14
|
+
background-color: var(--va-c-bg-opacity);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.yun-search-input {
|
|
18
|
+
background: transparent;
|
|
19
|
+
color: var(--va-c-text);
|
|
20
|
+
font-size: 1.5rem;
|
|
21
|
+
border-radius: 3rem;
|
|
22
|
+
padding: 1rem 1.5rem;
|
|
23
|
+
border: 1px solid var(--va-c-gray);
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
width: 90%;
|
|
26
|
+
max-width: 800px;
|
|
27
|
+
font-family: var(--va-font-serif);
|
|
28
|
+
font-weight: 900;
|
|
29
|
+
text-align: center;
|
|
30
|
+
transition: border-color var(--va-transition-duration-fast);
|
|
31
|
+
|
|
32
|
+
&:focus {
|
|
33
|
+
border-color: var(--va-c-text);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.yun-popup {
|
|
38
|
+
.search-icon, .close-icon {
|
|
39
|
+
display: inline-block;
|
|
40
|
+
width: 2rem;
|
|
41
|
+
height: 2rem;
|
|
42
|
+
padding: 0.5rem;
|
|
43
|
+
|
|
44
|
+
.icon {
|
|
45
|
+
width: 2rem;
|
|
46
|
+
height: 2rem;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.yun-fuse-search {
|
|
52
|
+
.yun-fuse-result-item {
|
|
53
|
+
// padding: 0.5rem;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
border-top: 1px dashed #ccc;
|
|
56
|
+
}
|
|
57
|
+
}
|
package/types/index.d.ts
CHANGED
|
@@ -163,6 +163,9 @@ export interface ThemeConfig extends DefaultTheme.Config {
|
|
|
163
163
|
*/
|
|
164
164
|
banner: YunTheme.Banner
|
|
165
165
|
|
|
166
|
+
/** Where to load the optional Noto Serif SC web font. @default 'all' */
|
|
167
|
+
serifFont?: 'all' | 'except-home' | 'off'
|
|
168
|
+
|
|
166
169
|
/** Post list presentation; per-post title classes take precedence. */
|
|
167
170
|
postCard?: {
|
|
168
171
|
/** Show the bottom excerpt gradient. @default true */
|
package/utils/animation.ts
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
import { isClient } from '@vueuse/core'
|
|
2
|
-
import { gsap } from 'gsap'
|
|
3
|
-
// gsap/ScrollToPlugin is ESM, but gsap not include 'type:module' in package.json
|
|
4
|
-
// use cjs for vite-ssg, optimizeDeps for ESM
|
|
5
|
-
import ScrollToPlugin from 'gsap/dist/ScrollToPlugin'
|
|
6
2
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export function goDown() {
|
|
3
|
+
export async function goDown() {
|
|
10
4
|
if (!isClient)
|
|
11
5
|
return
|
|
12
6
|
|
|
13
7
|
const banner = document.getElementById('yun-banner')
|
|
14
8
|
if (banner) {
|
|
9
|
+
const { gsap } = await import('./scroll')
|
|
15
10
|
// nav menu height
|
|
16
11
|
const offset = 50
|
|
17
12
|
|
|
@@ -28,10 +23,11 @@ export function goDown() {
|
|
|
28
23
|
/**
|
|
29
24
|
* back to top
|
|
30
25
|
*/
|
|
31
|
-
export function backToTop() {
|
|
26
|
+
export async function backToTop() {
|
|
32
27
|
if (!isClient)
|
|
33
28
|
return
|
|
34
29
|
|
|
30
|
+
const { gsap } = await import('./scroll')
|
|
35
31
|
gsap.to(window, {
|
|
36
32
|
duration: 1,
|
|
37
33
|
scrollTo: {
|