feat: add initial project setup with Vue, Vite and Vuetify
This commit is contained in:
141
src/styles/animations.css
Normal file
141
src/styles/animations.css
Normal file
@@ -0,0 +1,141 @@
|
||||
/* src/styles/animations.css */
|
||||
|
||||
/* 粒子背景入场动画 */
|
||||
@keyframes particles-fade-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
transform: scale(0.95);
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* 姓名文字渐变动画 */
|
||||
@keyframes name-gradient-shift {
|
||||
0%, 100% {
|
||||
background-position: 0% 50%;
|
||||
}
|
||||
50% {
|
||||
background-position: 100% 50%;
|
||||
}
|
||||
}
|
||||
|
||||
/* 社交图标悬停脉冲效果 */
|
||||
@keyframes social-pulse {
|
||||
0% {
|
||||
box-shadow: 0 0 0 0 rgba(122, 197, 232, 0.4);
|
||||
}
|
||||
70% {
|
||||
box-shadow: 0 0 0 12px rgba(122, 197, 232, 0);
|
||||
}
|
||||
100% {
|
||||
box-shadow: 0 0 0 0 rgba(122, 197, 232, 0);
|
||||
}
|
||||
}
|
||||
|
||||
/* 微信二维码弹窗动画 */
|
||||
@keyframes modal-fade-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(20px) scale(0.95);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0) scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* 光标闪烁动画 */
|
||||
@keyframes blink-caret {
|
||||
from, to {
|
||||
opacity: 0;
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* 背景粒子浮动效果 */
|
||||
@keyframes particle-float {
|
||||
0%, 100% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
50% {
|
||||
transform: translateY(-20px);
|
||||
}
|
||||
}
|
||||
|
||||
/* 应用动画的CSS类 */
|
||||
.particle-container {
|
||||
animation: particles-fade-in 1.5s ease-out forwards;
|
||||
}
|
||||
|
||||
.name-gradient-animation {
|
||||
background: linear-gradient(
|
||||
135deg,
|
||||
#a8d8ea 0%,
|
||||
#7ac5e8 50%,
|
||||
#56b4d3 100%
|
||||
);
|
||||
background-size: 200% 200%;
|
||||
animation: name-gradient-shift 8s ease infinite;
|
||||
}
|
||||
|
||||
.social-icon-hover {
|
||||
transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
}
|
||||
|
||||
.social-icon-hover:hover {
|
||||
animation: social-pulse 1.5s infinite;
|
||||
}
|
||||
|
||||
.wechat-modal-content {
|
||||
animation: modal-fade-in 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
|
||||
}
|
||||
|
||||
.typewriter-cursor {
|
||||
animation: blink-caret 0.75s step-end infinite;
|
||||
}
|
||||
|
||||
.particle-float {
|
||||
animation: particle-float 6s ease-in-out infinite;
|
||||
}
|
||||
|
||||
/* 响应式动画调整 */
|
||||
@media (max-width: 768px) {
|
||||
@keyframes name-gradient-shift {
|
||||
0%, 100% {
|
||||
background-position: 0% 30%;
|
||||
}
|
||||
50% {
|
||||
background-position: 100% 30%;
|
||||
}
|
||||
}
|
||||
|
||||
.wechat-modal-content {
|
||||
animation-name: modal-fade-in-mobile;
|
||||
}
|
||||
|
||||
@keyframes modal-fade-in-mobile {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(10px) scale(0.98);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0) scale(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 性能优化设置 */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
* {
|
||||
animation-duration: 0.01ms !important;
|
||||
animation-iteration-count: 1 !important;
|
||||
transition-duration: 0.01ms !important;
|
||||
scroll-behavior: auto !important;
|
||||
}
|
||||
}
|
136
src/styles/base.css
Normal file
136
src/styles/base.css
Normal file
@@ -0,0 +1,136 @@
|
||||
/* ========== 基础重置 ========== */
|
||||
@import url('https://cdn.jsdelivr.net/npm/remixicon@3.5.0/fonts/remixicon.css');
|
||||
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&display=swap');
|
||||
|
||||
:where(*, *::before, *::after) {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
:where(html) {
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-rendering: optimizeLegibility;
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
:where(body) {
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
line-height: 1.6;
|
||||
font-family:
|
||||
'Noto Sans SC',
|
||||
system-ui,
|
||||
-apple-system,
|
||||
'Segoe UI',
|
||||
Roboto,
|
||||
'Helvetica Neue',
|
||||
sans-serif;
|
||||
color: var(--color-text-primary);
|
||||
background-color: var(--color-bg-light);
|
||||
background-image:
|
||||
radial-gradient(at 80% 20%, var(--color-primary-100) 0px, transparent 50%),
|
||||
radial-gradient(at 0% 50%, var(--color-primary-50) 0px, transparent 50%);
|
||||
}
|
||||
|
||||
/* ========== 排版系统 ========== */
|
||||
:where(h1, h2, h3, h4, h5, h6) {
|
||||
font-weight: 700;
|
||||
line-height: 1.2;
|
||||
margin-bottom: var(--spacing-md);
|
||||
}
|
||||
|
||||
:where(h1) { font-size: var(--text-4xl); }
|
||||
:where(h2) { font-size: var(--text-3xl); }
|
||||
:where(h3) { font-size: var(--text-2xl); }
|
||||
:where(h4) { font-size: var(--text-xl); }
|
||||
:where(p) { margin-bottom: var(--spacing-md); }
|
||||
|
||||
/* ========== 交互元素 ========== */
|
||||
:where(a) {
|
||||
color: var(--color-primary-500);
|
||||
text-decoration: none;
|
||||
transition: color var(--transition-fast);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
:where(a:hover) {
|
||||
color: var(--color-primary-600);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
:where(button) {
|
||||
border: none;
|
||||
background: none;
|
||||
font-family: inherit;
|
||||
cursor: pointer;
|
||||
padding: var(--spacing-sm) var(--spacing-md);
|
||||
border-radius: var(--radius-md);
|
||||
transition: all var(--transition-fast);
|
||||
}
|
||||
|
||||
:where(button:focus-visible) {
|
||||
outline: 2px solid var(--color-primary-400);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* ========== 实用类 ========== */
|
||||
.container {
|
||||
width: 100%;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 0 var(--spacing-md);
|
||||
}
|
||||
|
||||
.section {
|
||||
padding: var(--spacing-xl) 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* ========== 动画基础 ========== */
|
||||
@keyframes float {
|
||||
0%, 100% { transform: translateY(0); }
|
||||
50% { transform: translateY(-12px); }
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 0.5; }
|
||||
}
|
||||
|
||||
/* ========== 猫咪主题元素 ========== */
|
||||
.cat-paw {
|
||||
position: absolute;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background-image: url('@/assets/paw-print.png');
|
||||
background-size: contain;
|
||||
opacity: 0.15;
|
||||
pointer-events: none;
|
||||
z-index: var(--z-index-background);
|
||||
}
|
||||
|
||||
/* ========== 响应式调整 ========== */
|
||||
@media (max-width: 768px) {
|
||||
:where(h1) { font-size: var(--text-3xl); }
|
||||
:where(h2) { font-size: var(--text-2xl); }
|
||||
|
||||
.section {
|
||||
padding: var(--spacing-lg) 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* ========== 打印样式 ========== */
|
||||
@media print {
|
||||
:where(body) {
|
||||
background: none !important;
|
||||
color: black !important;
|
||||
}
|
||||
|
||||
:where(a) {
|
||||
color: black !important;
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
}
|
6
src/styles/settings.scss
Normal file
6
src/styles/settings.scss
Normal file
@@ -0,0 +1,6 @@
|
||||
// src/styles/settings.scss
|
||||
@use "vuetify/settings" with (
|
||||
$color-pack: false,
|
||||
$body-font-family: 'Roboto',
|
||||
$border-radius-root: 8px
|
||||
);
|
107
src/styles/variables.css
Normal file
107
src/styles/variables.css
Normal file
@@ -0,0 +1,107 @@
|
||||
/* ========== 颜色变量 ========== */
|
||||
:root {
|
||||
/* 主色调 (猫主题蓝) */
|
||||
--color-primary-50: #f0f9ff;
|
||||
--color-primary-100: #e0f2fe;
|
||||
--color-primary-200: #bae6fd;
|
||||
--color-primary-300: #7ac5e8; /* 主要品牌色 */
|
||||
--color-primary-400: #38bdf8;
|
||||
--color-primary-500: #0ea5e9;
|
||||
--color-primary-600: #0284c7;
|
||||
|
||||
/* 文字颜色 */
|
||||
--color-text-primary: #1e293b; /* 主要文字 */
|
||||
--color-text-secondary: #64748b; /* 次要文字 */
|
||||
--color-text-inverse: #f8fafc; /* 反色文字 */
|
||||
|
||||
/* 背景色 */
|
||||
--color-bg-light: #f8fafc; /* 浅色背景 */
|
||||
--color-bg-dark: #1e293b; /* 深色背景 */
|
||||
--color-bg-blur: rgba(255, 255, 255, 0.85); /* 毛玻璃效果 */
|
||||
|
||||
/* 社交平台品牌色 */
|
||||
--social-qq: #12b7f5;
|
||||
--social-wechat: #07c160;
|
||||
--social-github: #181717;
|
||||
--social-gitea: #609926;
|
||||
--social-steam: #145b8e;
|
||||
--social-email: #d44638;
|
||||
--social-discord: #5865f2;
|
||||
|
||||
/* 状态色 */
|
||||
--color-success: #10b981;
|
||||
--color-warning: #f59e0b;
|
||||
--color-error: #ef4444;
|
||||
--color-info: #3b82f6;
|
||||
|
||||
/* ========== 尺寸变量 ========== */
|
||||
--spacing-xs: 0.25rem; /* 4px */
|
||||
--spacing-sm: 0.5rem; /* 8px */
|
||||
--spacing-md: 1rem; /* 16px */
|
||||
--spacing-lg: 1.5rem; /* 24px */
|
||||
--spacing-xl: 2rem; /* 32px */
|
||||
|
||||
--radius-sm: 0.25rem; /* 4px */
|
||||
--radius-md: 0.5rem; /* 8px */
|
||||
--radius-lg: 1rem; /* 16px */
|
||||
--radius-full: 9999px; /* 圆形 */
|
||||
|
||||
/* ========== 文字变量 ========== */
|
||||
--text-xs: 0.75rem; /* 12px */
|
||||
--text-sm: 0.875rem; /* 14px */
|
||||
--text-base: 1rem; /* 16px */
|
||||
--text-lg: 1.125rem; /* 18px */
|
||||
--text-xl: 1.25rem; /* 20px */
|
||||
--text-2xl: 1.5rem; /* 24px */
|
||||
--text-3xl: 1.875rem; /* 30px */
|
||||
--text-4xl: 2.25rem; /* 36px */
|
||||
--text-5xl: 3rem; /* 48px */
|
||||
|
||||
/* ========== 阴影变量 ========== */
|
||||
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
||||
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
|
||||
0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
||||
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
|
||||
0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
||||
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
|
||||
0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
||||
|
||||
/* ========== 动效变量 ========== */
|
||||
--transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
||||
--transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
|
||||
--transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
|
||||
|
||||
/* ========== 层级管理 ========== */
|
||||
--z-index-particle: 0;
|
||||
--z-index-background: 1;
|
||||
--z-index-content: 10;
|
||||
--z-index-social: 20;
|
||||
--z-index-header: 30;
|
||||
--z-index-modal: 100;
|
||||
--z-index-toast: 200;
|
||||
|
||||
/* ========== 响应式断点 ========== */
|
||||
--screen-xs: 480px;
|
||||
--screen-sm: 640px;
|
||||
--screen-md: 768px;
|
||||
--screen-lg: 1024px;
|
||||
--screen-xl: 1280px;
|
||||
--screen-2xl: 1536px;
|
||||
}
|
||||
|
||||
/* ========== 暗黑模式变量 ========== */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--color-text-primary: #f8fafc;
|
||||
--color-text-secondary: #94a3b8;
|
||||
--color-bg-light: #1e293b;
|
||||
--color-bg-dark: #0f172a;
|
||||
--color-bg-blur: rgba(15, 23, 42, 0.85);
|
||||
|
||||
--shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.5);
|
||||
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6),
|
||||
0 2px 4px -1px rgba(0, 0, 0, 0.4);
|
||||
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7),
|
||||
0 4px 6px -2px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user