mirror of https://github.com/YunYouJun/valaxy
feat(theme-yun): add banner duration config
This commit is contained in:
parent
e463ec569d
commit
201e90184f
|
@ -1,8 +1,8 @@
|
|||
import { defineThemeConfig } from 'valaxy-theme-yun'
|
||||
|
||||
export default defineThemeConfig({
|
||||
// type: 'strato',
|
||||
type: 'nimbo',
|
||||
type: 'strato',
|
||||
// type: 'nimbo',
|
||||
// colors: {
|
||||
// primary: 'red',
|
||||
// },
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
"valaxy-theme-yun": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^4.13.2",
|
||||
"@antfu/eslint-config": "^4.14.1",
|
||||
"@iconify-json/logos": "catalog:",
|
||||
"@iconify-json/vscode-icons": "catalog:",
|
||||
"@microsoft/api-extractor": "^7.52.8",
|
||||
|
@ -92,7 +92,7 @@
|
|||
"@types/markdown-it-attrs": "^4.1.3",
|
||||
"@types/markdown-it-container": "^2.0.10",
|
||||
"@types/markdown-it-emoji": "^3.0.1",
|
||||
"@types/node": "^22.15.29",
|
||||
"@types/node": "^22.15.30",
|
||||
"@types/prompts": "^2.4.9",
|
||||
"bumpp": "^10.1.1",
|
||||
"cross-env": "^7.0.3",
|
||||
|
@ -110,8 +110,8 @@
|
|||
"tsx": "^4.19.4",
|
||||
"typescript": "catalog:",
|
||||
"unbuild": "catalog:",
|
||||
"vite-node": "^3.2.1",
|
||||
"vitest": "^3.2.1",
|
||||
"vite-node": "^3.2.2",
|
||||
"vitest": "^3.2.2",
|
||||
"vue-tsc": "2.2.0",
|
||||
"zx": "catalog:"
|
||||
},
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
"@iconify-json/ri": "catalog:",
|
||||
"@intlify/unplugin-vue-i18n": "^6.0.8",
|
||||
"@primevue/themes": "^4.3.5",
|
||||
"@types/body-parser": "^1.19.5",
|
||||
"@types/body-parser": "^1.19.6",
|
||||
"@types/splitpanes": "^2.2.6",
|
||||
"@types/wicg-file-system-access": "^2023.10.6",
|
||||
"gray-matter": "^4.0.3",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { useDark, usePreferredDark, useToggle } from '@vueuse/core'
|
||||
|
||||
// these APIs are auto-imported from @vueuse/core
|
||||
export const isDark = useDark()
|
||||
export const toggleDark = useToggle(isDark)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable import/no-duplicates */
|
||||
import { definePreset } from '@primevue/themes'
|
||||
import Aura from '@primevue/themes/aura'
|
||||
import { createPinia } from 'pinia'
|
||||
|
|
|
@ -17,6 +17,6 @@
|
|||
"crc": "^4.3.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vitest": "^3.2.1"
|
||||
"vitest": "^3.2.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ onMounted(async () => {
|
|||
await sleep(500)
|
||||
lineStatus.value = 'active'
|
||||
if (yun.isNimbo) {
|
||||
await sleep(500)
|
||||
await sleep(themeConfig.value.banner.duration || 500)
|
||||
lineStatus.value = 'exit'
|
||||
|
||||
animationStatus.value = 'prologue'
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { useValaxyDark } from 'valaxy'
|
||||
import { computed } from 'vue'
|
||||
|
||||
// background-image: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
|
||||
const { isDark } = useValaxyDark()
|
||||
const gradientStyles = computed(() => {
|
||||
|
|
|
@ -27,6 +27,14 @@ export namespace YunTheme {
|
|||
* site-name class
|
||||
*/
|
||||
siteNameClass?: string
|
||||
|
||||
/**
|
||||
* @nimbo
|
||||
* @en Banner Animation Duration
|
||||
* @zh Banner 动画持续时间
|
||||
* @default 500
|
||||
*/
|
||||
duration?: number
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,6 +97,14 @@ export interface ThemeConfig extends DefaultTheme.Config {
|
|||
* 首页标语
|
||||
*/
|
||||
banner: YunTheme.Banner
|
||||
// /**
|
||||
// * prologue
|
||||
// * 开场白
|
||||
// * @zh banner 之后的首页导航
|
||||
// */
|
||||
// prologue: {
|
||||
// enable: boolean
|
||||
// }
|
||||
|
||||
/**
|
||||
* @en Background image
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { onUnmounted } from 'vue'
|
||||
|
||||
// eslint-disable-next-line import/no-mutable-exports
|
||||
export let contentUpdatedCallbacks: (() => any)[] = []
|
||||
|
||||
/**
|
||||
|
|
|
@ -23,13 +23,13 @@ import type { PageData } from '../../../types'
|
|||
|
||||
import type { Blocks, ContainerOptions } from './plugins/markdown-it/container'
|
||||
|
||||
export type ThemeOptions =
|
||||
| ThemeRegistration
|
||||
| BuiltinTheme
|
||||
| {
|
||||
light: ThemeRegistration | BuiltinTheme
|
||||
dark: ThemeRegistration | BuiltinTheme
|
||||
}
|
||||
export type ThemeOptions
|
||||
= | ThemeRegistration
|
||||
| BuiltinTheme
|
||||
| {
|
||||
light: ThemeRegistration | BuiltinTheme
|
||||
dark: ThemeRegistration | BuiltinTheme
|
||||
}
|
||||
|
||||
/**
|
||||
* Extend Markdown options
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
"@clack/prompts": "^0.11.0",
|
||||
"@iconify-json/ri": "catalog:",
|
||||
"@intlify/unplugin-vue-i18n": "^6.0.8",
|
||||
"@shikijs/transformers": "^3.4.2",
|
||||
"@shikijs/transformers": "^3.6.0",
|
||||
"@types/katex": "^0.16.7",
|
||||
"@unhead/addons": "catalog:",
|
||||
"@unhead/schema-org": "catalog:",
|
||||
|
@ -116,15 +116,15 @@
|
|||
"ora": "^8.2.0",
|
||||
"pascalcase": "^2.0.0",
|
||||
"pathe": "^2.0.3",
|
||||
"pinia": "^3.0.2",
|
||||
"pinia": "^3.0.3",
|
||||
"qrcode": "^1.5.4",
|
||||
"resolve-global": "^2.0.0",
|
||||
"sass": "^1.89.1",
|
||||
"shiki": "^3.4.2",
|
||||
"shiki": "^3.6.0",
|
||||
"star-markdown-css": "^0.5.3",
|
||||
"table": "^6.9.0",
|
||||
"unhead": "catalog:",
|
||||
"unocss": "^66.1.3",
|
||||
"unocss": "^66.1.4",
|
||||
"unplugin-vue-components": "28.0.0",
|
||||
"unplugin-vue-markdown": "^28.3.1",
|
||||
"unplugin-vue-router": "^0.12.0",
|
||||
|
@ -135,12 +135,12 @@
|
|||
"vite-plugin-vue-layouts": "^0.11.0",
|
||||
"vite-ssg": "^27.0.1",
|
||||
"vite-ssg-sitemap": "^0.9.0",
|
||||
"vitepress-plugin-group-icons": "^1.5.5",
|
||||
"vitepress-plugin-group-icons": "^1.6.0",
|
||||
"vue": "^3.5.16",
|
||||
"vue-i18n": "catalog:",
|
||||
"vue-router": "^4.5.1",
|
||||
"yargs": "^18.0.0",
|
||||
"zfeed": "^0.2.2"
|
||||
"zfeed": "^0.2.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@mdit-vue/plugin-component": "^2.1.4",
|
||||
|
@ -165,6 +165,6 @@
|
|||
"diacritics": "^1.3.0",
|
||||
"gh-pages": "^6.3.0",
|
||||
"https-localhost": "^4.7.1",
|
||||
"rollup-plugin-visualizer": "^6.0.1"
|
||||
"rollup-plugin-visualizer": "^6.0.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import type { Header } from '@valaxyjs/utils'
|
||||
import type { Post } from './posts'
|
||||
|
||||
export type CleanUrlsMode =
|
||||
| 'disabled'
|
||||
| 'without-subfolders'
|
||||
| 'with-subfolders'
|
||||
export type CleanUrlsMode
|
||||
= | 'disabled'
|
||||
| 'without-subfolders'
|
||||
| 'with-subfolders'
|
||||
|
||||
export interface PageData {
|
||||
relativePath: string
|
||||
|
@ -26,6 +26,6 @@ export interface PageDataPayload {
|
|||
pageData: PageData
|
||||
}
|
||||
|
||||
export type HeadConfig =
|
||||
| [string, Record<string, string>]
|
||||
| [string, Record<string, string>, string]
|
||||
export type HeadConfig
|
||||
= | [string, Record<string, string>]
|
||||
| [string, Record<string, string>, string]
|
||||
|
|
2046
pnpm-lock.yaml
2046
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -8,7 +8,7 @@ packages:
|
|||
- scripts
|
||||
catalog:
|
||||
'@iconify-json/ant-design': ^1.2.5
|
||||
'@iconify-json/carbon': ^1.2.8
|
||||
'@iconify-json/carbon': ^1.2.9
|
||||
'@iconify-json/logos': ^1.2.4
|
||||
'@iconify-json/ri': ^1.2.5
|
||||
'@iconify-json/simple-icons': ^1.2.37
|
||||
|
@ -22,6 +22,6 @@ catalog:
|
|||
unhead: ^2.0.10
|
||||
vite: ^6.3.5
|
||||
vue-i18n: ^11.1.5
|
||||
zx: ^8.5.4
|
||||
zx: ^8.5.5
|
||||
onlyBuiltDependencies:
|
||||
- vue-demi
|
||||
|
|
Loading…
Reference in New Issue