diff --git a/app/assets/css/main.css b/app/assets/css/main.css index 7ad8d294..930153ef 100644 --- a/app/assets/css/main.css +++ b/app/assets/css/main.css @@ -1,5 +1,23 @@ body { + background: + radial-gradient( + circle at top left, + rgba(232, 83, 73, 0.08), + transparent 28% + ), + radial-gradient( + circle at top right, + rgba(48, 111, 255, 0.08), + transparent 32% + ), + linear-gradient( + 180deg, + var(--color-bg-1) 0%, + var(--color-neutral-2) 46%, + var(--color-bg-1) 100% + ); background-color: var(--color-neutral-2); + background-attachment: fixed; color: var(--color-text-2); --border-radius-small: 4px; --border-radius-medium: 6px; @@ -10,6 +28,38 @@ body { @apply flex min-h-screen flex-col gap-4; } +a, +button, +.arco-btn, +.arco-card, +.arco-menu-item, +.arco-link { + transition: + transform 0.25s ease, + box-shadow 0.25s ease, + border-color 0.25s ease, + background-color 0.25s ease, + color 0.25s ease; +} + +/* .arco-card, +.arco-collapse, +.arco-collapse-item, +.arco-collapse-item-header, +.arco-collapse-item-content, +.arco-menu, +.arco-menu-inner, +.arco-menu-light, +.arco-layout-sider, +.arco-layout-sider-light, +.arco-layout-sider-children, +.arco-menu-inline-header, +.arco-menu-inline-content, +.arco-menu-item, +.arco-menu-item-inner { + background-color: transparent !important; +} */ + .arco-drawer-body { padding: 0; } diff --git a/app/components/AppFooter.vue b/app/components/AppFooter.vue index 58fe4e41..130e3c9f 100644 --- a/app/components/AppFooter.vue +++ b/app/components/AppFooter.vue @@ -1,5 +1,9 @@ @@ -8,24 +12,40 @@ const { t } = useI18n() class="mx-auto flex min-h-14 max-w-full flex-col items-center justify-center gap-1 py-3 text-center text-sm md:flex-row md:gap-0 md:py-0" > - + Copyright © {{ new Date().getFullYear() }} KMS Tools - - + + Running on AsiaYun - - + + Code with by {{ t('label.author') }} - + diff --git a/app/components/AppHeader.vue b/app/components/AppHeader.vue index 77ceb5e3..9c3b3c13 100644 --- a/app/components/AppHeader.vue +++ b/app/components/AppHeader.vue @@ -1,12 +1,19 @@ - - + + + + - + {{ title }} - + - + + @@ -90,19 +109,23 @@ const { copy, copied } = useClipboard({ - - + + - - {{ t('label.x64') }} - {{ t('label.x86') }} - - - + + + {{ t('label.x64') }} + {{ t('label.x86') }} + + + + + - - - - - - - - - - - - - - - - - - {{ t('label.download') }} - - + + + + + + + + + + + + + + - - {{ copied ? t('label.copy-success') : t('label.copy') }} - - - + + + + + + + + + + {{ t('label.download') }} + + + + + + + {{ copied ? t('label.copy-success') : t('label.copy') }} + + + + + - - + + + diff --git a/app/components/CommonTips.vue b/app/components/CommonTips.vue index 548dbab9..4e6acc25 100644 --- a/app/components/CommonTips.vue +++ b/app/components/CommonTips.vue @@ -1,6 +1,10 @@ - - - - - {{ t('title.tips') }} - - - - - - - - + + + + + + {{ t('title.tips') }} + + + + + + + + + diff --git a/app/composables/useMotionPresets.ts b/app/composables/useMotionPresets.ts new file mode 100644 index 00000000..a1ea7e39 --- /dev/null +++ b/app/composables/useMotionPresets.ts @@ -0,0 +1,111 @@ +import { useReducedMotion } from 'motion-v' + +const easeOut = [0.22, 1, 0.36, 1] as const + +const springTransition = { + type: 'spring', + stiffness: 120, + damping: 20, + mass: 1, +} as const + +export function useMotionPresets() { + const reduceMotion = useReducedMotion() + + const viewport = { + once: true, + amount: 0.2, + } as const + + const hidden = (y = 16, scale = 1) => { + if (reduceMotion.value) { + return { opacity: 1, y: 0, scale: 1, filter: 'blur(0px)' } + } + + return { + opacity: 0, + y, + scale, + filter: 'blur(6px)', + } + } + + const visible = (delay = 0) => { + if (reduceMotion.value) { + return { opacity: 1, y: 0, scale: 1, filter: 'blur(0px)' } + } + + return { + opacity: 1, + y: 0, + scale: 1, + filter: 'blur(0px)', + transition: { + ...springTransition, + delay, + }, + } + } + + const softExit = (y = -10) => { + if (reduceMotion.value) { + return { opacity: 1 } + } + + return { + opacity: 0, + y, + filter: 'blur(4px)', + transition: { + duration: 0.2, + ease: 'easeInOut', + }, + } + } + + const hoverLift = (distance = 5, scale = 1.01) => { + if (reduceMotion.value) { + return {} + } + + return { + y: -distance, + scale, + transition: { + duration: 0.22, + ease: easeOut, + }, + } + } + + const press = reduceMotion.value ? { scale: 1 } : { scale: 0.985 } + + const float = (distance = 8, duration = 9) => { + if (reduceMotion.value) { + return {} + } + + return { + y: [0, -distance, 0], + rotate: [0, 0.6, 0], + transition: { + duration, + ease: 'easeInOut' as const, + repeat: Infinity, + }, + } + } + + return { + easeOut, + float, + hidden, + hoverLift, + press, + reduceMotion, + softExit, + springTransition, + viewport, + visible, + } +} diff --git a/app/layouts/default.vue b/app/layouts/default.vue index 64ab5107..abd11c9e 100644 --- a/app/layouts/default.vue +++ b/app/layouts/default.vue @@ -1,8 +1,12 @@ - - + + + + + + + + diff --git a/app/pages/activate/windows-server.vue b/app/pages/activate/windows-server.vue index a30b5256..5c3cb247 100644 --- a/app/pages/activate/windows-server.vue +++ b/app/pages/activate/windows-server.vue @@ -1,8 +1,12 @@ - - + + + + + + + + diff --git a/app/pages/activate/windows.vue b/app/pages/activate/windows.vue index 8be71327..20921f25 100644 --- a/app/pages/activate/windows.vue +++ b/app/pages/activate/windows.vue @@ -1,8 +1,12 @@ - - + + + + + + + + diff --git a/app/pages/check/index.vue b/app/pages/check/index.vue index 209b9855..d6a106d5 100644 --- a/app/pages/check/index.vue +++ b/app/pages/check/index.vue @@ -1,5 +1,6 @@ - - - - - {{ t('title.kms-check') }} - - - - - - - - - - - - - - - - - - V6 Protocol - V5 Protocol - V4 Protocol - - - - - {{ t('label.submit') }} - - - - - {{ resultInfo.message }} - - - + + + + + + {{ t('title.kms-check') }} + + + + + + + + + + + + + + + + + + + + + + + + + V6 Protocol + V5 Protocol + V4 Protocol + + + + + + + + {{ t('label.submit') }} + + + + + + + + + + {{ resultInfo.message }} + + + + + + diff --git a/app/pages/index.vue b/app/pages/index.vue index a6e4ced0..d1c116d1 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -1,7 +1,19 @@