chore: remove temporary files
This commit is contained in:
-128
@@ -1,128 +0,0 @@
|
||||
import fs from 'fs/promises';
|
||||
import path from 'path';
|
||||
|
||||
async function walk(dir) {
|
||||
const files = await fs.readdir(dir, { withFileTypes: true });
|
||||
let results = [];
|
||||
for (const file of files) {
|
||||
const res = path.resolve(dir, file.name);
|
||||
if (file.isDirectory()) {
|
||||
results = results.concat(await walk(res));
|
||||
} else if (file.name.endsWith('.vue')) {
|
||||
results.push(res);
|
||||
}
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
async function fixColors() {
|
||||
const dirs = [path.resolve('app', 'components'), path.resolve('app', 'pages'), path.resolve('app', 'layouts')];
|
||||
let files = [];
|
||||
for (const dir of dirs) {
|
||||
try {
|
||||
files = files.concat(await walk(dir));
|
||||
} catch (e) {
|
||||
// Ignore if dir doesn't exist
|
||||
}
|
||||
}
|
||||
|
||||
for (const file of files) {
|
||||
let content = await fs.readFile(file, 'utf-8');
|
||||
let original = content;
|
||||
|
||||
// Generic regex for hardcoded grayscales in styles
|
||||
const grayscales = {
|
||||
'#000000': 'var(--bg-primary, #111111)',
|
||||
'#000': 'var(--bg-primary, #111111)',
|
||||
'#111111': 'var(--bg-primary, #111111)',
|
||||
'#111': 'var(--bg-primary, #111111)',
|
||||
'#1a1a1a': 'var(--bg-secondary, #1a1a1a)',
|
||||
'#222222': 'var(--bg-tertiary, #222222)',
|
||||
'#222': 'var(--bg-tertiary, #222222)',
|
||||
'#2a2a2a': 'var(--bg-tertiary, #2a2a2a)',
|
||||
'#333333': 'var(--bg-quaternary, #333333)',
|
||||
'#333': 'var(--bg-quaternary, #333333)',
|
||||
'#3a3a3a': 'var(--bg-quaternary, #3a3a3a)',
|
||||
'#444444': 'var(--text-disabled, #444444)',
|
||||
'#444': 'var(--text-disabled, #444444)',
|
||||
'#666666': 'var(--text-quaternary, #666666)',
|
||||
'#666': 'var(--text-quaternary, #666666)',
|
||||
'#888888': 'var(--text-tertiary, #888888)',
|
||||
'#888': 'var(--text-tertiary, #888888)',
|
||||
'#999999': 'var(--text-tertiary, #999999)',
|
||||
'#999': 'var(--text-tertiary, #999999)',
|
||||
'#aaaaaa': 'var(--text-secondary, #aaaaaa)',
|
||||
'#aaa': 'var(--text-secondary, #aaaaaa)',
|
||||
'#cccccc': 'var(--text-secondary, #cccccc)',
|
||||
'#ccc': 'var(--text-secondary, #cccccc)',
|
||||
'#dddddd': 'var(--border-secondary, #dddddd)',
|
||||
'#ddd': 'var(--border-secondary, #dddddd)',
|
||||
'#eeeeee': 'var(--border-primary, #eeeeee)',
|
||||
'#eee': 'var(--border-primary, #eeeeee)',
|
||||
'#ffffff': 'var(--text-primary, #ffffff)',
|
||||
'#fff': 'var(--text-primary, #ffffff)'
|
||||
};
|
||||
|
||||
// We only want to replace inside <style> blocks.
|
||||
const styleBlocks = content.match(/<style[^>]*>[\s\S]*?<\/style>/gi);
|
||||
if (styleBlocks) {
|
||||
for (const block of styleBlocks) {
|
||||
let newBlock = block;
|
||||
|
||||
// Match CSS properties like background: #1a1a1a;
|
||||
newBlock = newBlock.replace(/(background(-color)?|color|border(-color)?|border-(top|right|bottom|left)(-color)?|fill|stroke):\s*([^;}]*?)(#[0-9a-fA-F]{3,6})/gi, (match, p1, p2, p3, p4, p5, p6, hex) => {
|
||||
const hexLower = hex.toLowerCase();
|
||||
|
||||
// Don't replace if it's already inside a var()
|
||||
if (p6.includes('var(')) return match;
|
||||
|
||||
let replacement = hex;
|
||||
|
||||
if (grayscales[hexLower]) {
|
||||
// Determine if it's a background, border, or text color
|
||||
if (p1.startsWith('border')) {
|
||||
replacement = `var(--border-secondary, ${hexLower})`;
|
||||
} else if (p1.startsWith('background')) {
|
||||
if (hexLower === '#ffffff' || hexLower === '#fff') {
|
||||
replacement = `var(--card-bg, ${hexLower})`; // White background is usually a card
|
||||
} else {
|
||||
replacement = grayscales[hexLower].replace('text', 'bg'); // Force bg variables for background
|
||||
}
|
||||
} else if (p1 === 'color') {
|
||||
if (['#000000', '#000', '#111111', '#111', '#1a1a1a', '#222222', '#222', '#2a2a2a'].includes(hexLower)) {
|
||||
replacement = `var(--text-primary, ${hexLower})`;
|
||||
} else {
|
||||
replacement = grayscales[hexLower].replace('bg', 'text'); // Force text variables for color
|
||||
}
|
||||
} else {
|
||||
replacement = grayscales[hexLower];
|
||||
}
|
||||
} else {
|
||||
// Heuristic for unknown grayscales or dark colors
|
||||
// Check if it's a dark shade (e.g. #040e15, #242f38)
|
||||
if (p1.startsWith('background') && match.match(/#0[0-9a-f]{5}/i)) {
|
||||
replacement = `var(--bg-secondary, ${hexLower})`;
|
||||
} else if (p1.startsWith('background') && match.match(/#1[0-9a-f]{5}/i)) {
|
||||
replacement = `var(--bg-secondary, ${hexLower})`;
|
||||
} else if (p1.startsWith('background') && match.match(/#2[0-9a-f]{5}/i)) {
|
||||
replacement = `var(--bg-tertiary, ${hexLower})`;
|
||||
} else if (p1.startsWith('border') && match.match(/#[1-4][0-9a-f]{5}/i)) {
|
||||
replacement = `var(--border-secondary, ${hexLower})`;
|
||||
}
|
||||
}
|
||||
|
||||
return `${p1}: ${p6}${replacement}`;
|
||||
});
|
||||
|
||||
content = content.replace(block, newBlock);
|
||||
}
|
||||
}
|
||||
|
||||
if (content !== original) {
|
||||
await fs.writeFile(file, content, 'utf-8');
|
||||
console.log('Fixed', file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fixColors().catch(console.error);
|
||||
-3661
File diff suppressed because it is too large
Load Diff
@@ -1,447 +0,0 @@
|
||||
import wasm from 'vite-plugin-wasm'
|
||||
import glsl from 'vite-plugin-glsl'
|
||||
import { fileURLToPath } from 'url'
|
||||
import { index, uniqueIndex } from 'drizzle-orm'
|
||||
|
||||
const customSeoConfig: Record<string, unknown> | null = (() => {
|
||||
const raw = process.env.NUXT_PUBLIC_SEO_CONFIG
|
||||
if (!raw) return null
|
||||
try {
|
||||
const parsed = JSON.parse(raw)
|
||||
if (parsed && typeof parsed === 'object') return parsed as Record<string, unknown>
|
||||
return null
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
})()
|
||||
|
||||
function readNumberEnv(name: string, defaultValue: number): number {
|
||||
const raw = process.env[name]
|
||||
if (raw === undefined || raw === '') return defaultValue
|
||||
const num = Number(raw)
|
||||
return Number.isFinite(num) ? num : defaultValue
|
||||
}
|
||||
|
||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: '2026-01-30',
|
||||
future: {
|
||||
compatibilityVersion: 4
|
||||
},
|
||||
srcDir: 'app',
|
||||
serverDir: fileURLToPath(new URL('./server', import.meta.url)),
|
||||
dir: {
|
||||
public: fileURLToPath(new URL('./public', import.meta.url))
|
||||
},
|
||||
devtools: { enabled: process.env.NODE_ENV === 'development' },
|
||||
devServer: {
|
||||
host: '0.0.0.0',
|
||||
port: 3000
|
||||
},
|
||||
modules: [
|
||||
'@nuxtjs/tailwindcss',
|
||||
...((process.env.NODE_ENV === 'development' || process.env.npm_lifecycle_event?.includes('lint'))
|
||||
? ['@nuxt/eslint']
|
||||
: []),
|
||||
...((process.env.PWA_ENABLED || 'false') === 'true'
|
||||
? ['@vite-pwa/nuxt']
|
||||
: [])
|
||||
],
|
||||
|
||||
pwa: (process.env.PWA_ENABLED || 'false') === 'true'
|
||||
? {
|
||||
registerType: 'autoUpdate',
|
||||
manifest: {
|
||||
name: process.env.NUXT_PUBLIC_SITE_TITLE || '鏍″洯骞挎挱绔欑偣姝岀郴缁?,
|
||||
short_name: process.env.NUXT_PUBLIC_SITE_TITLE || 'VoiceHub',
|
||||
description: process.env.NUXT_PUBLIC_SITE_DESCRIPTION || '鏍″洯骞挎挱绔欑偣姝岀郴缁?,
|
||||
display: (process.env.PWA_DISPLAY as any) || 'standalone',
|
||||
background_color: process.env.PWA_BACKGROUND_COLOR || '#000000',
|
||||
theme_color: process.env.PWA_THEME_COLOR || '#111111',
|
||||
icons: [
|
||||
{
|
||||
src: '/images/logo.png',
|
||||
sizes: '192x192',
|
||||
type: 'image/png'
|
||||
},
|
||||
{
|
||||
src: '/images/logo.png',
|
||||
sizes: '512x512',
|
||||
type: 'image/png'
|
||||
}
|
||||
]
|
||||
},
|
||||
workbox: {
|
||||
navigateFallback: '/',
|
||||
globPatterns: ['**/*.{js,css,html,png,jpg,jpeg,svg,ico,webp,woff2}']
|
||||
},
|
||||
client: {
|
||||
installPrompt: true,
|
||||
periodicSyncForUpdates: 3600
|
||||
},
|
||||
devOptions: {
|
||||
enabled: process.env.NODE_ENV === 'development'
|
||||
}
|
||||
}
|
||||
: {},
|
||||
|
||||
// 寮曞叆鍏ㄥ眬CSS
|
||||
css: [
|
||||
'~/assets/css/variables.css',
|
||||
'~/assets/css/components.css',
|
||||
'~/assets/css/main.css',
|
||||
'~/assets/css/transitions.css',
|
||||
'~/assets/css/mobile-admin.css',
|
||||
'~/assets/css/print-fix.css',
|
||||
'~/assets/css/sf-pro-icons.css'
|
||||
],
|
||||
|
||||
build: {
|
||||
transpile: []
|
||||
},
|
||||
|
||||
// 瀹為獙鎬т紭鍖栧姛鑳? experimental: {
|
||||
payloadExtraction: true,
|
||||
renderJsonPayloads: true,
|
||||
viewTransition: true
|
||||
},
|
||||
|
||||
// 閰嶇疆杩愯鏃堕厤缃? runtimeConfig: {
|
||||
// 鏈嶅姟鍣ㄧ鏈夐敭锛堜笉浼氭毚闇插埌瀹㈡埛绔級
|
||||
jwtSecret: process.env.JWT_SECRET || 'your-secret-key',
|
||||
// Redis閰嶇疆锛堝彲閫夛級
|
||||
redisUrl: process.env.REDIS_URL || '',
|
||||
redisKeyPrefix: process.env.REDIS_KEY_PREFIX || '',
|
||||
// Sentry 鏈嶅姟绔厤缃紙涓嶄細鏆撮湶鍒板鎴风锛? sentry: {
|
||||
serverDsn: process.env.SENTRY_SERVER_DSN || process.env.SENTRY_DSN || '',
|
||||
dsn: process.env.SENTRY_DSN || '',
|
||||
errorSampleRate: readNumberEnv('SENTRY_ERROR_SAMPLE_RATE', 1.0),
|
||||
tracesSampleRate: readNumberEnv('SENTRY_TRACES_SAMPLE_RATE', 1.0),
|
||||
replaySessionSampleRate: readNumberEnv('SENTRY_REPLAY_SESSION_SAMPLE_RATE', 0),
|
||||
replayOnErrorSampleRate: readNumberEnv('SENTRY_REPLAY_ON_ERROR_SAMPLE_RATE', 0),
|
||||
release: process.env.SENTRY_RELEASE || '',
|
||||
environment: process.env.SENTRY_ENVIRONMENT || process.env.NODE_ENV || 'production'
|
||||
},
|
||||
// 鍏叡閿紙浼氭毚闇插埌瀹㈡埛绔級
|
||||
public: {
|
||||
host: process.env.NUXT_PUBLIC_HOST || '',
|
||||
apiBase: '/api',
|
||||
oauth: {
|
||||
github: !!process.env.GITHUB_CLIENT_ID,
|
||||
casdoor: !!process.env.CASDOOR_CLIENT_ID,
|
||||
google: !!process.env.GOOGLE_CLIENT_ID,
|
||||
aggregate: !!process.env.AGGREGATE_OAUTH_APP_ID
|
||||
},
|
||||
siteTitle: process.env.NUXT_PUBLIC_SITE_TITLE || '鏍″洯骞挎挱绔欑偣姝岀郴缁?,
|
||||
siteLogo: process.env.NUXT_PUBLIC_SITE_LOGO || '',
|
||||
siteDescription:
|
||||
process.env.NUXT_PUBLIC_SITE_DESCRIPTION || '鏍″洯骞挎挱绔欑偣姝岀郴缁?- 璁╀綘鐨勫0闊宠鍚',
|
||||
isNetlify: process.env.NETLIFY === 'true',
|
||||
// SEO 鑷畾涔夐厤缃紙閫氳繃 NUXT_PUBLIC_SEO_CONFIG 娉ㄥ叆 JSON 瀛楃涓诧級
|
||||
seoConfig: customSeoConfig ?? {},
|
||||
// 鍥惧舰楠岃瘉鐮佺浉鍏? captcha: {
|
||||
enabled: (process.env.CAPTCHA_ENABLED || 'false') === 'true',
|
||||
provider: process.env.CAPTCHA_PROVIDER || 'turnstile',
|
||||
siteKey: process.env.CAPTCHA_SITE_KEY || ''
|
||||
},
|
||||
// PWA 鐩稿叧缁撴瀯锛堟湰鍦颁笉鍚敤妯″潡锛屼絾淇濈暀閰嶇疆椤逛互渚夸笂灞傚簲鐢ㄤ娇鐢級
|
||||
pwa: {
|
||||
enabled: (process.env.PWA_ENABLED || 'false') === 'true',
|
||||
display: process.env.PWA_DISPLAY || 'standalone',
|
||||
backgroundColor: process.env.PWA_BACKGROUND_COLOR || '#000000',
|
||||
themeColor: process.env.PWA_THEME_COLOR || '#111111'
|
||||
},
|
||||
// 涓婚閰嶇疆
|
||||
defaultTheme: process.env.NUXT_PUBLIC_DEFAULT_THEME || 'ClassicLight',
|
||||
enabledThemes: (process.env.NUXT_PUBLIC_ENABLED_THEMES || 'ClassicLight,ModernLight')
|
||||
.split(',')
|
||||
.map((s) => s.trim())
|
||||
.filter(Boolean),
|
||||
// Sentry 瀹㈡埛绔厤缃紙浠呭叕寮€ DSN 涓庨噰鏍风巼锛? sentry: {
|
||||
dsn: process.env.SENTRY_DSN || '',
|
||||
tracesSampleRate: readNumberEnv('SENTRY_TRACES_SAMPLE_RATE', 1.0),
|
||||
replaySessionSampleRate: readNumberEnv('SENTRY_REPLAY_SESSION_SAMPLE_RATE', 0),
|
||||
replayOnErrorSampleRate: readNumberEnv('SENTRY_REPLAY_ON_ERROR_SAMPLE_RATE', 0)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 閰嶇疆鐜鍙橀噺
|
||||
app: {
|
||||
head: {
|
||||
title: process.env.NUXT_PUBLIC_SITE_TITLE || '鏍″洯骞挎挱绔欑偣姝岀郴缁?,
|
||||
htmlAttrs: { lang: 'zh-CN' },
|
||||
meta: [
|
||||
{ charset: 'utf-8' },
|
||||
{
|
||||
name: 'viewport',
|
||||
content:
|
||||
'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover'
|
||||
},
|
||||
{
|
||||
name: 'description',
|
||||
content:
|
||||
process.env.NUXT_PUBLIC_SITE_DESCRIPTION || '鏍″洯骞挎挱绔欑偣姝岀郴缁?- 璁╀綘鐨勫0闊宠鍚'
|
||||
},
|
||||
// 绉诲姩绔紭鍖? { name: 'theme-color', content: '#111111' },
|
||||
{
|
||||
name: 'x-default-theme',
|
||||
content: process.env.NUXT_PUBLIC_DEFAULT_THEME || 'ClassicLight'
|
||||
},
|
||||
{
|
||||
name: 'x-enabled-themes',
|
||||
content: process.env.NUXT_PUBLIC_ENABLED_THEMES || 'ClassicLight,ModernLight'
|
||||
},
|
||||
{ name: 'apple-mobile-web-app-capable', content: 'yes' },
|
||||
{ name: 'apple-mobile-web-app-status-bar-style', content: 'black-translucent' },
|
||||
{ name: 'apple-mobile-web-app-title', content: 'VoiceHub绠$悊' },
|
||||
{ name: 'mobile-web-app-capable', content: 'yes' },
|
||||
{ name: 'format-detection', content: 'telephone=no' }
|
||||
],
|
||||
script: [
|
||||
{
|
||||
type: 'text/javascript',
|
||||
tagPosition: 'head',
|
||||
children: [
|
||||
`(function(){try{`,
|
||||
` var k='voicehub:theme', d=document, r=d.documentElement, s=null, eff=null, def=null, list=[];`,
|
||||
` try{`,
|
||||
` var mt=d.querySelector('meta[name="x-enabled-themes"]');`,
|
||||
` if(mt && mt.content){list=String(mt.content).split(',').map(function(x){return x.replace(/^\\s+|\\s+$/g,'')}).filter(Boolean)}`,
|
||||
` }catch(e){list=[]}`,
|
||||
` try{`,
|
||||
` var md=d.querySelector('meta[name="x-default-theme"]');`,
|
||||
` if(md && md.content){def=md.content}`,
|
||||
` }catch(e){def=null}`,
|
||||
` if(!def){def='ClassicLight'}`,
|
||||
` if(list.length===0){list=['ClassicLight','ModernLight']}`,
|
||||
` function valid(t){`,
|
||||
` if(list.indexOf(t)!==-1){return t}`,
|
||||
` if(list.indexOf(def)!==-1){return def}`,
|
||||
` return list[0]`,
|
||||
` }`,
|
||||
` try{s=localStorage.getItem(k)}catch(e){s=null}`,
|
||||
` if(!s){s=def}`,
|
||||
` else{s=valid(s)}`,
|
||||
` if(typeof s==='string' && (s==='System'||s==='system')){eff=window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light'}`,
|
||||
` else if(typeof s==='string'){eff=s.endsWith('Dark')||s==='dark'?'dark':(s.endsWith('Light')||s==='light'?'light':s)}`,
|
||||
` else{eff='light'}`,
|
||||
` r.setAttribute('data-theme', (typeof s==='string'?s:eff));`,
|
||||
` if(eff==='dark'){r.classList.add('dark'); r.classList.remove('light'); r.style.colorScheme='dark'}`,
|
||||
` else if(eff==='light'){r.classList.add('light'); r.classList.remove('dark'); r.style.colorScheme='light'}`,
|
||||
` else{r.classList.remove('dark','light'); r.style.colorScheme='light dark'}`,
|
||||
` try{`,
|
||||
` var tm=d.querySelector('meta[name="theme-color"]');`,
|
||||
` if(tm){tm.content=(eff==='light'?'#f8fafc':'#111111')}`,
|
||||
` }catch(e){}`,
|
||||
`}catch(e){}})();`
|
||||
].join('')
|
||||
}
|
||||
],
|
||||
link: [
|
||||
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
|
||||
{ rel: 'preload', as: 'image', href: '/images/logo.png' },
|
||||
{ rel: 'preload', as: 'image', href: '/images/site-logo.png' },
|
||||
{ rel: 'preload', as: 'image', href: '/images/school-logo-white.png' },
|
||||
// 浼樺厛鍔犺浇甯歌瀛椾綋锛岀‘淇濋〉闈㈠揩閫熸樉绀? {
|
||||
rel: 'preload',
|
||||
as: 'style',
|
||||
href: 'https://cdn.jsdelivr.net/npm/misans@4.1.0/lib/Normal/MiSans-Regular.min.css'
|
||||
},
|
||||
{
|
||||
rel: 'stylesheet',
|
||||
href: 'https://cdn.jsdelivr.net/npm/misans@4.1.0/lib/Normal/MiSans-Regular.min.css'
|
||||
},
|
||||
// 寤惰繜鍔犺浇鍏朵粬瀛楅噸锛岄伩鍏嶉樆濉為〉闈㈡覆鏌? {
|
||||
rel: 'preload',
|
||||
as: 'style',
|
||||
href: 'https://cdn.jsdelivr.net/npm/misans@4.1.0/lib/Normal/MiSans-Medium.min.css',
|
||||
onload: "this.onload=null;this.rel='stylesheet'"
|
||||
},
|
||||
{
|
||||
rel: 'preload',
|
||||
as: 'style',
|
||||
href: 'https://cdn.jsdelivr.net/npm/misans@4.1.0/lib/Normal/MiSans-Semibold.min.css',
|
||||
onload: "this.onload=null;this.rel='stylesheet'"
|
||||
},
|
||||
{
|
||||
rel: 'preload',
|
||||
as: 'style',
|
||||
href: 'https://cdn.jsdelivr.net/npm/misans@4.1.0/lib/Normal/MiSans-Bold.min.css',
|
||||
onload: "this.onload=null;this.rel='stylesheet'"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
features: {
|
||||
inlineStyles: false
|
||||
},
|
||||
|
||||
// TypeScript閰嶇疆
|
||||
typescript: {
|
||||
strict: true
|
||||
},
|
||||
|
||||
// 鏈嶅姟鍣ㄧ閰嶇疆
|
||||
nitro: {
|
||||
compressPublicAssets: true,
|
||||
preset: process.env.VERCEL
|
||||
? 'vercel'
|
||||
: process.env.NETLIFY
|
||||
? 'netlify'
|
||||
: process.env.NITRO_PRESET || 'node-server',
|
||||
// 澧炲己閿欒澶勭悊鍜岀ǔ瀹氭€? experimental: {
|
||||
wasm: true,
|
||||
asyncContext: true
|
||||
},
|
||||
timing: true,
|
||||
// 澧炲姞璇锋眰瓒呮椂鏃堕棿
|
||||
routeRules: {
|
||||
// 瀹屽叏绂佺敤鎵€鏈堿PI璺敱鐨勭紦瀛橈紝纭繚姣忔閮借姹傛暟鎹簱
|
||||
'/api/**': {
|
||||
headers: {
|
||||
'Cache-Control': 'no-cache, no-store, must-revalidate',
|
||||
Pragma: 'no-cache',
|
||||
Expires: '0',
|
||||
Connection: 'keep-alive'
|
||||
}
|
||||
},
|
||||
// 闈欐€佽祫婧愭枃浠剁紦瀛橀厤缃? '/_nuxt/**': {
|
||||
headers: {
|
||||
'Cache-Control': 'public, max-age=31536000, immutable'
|
||||
}
|
||||
},
|
||||
'/assets/**': {
|
||||
headers: {
|
||||
'Cache-Control': 'public, max-age=31536000, immutable'
|
||||
}
|
||||
},
|
||||
'/favicon.ico': {
|
||||
headers: {
|
||||
'Cache-Control': 'public, max-age=86400'
|
||||
}
|
||||
},
|
||||
// 鍥剧墖銆丆SS銆丣S绛夐潤鎬佽祫婧愮紦瀛? '/**/*.{png,jpg,jpeg,gif,webp,svg,ico}': {
|
||||
headers: {
|
||||
'Cache-Control': 'public, max-age=31536000, immutable'
|
||||
}
|
||||
},
|
||||
'/**/*.{css,js}': {
|
||||
headers: {
|
||||
'Cache-Control': 'public, max-age=31536000, immutable'
|
||||
}
|
||||
},
|
||||
// 璁よ瘉鐩稿叧椤甸潰涓嶇紦瀛? '/login': {
|
||||
headers: {
|
||||
'Cache-Control': 'no-cache, no-store, must-revalidate',
|
||||
Pragma: 'no-cache',
|
||||
Expires: '0'
|
||||
}
|
||||
},
|
||||
'/dashboard': {
|
||||
headers: {
|
||||
'Cache-Control': 'no-cache, no-store, must-revalidate',
|
||||
Pragma: 'no-cache',
|
||||
Expires: '0'
|
||||
}
|
||||
},
|
||||
'/change-password': {
|
||||
headers: {
|
||||
'Cache-Control': 'no-cache, no-store, must-revalidate',
|
||||
Pragma: 'no-cache',
|
||||
Expires: '0'
|
||||
}
|
||||
},
|
||||
'/auth/**': {
|
||||
headers: {
|
||||
'Cache-Control': 'no-cache, no-store, must-revalidate',
|
||||
Pragma: 'no-cache',
|
||||
Expires: '0'
|
||||
}
|
||||
},
|
||||
'/notification-settings': {
|
||||
headers: {
|
||||
'Cache-Control': 'no-cache, no-store, must-revalidate',
|
||||
Pragma: 'no-cache',
|
||||
Expires: '0'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 鏍规嵁閮ㄧ讲鐜璋冩暣閰嶇疆
|
||||
...(process.env.VERCEL
|
||||
? {
|
||||
// Vercel 鐜锛氫娇鐢ㄦ爣鍑嗛厤缃? }
|
||||
: process.env.NETLIFY
|
||||
? {
|
||||
// Netlify 鐜锛氱‘淇?Drizzle 姝g‘鎵撳寘
|
||||
experimental: {
|
||||
wasm: true
|
||||
}
|
||||
}
|
||||
: {
|
||||
// 鍏朵粬鐜锛氫娇鐢ㄦ爣鍑嗛厤缃? })
|
||||
},
|
||||
|
||||
// Vite 閰嶇疆
|
||||
vite: {
|
||||
build: {
|
||||
chunkSizeWarningLimit: 2000,
|
||||
cssCodeSplit: true,
|
||||
rollupOptions: {
|
||||
maxParallelFileOps: 2,
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
if (id.includes('node_modules/lucide-vue-next')) {
|
||||
return 'lucide'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
resolve: {
|
||||
alias: [
|
||||
{
|
||||
find: '@applemusic-like-lyrics/core/style.css',
|
||||
replacement: fileURLToPath(
|
||||
new URL('./vendor/amll-core/src/styles/index.css', import.meta.url)
|
||||
)
|
||||
},
|
||||
{
|
||||
find: '@applemusic-like-lyrics/core',
|
||||
replacement: fileURLToPath(new URL('./vendor/amll-core/src/index.ts', import.meta.url))
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [wasm(), glsl()],
|
||||
optimizeDeps: {
|
||||
include: ['drizzle-orm'],
|
||||
exclude: ['@applemusic-like-lyrics/vue', '@applemusic-like-lyrics/lyric']
|
||||
},
|
||||
build: {
|
||||
sourcemap: false,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
if (!id.includes('node_modules')) return
|
||||
if (id.includes('lucide-vue-next')) return 'icons'
|
||||
if (id.includes('@pixi')) return 'pixi'
|
||||
if (id.includes('@applemusic-like-lyrics')) return 'lyric-engine'
|
||||
if (id.includes('drizzle-orm') || id.includes('postgres')) return 'database'
|
||||
if (id.includes('xlsx') || id.includes('jspdf') || id.includes('jszip')) return 'office'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 娣诲姞 WASM 鏀寔閰嶇疆
|
||||
assetsInclude: ['**/*.wasm'],
|
||||
// SSR閰嶇疆
|
||||
ssr: {
|
||||
noExternal: process.env.NETLIFY
|
||||
? ['drizzle-orm', 'postgres']
|
||||
: process.env.VERCEL
|
||||
? []
|
||||
: ['drizzle-orm', 'postgres']
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -1,433 +0,0 @@
|
||||
import wasm from 'vite-plugin-wasm'
|
||||
import glsl from 'vite-plugin-glsl'
|
||||
import { fileURLToPath } from 'url'
|
||||
import { index, uniqueIndex } from 'drizzle-orm'
|
||||
|
||||
const customSeoConfig: Record<string, unknown> | null = (() => {
|
||||
const raw = process.env.NUXT_PUBLIC_SEO_CONFIG
|
||||
if (!raw) return null
|
||||
try {
|
||||
const parsed = JSON.parse(raw)
|
||||
if (parsed && typeof parsed === 'object') return parsed as Record<string, unknown>
|
||||
return null
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
})()
|
||||
|
||||
function readNumberEnv(name: string, defaultValue: number): number {
|
||||
const raw = process.env[name]
|
||||
if (raw === undefined || raw === '') return defaultValue
|
||||
const num = Number(raw)
|
||||
return Number.isFinite(num) ? num : defaultValue
|
||||
}
|
||||
|
||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: '2026-01-30',
|
||||
future: {
|
||||
compatibilityVersion: 4
|
||||
},
|
||||
srcDir: 'app',
|
||||
serverDir: fileURLToPath(new URL('./server', import.meta.url)),
|
||||
dir: {
|
||||
public: fileURLToPath(new URL('./public', import.meta.url))
|
||||
},
|
||||
devtools: { enabled: process.env.NODE_ENV === 'development' },
|
||||
devServer: {
|
||||
host: '0.0.0.0',
|
||||
port: 3000
|
||||
},
|
||||
modules: [
|
||||
'@nuxtjs/tailwindcss',
|
||||
...((process.env.NODE_ENV === 'development' || process.env.npm_lifecycle_event?.includes('lint'))
|
||||
? ['@nuxt/eslint']
|
||||
: []),
|
||||
...((process.env.PWA_ENABLED || 'false') === 'true'
|
||||
? ['@vite-pwa/nuxt']
|
||||
: [])
|
||||
],
|
||||
|
||||
pwa: (process.env.PWA_ENABLED || 'false') === 'true'
|
||||
? {
|
||||
registerType: 'autoUpdate',
|
||||
manifest: {
|
||||
name: process.env.NUXT_PUBLIC_SITE_TITLE || '鏍″洯骞挎挱绔欑偣姝岀郴缁?,
|
||||
short_name: process.env.NUXT_PUBLIC_SITE_TITLE || 'VoiceHub',
|
||||
description: process.env.NUXT_PUBLIC_SITE_DESCRIPTION || '鏍″洯骞挎挱绔欑偣姝岀郴缁?,
|
||||
display: (process.env.PWA_DISPLAY as any) || 'standalone',
|
||||
background_color: process.env.PWA_BACKGROUND_COLOR || '#000000',
|
||||
theme_color: process.env.PWA_THEME_COLOR || '#111111',
|
||||
icons: [
|
||||
{
|
||||
src: '/images/logo.png',
|
||||
sizes: '192x192',
|
||||
type: 'image/png'
|
||||
},
|
||||
{
|
||||
src: '/images/logo.png',
|
||||
sizes: '512x512',
|
||||
type: 'image/png'
|
||||
}
|
||||
]
|
||||
},
|
||||
workbox: {
|
||||
navigateFallback: '/',
|
||||
globPatterns: ['**/*.{js,css,html,png,jpg,jpeg,svg,ico,webp,woff2}']
|
||||
},
|
||||
client: {
|
||||
installPrompt: true,
|
||||
periodicSyncForUpdates: 3600
|
||||
},
|
||||
devOptions: {
|
||||
enabled: process.env.NODE_ENV === 'development'
|
||||
}
|
||||
}
|
||||
: {},
|
||||
|
||||
// 寮曞叆鍏ㄥ眬CSS
|
||||
css: [
|
||||
'~/assets/css/variables.css',
|
||||
'~/assets/css/components.css',
|
||||
'~/assets/css/main.css',
|
||||
'~/assets/css/transitions.css',
|
||||
'~/assets/css/mobile-admin.css',
|
||||
'~/assets/css/print-fix.css',
|
||||
'~/assets/css/sf-pro-icons.css'
|
||||
],
|
||||
|
||||
build: {
|
||||
transpile: []
|
||||
},
|
||||
|
||||
// 瀹為獙鎬т紭鍖栧姛鑳? experimental: {
|
||||
payloadExtraction: true,
|
||||
renderJsonPayloads: true,
|
||||
viewTransition: true
|
||||
},
|
||||
|
||||
// 閰嶇疆杩愯鏃堕厤缃? runtimeConfig: {
|
||||
// 鏈嶅姟鍣ㄧ鏈夐敭锛堜笉浼氭毚闇插埌瀹㈡埛绔級
|
||||
jwtSecret: process.env.JWT_SECRET || 'your-secret-key',
|
||||
// Redis閰嶇疆锛堝彲閫夛級
|
||||
redisUrl: process.env.REDIS_URL || '',
|
||||
redisKeyPrefix: process.env.REDIS_KEY_PREFIX || '',
|
||||
// Sentry 鏈嶅姟绔厤缃紙涓嶄細鏆撮湶鍒板鎴风锛? sentry: {
|
||||
serverDsn: process.env.SENTRY_SERVER_DSN || process.env.SENTRY_DSN || '',
|
||||
dsn: process.env.SENTRY_DSN || '',
|
||||
errorSampleRate: readNumberEnv('SENTRY_ERROR_SAMPLE_RATE', 1.0),
|
||||
tracesSampleRate: readNumberEnv('SENTRY_TRACES_SAMPLE_RATE', 1.0),
|
||||
replaySessionSampleRate: readNumberEnv('SENTRY_REPLAY_SESSION_SAMPLE_RATE', 0),
|
||||
replayOnErrorSampleRate: readNumberEnv('SENTRY_REPLAY_ON_ERROR_SAMPLE_RATE', 0),
|
||||
release: process.env.SENTRY_RELEASE || '',
|
||||
environment: process.env.SENTRY_ENVIRONMENT || process.env.NODE_ENV || 'production'
|
||||
},
|
||||
// 鍏叡閿紙浼氭毚闇插埌瀹㈡埛绔級
|
||||
public: {
|
||||
host: process.env.NUXT_PUBLIC_HOST || '',
|
||||
apiBase: '/api',
|
||||
oauth: {
|
||||
github: !!process.env.GITHUB_CLIENT_ID,
|
||||
casdoor: !!process.env.CASDOOR_CLIENT_ID,
|
||||
google: !!process.env.GOOGLE_CLIENT_ID,
|
||||
aggregate: !!process.env.AGGREGATE_OAUTH_APP_ID
|
||||
},
|
||||
siteTitle: process.env.NUXT_PUBLIC_SITE_TITLE || '鏍″洯骞挎挱绔欑偣姝岀郴缁?,
|
||||
siteLogo: process.env.NUXT_PUBLIC_SITE_LOGO || '',
|
||||
siteDescription:
|
||||
process.env.NUXT_PUBLIC_SITE_DESCRIPTION || '鏍″洯骞挎挱绔欑偣姝岀郴缁?- 璁╀綘鐨勫0闊宠鍚',
|
||||
isNetlify: process.env.NETLIFY === 'true',
|
||||
// SEO 鑷畾涔夐厤缃紙閫氳繃 NUXT_PUBLIC_SEO_CONFIG 娉ㄥ叆 JSON 瀛楃涓诧級
|
||||
seoConfig: customSeoConfig ?? {},
|
||||
// 鍥惧舰楠岃瘉鐮佺浉鍏? captcha: {
|
||||
enabled: (process.env.CAPTCHA_ENABLED || 'false') === 'true',
|
||||
provider: process.env.CAPTCHA_PROVIDER || 'turnstile',
|
||||
siteKey: process.env.CAPTCHA_SITE_KEY || ''
|
||||
},
|
||||
// PWA 鐩稿叧缁撴瀯锛堟湰鍦颁笉鍚敤妯″潡锛屼絾淇濈暀閰嶇疆椤逛互渚夸笂灞傚簲鐢ㄤ娇鐢級
|
||||
pwa: {
|
||||
enabled: (process.env.PWA_ENABLED || 'false') === 'true',
|
||||
display: process.env.PWA_DISPLAY || 'standalone',
|
||||
backgroundColor: process.env.PWA_BACKGROUND_COLOR || '#000000',
|
||||
themeColor: process.env.PWA_THEME_COLOR || '#111111'
|
||||
},
|
||||
// 涓婚閰嶇疆
|
||||
defaultTheme: process.env.NUXT_PUBLIC_DEFAULT_THEME || 'ClassicLight',
|
||||
enabledThemes: (process.env.NUXT_PUBLIC_ENABLED_THEMES || 'ClassicLight,ModernLight')
|
||||
.split(',')
|
||||
.map((s) => s.trim())
|
||||
.filter(Boolean),
|
||||
// Sentry 瀹㈡埛绔厤缃紙浠呭叕寮€ DSN 涓庨噰鏍风巼锛? sentry: {
|
||||
dsn: process.env.SENTRY_DSN || '',
|
||||
tracesSampleRate: readNumberEnv('SENTRY_TRACES_SAMPLE_RATE', 1.0),
|
||||
replaySessionSampleRate: readNumberEnv('SENTRY_REPLAY_SESSION_SAMPLE_RATE', 0),
|
||||
replayOnErrorSampleRate: readNumberEnv('SENTRY_REPLAY_ON_ERROR_SAMPLE_RATE', 0)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 閰嶇疆鐜鍙橀噺
|
||||
app: {
|
||||
head: {
|
||||
title: process.env.NUXT_PUBLIC_SITE_TITLE || '鏍″洯骞挎挱绔欑偣姝岀郴缁?,
|
||||
htmlAttrs: { lang: 'zh-CN' },
|
||||
meta: [
|
||||
{ charset: 'utf-8' },
|
||||
{
|
||||
name: 'viewport',
|
||||
content:
|
||||
'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover'
|
||||
},
|
||||
{
|
||||
name: 'description',
|
||||
content:
|
||||
process.env.NUXT_PUBLIC_SITE_DESCRIPTION || '鏍″洯骞挎挱绔欑偣姝岀郴缁?- 璁╀綘鐨勫0闊宠鍚'
|
||||
},
|
||||
// 绉诲姩绔紭鍖? { name: 'theme-color', content: '#111111' },
|
||||
{
|
||||
name: 'x-default-theme',
|
||||
content: process.env.NUXT_PUBLIC_DEFAULT_THEME || 'System'
|
||||
},
|
||||
{ name: 'apple-mobile-web-app-capable', content: 'yes' },
|
||||
{ name: 'apple-mobile-web-app-status-bar-style', content: 'black-translucent' },
|
||||
{ name: 'apple-mobile-web-app-title', content: 'VoiceHub绠$悊' },
|
||||
{ name: 'mobile-web-app-capable', content: 'yes' },
|
||||
{ name: 'format-detection', content: 'telephone=no' }
|
||||
],
|
||||
script: [
|
||||
{
|
||||
type: 'text/javascript',
|
||||
tagPosition: 'head',
|
||||
children: [
|
||||
`(function(){try{`,
|
||||
` var k='voicehub:theme', d=document, r=d.documentElement, s=null, eff=null;`,
|
||||
` try{s=localStorage.getItem(k)}catch(e){s=null}`,
|
||||
` if(!s){`,
|
||||
` try{`,
|
||||
` var meta=document.querySelector('meta[name="x-default-theme"]');`,
|
||||
` if(meta && meta.content){s=meta.content}`,
|
||||
` }catch(e){s=null}`,
|
||||
` if(!s){s='System'}`,
|
||||
` }`,
|
||||
` if(s==='System'||s==='system'){eff=window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light'}`,
|
||||
` else if(typeof s==='string'){eff=s.endsWith('Dark')||s==='dark'?'dark':(s.endsWith('Light')||s==='light'?'light':s)}`,
|
||||
` else{eff='dark'}`,
|
||||
` r.setAttribute('data-theme', (typeof s==='string'?s:eff));`,
|
||||
` if(eff==='dark'){r.classList.add('dark'); r.classList.remove('light'); r.style.colorScheme='dark'}`,
|
||||
` else if(eff==='light'){r.classList.add('light'); r.classList.remove('dark'); r.style.colorScheme='light'}`,
|
||||
` else{r.classList.remove('dark','light'); r.style.colorScheme='light dark'}`,
|
||||
` try{`,
|
||||
` var tm=d.querySelector('meta[name="theme-color"]');`,
|
||||
` if(tm){tm.content=(eff==='light'?'#f8fafc':'#111111')}`,
|
||||
` }catch(e){}`,
|
||||
`}catch(e){}})();`
|
||||
].join('')
|
||||
}
|
||||
],
|
||||
link: [
|
||||
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
|
||||
{ rel: 'preload', as: 'image', href: '/images/logo.png' },
|
||||
{ rel: 'preload', as: 'image', href: '/images/site-logo.png' },
|
||||
{ rel: 'preload', as: 'image', href: '/images/school-logo-white.png' },
|
||||
// 浼樺厛鍔犺浇甯歌瀛椾綋锛岀‘淇濋〉闈㈠揩閫熸樉绀? {
|
||||
rel: 'preload',
|
||||
as: 'style',
|
||||
href: 'https://cdn.jsdelivr.net/npm/misans@4.1.0/lib/Normal/MiSans-Regular.min.css'
|
||||
},
|
||||
{
|
||||
rel: 'stylesheet',
|
||||
href: 'https://cdn.jsdelivr.net/npm/misans@4.1.0/lib/Normal/MiSans-Regular.min.css'
|
||||
},
|
||||
// 寤惰繜鍔犺浇鍏朵粬瀛楅噸锛岄伩鍏嶉樆濉為〉闈㈡覆鏌? {
|
||||
rel: 'preload',
|
||||
as: 'style',
|
||||
href: 'https://cdn.jsdelivr.net/npm/misans@4.1.0/lib/Normal/MiSans-Medium.min.css',
|
||||
onload: "this.onload=null;this.rel='stylesheet'"
|
||||
},
|
||||
{
|
||||
rel: 'preload',
|
||||
as: 'style',
|
||||
href: 'https://cdn.jsdelivr.net/npm/misans@4.1.0/lib/Normal/MiSans-Semibold.min.css',
|
||||
onload: "this.onload=null;this.rel='stylesheet'"
|
||||
},
|
||||
{
|
||||
rel: 'preload',
|
||||
as: 'style',
|
||||
href: 'https://cdn.jsdelivr.net/npm/misans@4.1.0/lib/Normal/MiSans-Bold.min.css',
|
||||
onload: "this.onload=null;this.rel='stylesheet'"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
features: {
|
||||
inlineStyles: false
|
||||
},
|
||||
|
||||
// TypeScript閰嶇疆
|
||||
typescript: {
|
||||
strict: true
|
||||
},
|
||||
|
||||
// 鏈嶅姟鍣ㄧ閰嶇疆
|
||||
nitro: {
|
||||
compressPublicAssets: true,
|
||||
preset: process.env.VERCEL
|
||||
? 'vercel'
|
||||
: process.env.NETLIFY
|
||||
? 'netlify'
|
||||
: process.env.NITRO_PRESET || 'node-server',
|
||||
// 澧炲己閿欒澶勭悊鍜岀ǔ瀹氭€? experimental: {
|
||||
wasm: true,
|
||||
asyncContext: true
|
||||
},
|
||||
timing: true,
|
||||
// 澧炲姞璇锋眰瓒呮椂鏃堕棿
|
||||
routeRules: {
|
||||
// 瀹屽叏绂佺敤鎵€鏈堿PI璺敱鐨勭紦瀛橈紝纭繚姣忔閮借姹傛暟鎹簱
|
||||
'/api/**': {
|
||||
headers: {
|
||||
'Cache-Control': 'no-cache, no-store, must-revalidate',
|
||||
Pragma: 'no-cache',
|
||||
Expires: '0',
|
||||
Connection: 'keep-alive'
|
||||
}
|
||||
},
|
||||
// 闈欐€佽祫婧愭枃浠剁紦瀛橀厤缃? '/_nuxt/**': {
|
||||
headers: {
|
||||
'Cache-Control': 'public, max-age=31536000, immutable'
|
||||
}
|
||||
},
|
||||
'/assets/**': {
|
||||
headers: {
|
||||
'Cache-Control': 'public, max-age=31536000, immutable'
|
||||
}
|
||||
},
|
||||
'/favicon.ico': {
|
||||
headers: {
|
||||
'Cache-Control': 'public, max-age=86400'
|
||||
}
|
||||
},
|
||||
// 鍥剧墖銆丆SS銆丣S绛夐潤鎬佽祫婧愮紦瀛? '/**/*.{png,jpg,jpeg,gif,webp,svg,ico}': {
|
||||
headers: {
|
||||
'Cache-Control': 'public, max-age=31536000, immutable'
|
||||
}
|
||||
},
|
||||
'/**/*.{css,js}': {
|
||||
headers: {
|
||||
'Cache-Control': 'public, max-age=31536000, immutable'
|
||||
}
|
||||
},
|
||||
// 璁よ瘉鐩稿叧椤甸潰涓嶇紦瀛? '/login': {
|
||||
headers: {
|
||||
'Cache-Control': 'no-cache, no-store, must-revalidate',
|
||||
Pragma: 'no-cache',
|
||||
Expires: '0'
|
||||
}
|
||||
},
|
||||
'/dashboard': {
|
||||
headers: {
|
||||
'Cache-Control': 'no-cache, no-store, must-revalidate',
|
||||
Pragma: 'no-cache',
|
||||
Expires: '0'
|
||||
}
|
||||
},
|
||||
'/change-password': {
|
||||
headers: {
|
||||
'Cache-Control': 'no-cache, no-store, must-revalidate',
|
||||
Pragma: 'no-cache',
|
||||
Expires: '0'
|
||||
}
|
||||
},
|
||||
'/auth/**': {
|
||||
headers: {
|
||||
'Cache-Control': 'no-cache, no-store, must-revalidate',
|
||||
Pragma: 'no-cache',
|
||||
Expires: '0'
|
||||
}
|
||||
},
|
||||
'/notification-settings': {
|
||||
headers: {
|
||||
'Cache-Control': 'no-cache, no-store, must-revalidate',
|
||||
Pragma: 'no-cache',
|
||||
Expires: '0'
|
||||
}
|
||||
}
|
||||
},
|
||||
// 鏍规嵁閮ㄧ讲鐜璋冩暣閰嶇疆
|
||||
...(process.env.VERCEL
|
||||
? {
|
||||
// Vercel 鐜锛氫娇鐢ㄦ爣鍑嗛厤缃? }
|
||||
: process.env.NETLIFY
|
||||
? {
|
||||
// Netlify 鐜锛氱‘淇?Drizzle 姝g‘鎵撳寘
|
||||
experimental: {
|
||||
wasm: true
|
||||
}
|
||||
}
|
||||
: {
|
||||
// 鍏朵粬鐜锛氫娇鐢ㄦ爣鍑嗛厤缃? })
|
||||
},
|
||||
|
||||
// Vite 閰嶇疆
|
||||
vite: {
|
||||
build: {
|
||||
chunkSizeWarningLimit: 2000,
|
||||
cssCodeSplit: true,
|
||||
rollupOptions: {
|
||||
maxParallelFileOps: 2,
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
if (id.includes('node_modules/lucide-vue-next')) {
|
||||
return 'lucide'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
resolve: {
|
||||
alias: [
|
||||
{
|
||||
find: '@applemusic-like-lyrics/core/style.css',
|
||||
replacement: fileURLToPath(
|
||||
new URL('./vendor/amll-core/src/styles/index.css', import.meta.url)
|
||||
)
|
||||
},
|
||||
{
|
||||
find: '@applemusic-like-lyrics/core',
|
||||
replacement: fileURLToPath(new URL('./vendor/amll-core/src/index.ts', import.meta.url))
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [wasm(), glsl()],
|
||||
optimizeDeps: {
|
||||
include: ['drizzle-orm'],
|
||||
exclude: ['@applemusic-like-lyrics/vue', '@applemusic-like-lyrics/lyric']
|
||||
},
|
||||
build: {
|
||||
sourcemap: false,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
if (!id.includes('node_modules')) return
|
||||
if (id.includes('lucide-vue-next')) return 'icons'
|
||||
if (id.includes('@pixi')) return 'pixi'
|
||||
if (id.includes('@applemusic-like-lyrics')) return 'lyric-engine'
|
||||
if (id.includes('drizzle-orm') || id.includes('postgres')) return 'database'
|
||||
if (id.includes('xlsx') || id.includes('jspdf') || id.includes('jszip')) return 'office'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// 娣诲姞 WASM 鏀寔閰嶇疆
|
||||
assetsInclude: ['**/*.wasm'],
|
||||
// SSR閰嶇疆
|
||||
ssr: {
|
||||
noExternal: process.env.NETLIFY
|
||||
? ['drizzle-orm', 'postgres']
|
||||
: process.env.VERCEL
|
||||
? []
|
||||
: ['drizzle-orm', 'postgres']
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -1,556 +0,0 @@
|
||||
/* 鍏ㄥ眬CSS鍙橀噺 - 缁熶竴閰嶈壊鏂规 */
|
||||
:root {
|
||||
/* 涓昏壊璋?*/
|
||||
--primary: #3b82f6;
|
||||
--primary-hover: #2563eb;
|
||||
--primary-light: rgba(59, 130, 246, 0.1);
|
||||
--primary-border: rgba(59, 130, 246, 0.2);
|
||||
|
||||
/* 鎴愬姛鑹?*/
|
||||
--success: #10b981;
|
||||
--success-hover: #059669;
|
||||
--success-light: rgba(16, 185, 129, 0.1);
|
||||
--success-border: rgba(16, 185, 129, 0.2);
|
||||
|
||||
/* 璀﹀憡鑹?*/
|
||||
--warning: #f59e0b;
|
||||
--warning-hover: #d97706;
|
||||
--warning-light: rgba(245, 158, 11, 0.1);
|
||||
--warning-border: rgba(245, 158, 11, 0.2);
|
||||
|
||||
/* 閿欒鑹?*/
|
||||
--error: #ef4444;
|
||||
--error-hover: #dc2626;
|
||||
--error-light: rgba(239, 68, 68, 0.1);
|
||||
--error-border: rgba(239, 68, 68, 0.2);
|
||||
|
||||
/* 淇℃伅鑹?*/
|
||||
--info: #3b82f6;
|
||||
--info-hover: #2563eb;
|
||||
--info-light: rgba(59, 130, 246, 0.1);
|
||||
--info-border: rgba(59, 130, 246, 0.2);
|
||||
|
||||
/* 鑳屾櫙鑹?*/
|
||||
--bg-primary: #111111;
|
||||
--bg-secondary: #1a1a1a;
|
||||
--bg-tertiary: #2a2a2a;
|
||||
--bg-quaternary: #3a3a3a;
|
||||
--bg-hover: #1f1f1f;
|
||||
|
||||
/* 鏂囧瓧棰滆壊 */
|
||||
--text-primary: #ffffff;
|
||||
--text-secondary: #cccccc;
|
||||
--text-tertiary: #888888;
|
||||
--text-quaternary: #666666;
|
||||
--text-disabled: #444444;
|
||||
|
||||
/* 杈规棰滆壊 */
|
||||
--border-primary: #1f1f1f;
|
||||
--border-secondary: #2a2a2a;
|
||||
--border-tertiary: #3a3a3a;
|
||||
--border-quaternary: #4a4a4a;
|
||||
|
||||
/* 闃村奖 */
|
||||
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
--shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
--shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
|
||||
--shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
|
||||
|
||||
/* 鍦嗚 */
|
||||
--radius-sm: 4px;
|
||||
--radius-md: 6px;
|
||||
--radius-lg: 8px;
|
||||
--radius-xl: 12px;
|
||||
--radius-2xl: 16px;
|
||||
|
||||
/* 闂磋窛 */
|
||||
--spacing-xs: 4px;
|
||||
--spacing-sm: 8px;
|
||||
--spacing-md: 12px;
|
||||
--spacing-lg: 16px;
|
||||
--spacing-xl: 20px;
|
||||
--spacing-2xl: 24px;
|
||||
--spacing-3xl: 32px;
|
||||
|
||||
/* 瀛椾綋澶у皬 */
|
||||
--text-xs: 12px;
|
||||
--text-sm: 14px;
|
||||
--text-base: 16px;
|
||||
--text-lg: 18px;
|
||||
--text-xl: 20px;
|
||||
--text-2xl: 24px;
|
||||
--text-3xl: 30px;
|
||||
|
||||
/* 瀛椾綋绮楃粏 */
|
||||
--font-normal: 400;
|
||||
--font-medium: 500;
|
||||
--font-semibold: 600;
|
||||
--font-bold: 700;
|
||||
|
||||
/* 杩囨浮鍔ㄧ敾 */
|
||||
--transition-fast: 0.15s ease;
|
||||
--transition-normal: 0.2s ease;
|
||||
--transition-slow: 0.3s ease;
|
||||
|
||||
/* Z-index灞傜骇 */
|
||||
--z-dropdown: 100;
|
||||
--z-sticky: 200;
|
||||
--z-fixed: 300;
|
||||
--z-modal-backdrop: 400;
|
||||
--z-modal: 500;
|
||||
--z-popover: 600;
|
||||
--z-tooltip: 700;
|
||||
--z-toast: 800;
|
||||
|
||||
/* 鐗规畩鐘舵€侀鑹?*/
|
||||
--status-pending: #fbbf24;
|
||||
--status-pending-light: rgba(251, 191, 36, 0.1);
|
||||
--status-approved: #10b981;
|
||||
--status-approved-light: rgba(16, 185, 129, 0.1);
|
||||
--status-played: #6b7280;
|
||||
--status-played-light: rgba(107, 114, 128, 0.1);
|
||||
|
||||
/* 鎶曠エ鐩稿叧棰滆壊 */
|
||||
--vote-heart: #ef4444;
|
||||
--vote-heart-hover: #dc2626;
|
||||
--vote-count: var(--text-tertiary);
|
||||
|
||||
/* 鎷栨嫿鐘舵€侀鑹?*/
|
||||
--drag-over: var(--primary-light);
|
||||
--drag-over-border: var(--primary);
|
||||
--dragging-opacity: 0.5;
|
||||
|
||||
/* 琛ㄦ牸棰滆壊 */
|
||||
--table-header-bg: var(--bg-tertiary);
|
||||
--table-row-hover: var(--bg-hover);
|
||||
--table-border: var(--border-secondary);
|
||||
--table-selected: var(--primary-light);
|
||||
|
||||
/* 鍗$墖棰滆壊 */
|
||||
--card-bg: var(--bg-secondary);
|
||||
--card-border: var(--border-secondary);
|
||||
--card-hover-border: var(--border-tertiary);
|
||||
--card-shadow: var(--shadow-md);
|
||||
|
||||
/* 鎸夐挳棰滆壊 */
|
||||
--btn-primary-bg: var(--primary);
|
||||
--btn-primary-hover: var(--primary-hover);
|
||||
--btn-primary-text: var(--text-primary);
|
||||
--btn-primary-border: var(--primary-border);
|
||||
|
||||
--btn-secondary-bg: #3a3a3a;
|
||||
--btn-secondary-hover: #4a4a4a;
|
||||
--btn-secondary-text: var(--text-primary);
|
||||
--btn-secondary-border: #555555;
|
||||
|
||||
--btn-success-bg: var(--success);
|
||||
--btn-success-hover: var(--success-hover);
|
||||
--btn-success-text: var(--text-primary);
|
||||
--btn-success-border: var(--success-border);
|
||||
|
||||
--btn-warning-bg: var(--warning);
|
||||
--btn-warning-hover: var(--warning-hover);
|
||||
--btn-warning-text: var(--text-primary);
|
||||
--btn-warning-border: var(--warning-border);
|
||||
|
||||
--btn-error-bg: var(--error);
|
||||
--btn-error-hover: var(--error-hover);
|
||||
--btn-error-text: var(--text-primary);
|
||||
--btn-error-border: var(--error-border);
|
||||
|
||||
--btn-disabled-bg: var(--bg-tertiary);
|
||||
--btn-disabled-text: var(--text-disabled);
|
||||
|
||||
/* 杈撳叆妗嗛鑹?*/
|
||||
--input-bg: var(--bg-tertiary);
|
||||
--input-border: var(--border-tertiary);
|
||||
--input-border-focus: var(--primary);
|
||||
--input-text: var(--text-primary);
|
||||
--input-placeholder: var(--text-quaternary);
|
||||
--input-shadow-focus: 0 0 0 3px var(--primary-light);
|
||||
|
||||
/* 妯℃€佹棰滆壊 */
|
||||
--modal-backdrop: rgba(0, 0, 0, 0.7);
|
||||
--modal-bg: var(--bg-secondary);
|
||||
--modal-border: var(--border-secondary);
|
||||
--modal-header-border: var(--border-secondary);
|
||||
--modal-footer-border: var(--border-secondary);
|
||||
|
||||
/* 閫氱煡棰滆壊 */
|
||||
--notification-success-bg: var(--success-light);
|
||||
--notification-success-border: var(--success-border);
|
||||
--notification-success-text: var(--success);
|
||||
|
||||
--notification-warning-bg: var(--warning-light);
|
||||
--notification-warning-border: var(--warning-border);
|
||||
--notification-warning-text: var(--warning);
|
||||
|
||||
--notification-error-bg: var(--error-light);
|
||||
--notification-error-border: var(--error-border);
|
||||
--notification-error-text: var(--error);
|
||||
|
||||
--notification-info-bg: var(--info-light);
|
||||
--notification-info-border: var(--info-border);
|
||||
--notification-info-text: var(--info);
|
||||
|
||||
/* 鍔犺浇鍔ㄧ敾棰滆壊 */
|
||||
--spinner-primary: var(--primary);
|
||||
--spinner-secondary: var(--bg-tertiary);
|
||||
|
||||
/* 婊氬姩鏉¢鑹?*/
|
||||
--scrollbar-track: var(--bg-tertiary);
|
||||
--scrollbar-thumb: var(--bg-quaternary);
|
||||
--scrollbar-thumb-hover: #4a4a4a;
|
||||
}
|
||||
|
||||
:root[data-theme='light'],
|
||||
:root[data-theme='ClassicLight'],
|
||||
:root[data-theme='ModernLight'] {
|
||||
--bg-primary: #f8fafc;
|
||||
--bg-secondary: #f1f5f9;
|
||||
--bg-tertiary: #e2e8f0;
|
||||
--bg-quaternary: #cbd5e1;
|
||||
--bg-hover: #e2e8f0;
|
||||
|
||||
--text-primary: #0f172a;
|
||||
--text-secondary: #334155;
|
||||
--text-tertiary: #475569;
|
||||
--text-quaternary: #64748b;
|
||||
--text-disabled: #94a3b8;
|
||||
|
||||
--border-primary: #e2e8f0;
|
||||
--border-secondary: #cbd5e1;
|
||||
--border-tertiary: #94a3b8;
|
||||
--border-quaternary: #64748b;
|
||||
|
||||
--modal-backdrop: rgba(0, 0, 0, 0.4);
|
||||
--scrollbar-thumb-hover: #94a3b8;
|
||||
|
||||
--btn-secondary-bg: #f1f5f9;
|
||||
--btn-secondary-hover: #e2e8f0;
|
||||
--btn-secondary-text: #0f172a;
|
||||
--btn-secondary-border: #cbd5e1;
|
||||
|
||||
--card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
:root[data-theme='ClassicLight'] {
|
||||
--primary: #1e40af;
|
||||
--primary-hover: #1e3a8a;
|
||||
--primary-light: rgba(30, 64, 175, 0.08);
|
||||
--primary-border: rgba(30, 64, 175, 0.15);
|
||||
|
||||
--bg-primary: #ffffff;
|
||||
--bg-secondary: #f5f7fa;
|
||||
--bg-tertiary: #edf0f5;
|
||||
--bg-quaternary: #d9dee7;
|
||||
--bg-hover: #f0f3f8;
|
||||
|
||||
--success: #059669;
|
||||
--success-hover: #047857;
|
||||
--success-light: rgba(5, 150, 105, 0.08);
|
||||
--success-border: rgba(5, 150, 105, 0.15);
|
||||
|
||||
--warning: #d97706;
|
||||
--warning-hover: #b45309;
|
||||
--warning-light: rgba(217, 119, 6, 0.08);
|
||||
--warning-border: rgba(217, 119, 6, 0.15);
|
||||
|
||||
--error: #dc2626;
|
||||
--error-hover: #b91c1c;
|
||||
--error-light: rgba(220, 38, 38, 0.08);
|
||||
--error-border: rgba(220, 38, 38, 0.15);
|
||||
|
||||
--info: #2563eb;
|
||||
--info-hover: #1d4ed8;
|
||||
--info-light: rgba(37, 99, 235, 0.08);
|
||||
--info-border: rgba(37, 99, 235, 0.15);
|
||||
|
||||
--text-primary: #1a2332;
|
||||
--text-secondary: #4a5568;
|
||||
--text-tertiary: #6b7280;
|
||||
--text-quaternary: #9ca3af;
|
||||
--text-disabled: #c5cbd3;
|
||||
|
||||
--border-primary: #e5e7eb;
|
||||
--border-secondary: #d1d5db;
|
||||
--border-tertiary: #9ca3af;
|
||||
--border-quaternary: #6b7280;
|
||||
|
||||
--input-bg: #ffffff;
|
||||
--input-border: #d1d5db;
|
||||
--input-border-focus: #1e40af;
|
||||
--input-text: #1a2332;
|
||||
--input-placeholder: #9ca3af;
|
||||
--input-shadow-focus: 0 0 0 3px rgba(30, 64, 175, 0.1);
|
||||
|
||||
--card-bg: #ffffff;
|
||||
--card-border: #e5e7eb;
|
||||
--card-hover-border: #d1d5db;
|
||||
|
||||
--table-header-bg: #f5f7fa;
|
||||
--table-row-hover: #f9fafb;
|
||||
--table-border: #e5e7eb;
|
||||
--table-selected: rgba(30, 64, 175, 0.06);
|
||||
|
||||
--scrollbar-track: #f1f5f9;
|
||||
--scrollbar-thumb: #cbd5e1;
|
||||
--scrollbar-thumb-hover: #94a3b8;
|
||||
|
||||
--status-pending: #ca8a04;
|
||||
--status-pending-light: rgba(202, 138, 4, 0.08);
|
||||
--status-approved: #059669;
|
||||
--status-approved-light: rgba(5, 150, 105, 0.08);
|
||||
--status-played: #6b7280;
|
||||
--status-played-light: rgba(107, 114, 128, 0.08);
|
||||
|
||||
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
|
||||
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
|
||||
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
|
||||
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
|
||||
|
||||
--radius-sm: 3px;
|
||||
--radius-md: 5px;
|
||||
--radius-lg: 6px;
|
||||
--radius-xl: 8px;
|
||||
--radius-2xl: 10px;
|
||||
}
|
||||
|
||||
:root[data-theme='ModernLight'] {
|
||||
--primary: #4f46e5;
|
||||
--primary-hover: #4338ca;
|
||||
--primary-light: rgba(79, 70, 229, 0.1);
|
||||
--primary-border: rgba(79, 70, 229, 0.2);
|
||||
|
||||
--bg-primary: #fafafa;
|
||||
--bg-secondary: #f4f4f5;
|
||||
--bg-tertiary: #e4e4e7;
|
||||
--bg-quaternary: #d4d4d8;
|
||||
--bg-hover: #eeeeef;
|
||||
|
||||
--success: #16a34a;
|
||||
--success-hover: #15803d;
|
||||
--success-light: rgba(22, 163, 74, 0.1);
|
||||
--success-border: rgba(22, 163, 74, 0.2);
|
||||
|
||||
--warning: #ea580c;
|
||||
--warning-hover: #c2410c;
|
||||
--warning-light: rgba(234, 88, 12, 0.1);
|
||||
--warning-border: rgba(234, 88, 12, 0.2);
|
||||
|
||||
--error: #e11d48;
|
||||
--error-hover: #be123c;
|
||||
--error-light: rgba(225, 29, 72, 0.1);
|
||||
--error-border: rgba(225, 29, 72, 0.2);
|
||||
|
||||
--info: #0ea5e9;
|
||||
--info-hover: #0284c7;
|
||||
--info-light: rgba(14, 165, 233, 0.1);
|
||||
--info-border: rgba(14, 165, 233, 0.2);
|
||||
|
||||
--text-primary: #09090b;
|
||||
--text-secondary: #3f3f46;
|
||||
--text-tertiary: #71717a;
|
||||
--text-quaternary: #a1a1aa;
|
||||
--text-disabled: #d4d4d8;
|
||||
|
||||
--border-primary: #e4e4e7;
|
||||
--border-secondary: #d4d4d8;
|
||||
--border-tertiary: #a1a1aa;
|
||||
--border-quaternary: #71717a;
|
||||
|
||||
--input-bg: #ffffff;
|
||||
--input-border: #e4e4e7;
|
||||
--input-border-focus: #4f46e5;
|
||||
--input-text: #09090b;
|
||||
--input-placeholder: #a1a1aa;
|
||||
--input-shadow-focus: 0 0 0 3px rgba(79, 70, 229, 0.12);
|
||||
|
||||
--card-bg: #ffffff;
|
||||
--card-border: #e4e4e7;
|
||||
--card-hover-border: #d4d4d8;
|
||||
|
||||
--table-header-bg: #f4f4f5;
|
||||
--table-row-hover: #fafafa;
|
||||
--table-border: #e4e4e7;
|
||||
--table-selected: rgba(79, 70, 229, 0.08);
|
||||
|
||||
--scrollbar-track: #f4f4f5;
|
||||
--scrollbar-thumb: #d4d4d8;
|
||||
--scrollbar-thumb-hover: #a1a1aa;
|
||||
|
||||
--status-pending: #eab308;
|
||||
--status-pending-light: rgba(234, 179, 8, 0.12);
|
||||
--status-approved: #22c55e;
|
||||
--status-approved-light: rgba(34, 197, 94, 0.12);
|
||||
--status-played: #71717a;
|
||||
--status-played-light: rgba(113, 113, 122, 0.12);
|
||||
|
||||
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
|
||||
--shadow-md: 0 2px 8px -2px rgba(0, 0, 0, 0.05), 0 1px 3px 0 rgba(0, 0, 0, 0.03);
|
||||
--shadow-lg: 0 8px 24px -4px rgba(0, 0, 0, 0.06), 0 2px 8px -4px rgba(0, 0, 0, 0.04);
|
||||
--shadow-xl: 0 16px 40px -8px rgba(0, 0, 0, 0.08), 0 4px 16px -8px rgba(0, 0, 0, 0.05);
|
||||
|
||||
--radius-sm: 4px;
|
||||
--radius-md: 6px;
|
||||
--radius-lg: 8px;
|
||||
--radius-xl: 10px;
|
||||
--radius-2xl: 12px;
|
||||
}
|
||||
|
||||
/* 娣辫壊涓婚鐗瑰畾璋冩暣 */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
/* 鍦ㄦ繁鑹叉ā寮忎笅鍙互杩涜寰皟 */
|
||||
}
|
||||
}
|
||||
|
||||
/* 楂樺姣斿害妯″紡鏀寔 */
|
||||
@media (prefers-contrast: high) {
|
||||
:root {
|
||||
--border-primary: #444444;
|
||||
--border-secondary: #555555;
|
||||
--border-tertiary: #666666;
|
||||
--text-tertiary: #aaaaaa;
|
||||
--text-quaternary: #888888;
|
||||
}
|
||||
}
|
||||
|
||||
/* 鍑忓皯鍔ㄧ敾妯″紡鏀寔 */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
:root {
|
||||
--transition-fast: 0s;
|
||||
--transition-normal: 0s;
|
||||
--transition-slow: 0s;
|
||||
}
|
||||
}
|
||||
|
||||
/* 鍏ㄥ眬婊氬姩鏉℃牱寮?*/
|
||||
* {
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar-track {
|
||||
background: var(--scrollbar-track);
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar-thumb {
|
||||
background: var(--scrollbar-thumb);
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--scrollbar-thumb-hover);
|
||||
}
|
||||
|
||||
/* 鍏ㄥ眬閫夋嫨鏂囨湰鏍峰紡 */
|
||||
::selection {
|
||||
background: var(--primary-light);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
/* 鍏ㄥ眬鐒︾偣鏍峰紡 */
|
||||
*:focus {
|
||||
outline: 2px solid var(--primary);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
*:focus:not(:focus-visible) {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* 鍏ㄥ眬绂佺敤鐘舵€佹牱寮?*/
|
||||
*:disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
/* 鍏ㄥ眬閾炬帴鏍峰紡 */
|
||||
a {
|
||||
color: var(--primary);
|
||||
text-decoration: none;
|
||||
transition: color var(--transition-normal);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: var(--primary-hover);
|
||||
}
|
||||
|
||||
/* 鍏ㄥ眬鎸夐挳閲嶇疆 */
|
||||
button {
|
||||
border: none;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
* {
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
button,
|
||||
a,
|
||||
input,
|
||||
textarea {
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
@media (hover: none) and (pointer: coarse) {
|
||||
*:focus {
|
||||
outline: none !important;
|
||||
}
|
||||
button,
|
||||
a {
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* 鍏ㄥ眬杈撳叆妗嗛噸缃?*/
|
||||
input,
|
||||
textarea,
|
||||
select {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
/* 鍏ㄥ眬鍥剧墖鏍峰紡 */
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* 鍏ㄥ眬琛ㄦ牸鏍峰紡 */
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 鍏ㄥ眬浠g爜鏍峰紡 */
|
||||
code,
|
||||
pre {
|
||||
font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
|
||||
background: var(--bg-tertiary);
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
||||
code {
|
||||
padding: 2px 4px;
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: var(--spacing-lg);
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
pre code {
|
||||
padding: 0;
|
||||
background: none;
|
||||
}
|
||||
@@ -1,556 +0,0 @@
|
||||
/* 鍏ㄥ眬CSS鍙橀噺 - 缁熶竴閰嶈壊鏂规 */
|
||||
:root {
|
||||
/* 涓昏壊璋?*/
|
||||
--primary: #3b82f6;
|
||||
--primary-hover: #2563eb;
|
||||
--primary-light: rgba(59, 130, 246, 0.1);
|
||||
--primary-border: rgba(59, 130, 246, 0.2);
|
||||
|
||||
/* 鎴愬姛鑹?*/
|
||||
--success: #10b981;
|
||||
--success-hover: #059669;
|
||||
--success-light: rgba(16, 185, 129, 0.1);
|
||||
--success-border: rgba(16, 185, 129, 0.2);
|
||||
|
||||
/* 璀﹀憡鑹?*/
|
||||
--warning: #f59e0b;
|
||||
--warning-hover: #d97706;
|
||||
--warning-light: rgba(245, 158, 11, 0.1);
|
||||
--warning-border: rgba(245, 158, 11, 0.2);
|
||||
|
||||
/* 閿欒鑹?*/
|
||||
--error: #ef4444;
|
||||
--error-hover: #dc2626;
|
||||
--error-light: rgba(239, 68, 68, 0.1);
|
||||
--error-border: rgba(239, 68, 68, 0.2);
|
||||
|
||||
/* 淇℃伅鑹?*/
|
||||
--info: #3b82f6;
|
||||
--info-hover: #2563eb;
|
||||
--info-light: rgba(59, 130, 246, 0.1);
|
||||
--info-border: rgba(59, 130, 246, 0.2);
|
||||
|
||||
/* 鑳屾櫙鑹?*/
|
||||
--bg-primary: #111111;
|
||||
--bg-secondary: #1a1a1a;
|
||||
--bg-tertiary: #2a2a2a;
|
||||
--bg-quaternary: #3a3a3a;
|
||||
--bg-hover: #1f1f1f;
|
||||
|
||||
/* 鏂囧瓧棰滆壊 */
|
||||
--text-primary: #ffffff;
|
||||
--text-secondary: #cccccc;
|
||||
--text-tertiary: #888888;
|
||||
--text-quaternary: #666666;
|
||||
--text-disabled: #444444;
|
||||
|
||||
/* 杈规棰滆壊 */
|
||||
--border-primary: #1f1f1f;
|
||||
--border-secondary: #2a2a2a;
|
||||
--border-tertiary: #3a3a3a;
|
||||
--border-quaternary: #4a4a4a;
|
||||
|
||||
/* 闃村奖 */
|
||||
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
--shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
--shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
|
||||
--shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
|
||||
|
||||
/* 鍦嗚 */
|
||||
--radius-sm: 4px;
|
||||
--radius-md: 6px;
|
||||
--radius-lg: 8px;
|
||||
--radius-xl: 12px;
|
||||
--radius-2xl: 16px;
|
||||
|
||||
/* 闂磋窛 */
|
||||
--spacing-xs: 4px;
|
||||
--spacing-sm: 8px;
|
||||
--spacing-md: 12px;
|
||||
--spacing-lg: 16px;
|
||||
--spacing-xl: 20px;
|
||||
--spacing-2xl: 24px;
|
||||
--spacing-3xl: 32px;
|
||||
|
||||
/* 瀛椾綋澶у皬 */
|
||||
--text-xs: 12px;
|
||||
--text-sm: 14px;
|
||||
--text-base: 16px;
|
||||
--text-lg: 18px;
|
||||
--text-xl: 20px;
|
||||
--text-2xl: 24px;
|
||||
--text-3xl: 30px;
|
||||
|
||||
/* 瀛椾綋绮楃粏 */
|
||||
--font-normal: 400;
|
||||
--font-medium: 500;
|
||||
--font-semibold: 600;
|
||||
--font-bold: 700;
|
||||
|
||||
/* 杩囨浮鍔ㄧ敾 */
|
||||
--transition-fast: 0.15s ease;
|
||||
--transition-normal: 0.2s ease;
|
||||
--transition-slow: 0.3s ease;
|
||||
|
||||
/* Z-index灞傜骇 */
|
||||
--z-dropdown: 100;
|
||||
--z-sticky: 200;
|
||||
--z-fixed: 300;
|
||||
--z-modal-backdrop: 400;
|
||||
--z-modal: 500;
|
||||
--z-popover: 600;
|
||||
--z-tooltip: 700;
|
||||
--z-toast: 800;
|
||||
|
||||
/* 鐗规畩鐘舵€侀鑹?*/
|
||||
--status-pending: #fbbf24;
|
||||
--status-pending-light: rgba(251, 191, 36, 0.1);
|
||||
--status-approved: #10b981;
|
||||
--status-approved-light: rgba(16, 185, 129, 0.1);
|
||||
--status-played: #6b7280;
|
||||
--status-played-light: rgba(107, 114, 128, 0.1);
|
||||
|
||||
/* 鎶曠エ鐩稿叧棰滆壊 */
|
||||
--vote-heart: #ef4444;
|
||||
--vote-heart-hover: #dc2626;
|
||||
--vote-count: var(--text-tertiary);
|
||||
|
||||
/* 鎷栨嫿鐘舵€侀鑹?*/
|
||||
--drag-over: var(--primary-light);
|
||||
--drag-over-border: var(--primary);
|
||||
--dragging-opacity: 0.5;
|
||||
|
||||
/* 琛ㄦ牸棰滆壊 */
|
||||
--table-header-bg: var(--bg-tertiary);
|
||||
--table-row-hover: var(--bg-hover);
|
||||
--table-border: var(--border-secondary);
|
||||
--table-selected: var(--primary-light);
|
||||
|
||||
/* 鍗$墖棰滆壊 */
|
||||
--card-bg: var(--bg-secondary);
|
||||
--card-border: var(--border-secondary);
|
||||
--card-hover-border: var(--border-tertiary);
|
||||
--card-shadow: var(--shadow-md);
|
||||
|
||||
/* 鎸夐挳棰滆壊 */
|
||||
--btn-primary-bg: var(--primary);
|
||||
--btn-primary-hover: var(--primary-hover);
|
||||
--btn-primary-text: var(--text-primary);
|
||||
--btn-primary-border: var(--primary-border);
|
||||
|
||||
--btn-secondary-bg: #3a3a3a;
|
||||
--btn-secondary-hover: #4a4a4a;
|
||||
--btn-secondary-text: var(--text-primary);
|
||||
--btn-secondary-border: #555555;
|
||||
|
||||
--btn-success-bg: var(--success);
|
||||
--btn-success-hover: var(--success-hover);
|
||||
--btn-success-text: var(--text-primary);
|
||||
--btn-success-border: var(--success-border);
|
||||
|
||||
--btn-warning-bg: var(--warning);
|
||||
--btn-warning-hover: var(--warning-hover);
|
||||
--btn-warning-text: var(--text-primary);
|
||||
--btn-warning-border: var(--warning-border);
|
||||
|
||||
--btn-error-bg: var(--error);
|
||||
--btn-error-hover: var(--error-hover);
|
||||
--btn-error-text: var(--text-primary);
|
||||
--btn-error-border: var(--error-border);
|
||||
|
||||
--btn-disabled-bg: var(--bg-tertiary);
|
||||
--btn-disabled-text: var(--text-disabled);
|
||||
|
||||
/* 杈撳叆妗嗛鑹?*/
|
||||
--input-bg: var(--bg-tertiary);
|
||||
--input-border: var(--border-tertiary);
|
||||
--input-border-focus: var(--primary);
|
||||
--input-text: var(--text-primary);
|
||||
--input-placeholder: var(--text-quaternary);
|
||||
--input-shadow-focus: 0 0 0 3px var(--primary-light);
|
||||
|
||||
/* 妯℃€佹棰滆壊 */
|
||||
--modal-backdrop: rgba(0, 0, 0, 0.7);
|
||||
--modal-bg: var(--bg-secondary);
|
||||
--modal-border: var(--border-secondary);
|
||||
--modal-header-border: var(--border-secondary);
|
||||
--modal-footer-border: var(--border-secondary);
|
||||
|
||||
/* 閫氱煡棰滆壊 */
|
||||
--notification-success-bg: var(--success-light);
|
||||
--notification-success-border: var(--success-border);
|
||||
--notification-success-text: var(--success);
|
||||
|
||||
--notification-warning-bg: var(--warning-light);
|
||||
--notification-warning-border: var(--warning-border);
|
||||
--notification-warning-text: var(--warning);
|
||||
|
||||
--notification-error-bg: var(--error-light);
|
||||
--notification-error-border: var(--error-border);
|
||||
--notification-error-text: var(--error);
|
||||
|
||||
--notification-info-bg: var(--info-light);
|
||||
--notification-info-border: var(--info-border);
|
||||
--notification-info-text: var(--info);
|
||||
|
||||
/* 鍔犺浇鍔ㄧ敾棰滆壊 */
|
||||
--spinner-primary: var(--primary);
|
||||
--spinner-secondary: var(--bg-tertiary);
|
||||
|
||||
/* 婊氬姩鏉¢鑹?*/
|
||||
--scrollbar-track: var(--bg-tertiary);
|
||||
--scrollbar-thumb: var(--bg-quaternary);
|
||||
--scrollbar-thumb-hover: #4a4a4a;
|
||||
}
|
||||
|
||||
:root[data-theme='light'],
|
||||
:root[data-theme='ClassicLight'],
|
||||
:root[data-theme='ModernLight'] {
|
||||
--bg-primary: #f8fafc;
|
||||
--bg-secondary: #f1f5f9;
|
||||
--bg-tertiary: #e2e8f0;
|
||||
--bg-quaternary: #cbd5e1;
|
||||
--bg-hover: #e2e8f0;
|
||||
|
||||
--text-primary: #0f172a;
|
||||
--text-secondary: #334155;
|
||||
--text-tertiary: #475569;
|
||||
--text-quaternary: #64748b;
|
||||
--text-disabled: #94a3b8;
|
||||
|
||||
--border-primary: #e2e8f0;
|
||||
--border-secondary: #cbd5e1;
|
||||
--border-tertiary: #94a3b8;
|
||||
--border-quaternary: #64748b;
|
||||
|
||||
--modal-backdrop: rgba(0, 0, 0, 0.4);
|
||||
--scrollbar-thumb-hover: #94a3b8;
|
||||
|
||||
--btn-secondary-bg: #f1f5f9;
|
||||
--btn-secondary-hover: #e2e8f0;
|
||||
--btn-secondary-text: #0f172a;
|
||||
--btn-secondary-border: #cbd5e1;
|
||||
|
||||
--card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
:root[data-theme='ClassicLight'] {
|
||||
--primary: #1e40af;
|
||||
--primary-hover: #1e3a8a;
|
||||
--primary-light: rgba(30, 64, 175, 0.08);
|
||||
--primary-border: rgba(30, 64, 175, 0.15);
|
||||
|
||||
--bg-primary: #ffffff;
|
||||
--bg-secondary: #f5f7fa;
|
||||
--bg-tertiary: #edf0f5;
|
||||
--bg-quaternary: #d9dee7;
|
||||
--bg-hover: #f0f3f8;
|
||||
|
||||
--success: #059669;
|
||||
--success-hover: #047857;
|
||||
--success-light: rgba(5, 150, 105, 0.08);
|
||||
--success-border: rgba(5, 150, 105, 0.15);
|
||||
|
||||
--warning: #d97706;
|
||||
--warning-hover: #b45309;
|
||||
--warning-light: rgba(217, 119, 6, 0.08);
|
||||
--warning-border: rgba(217, 119, 6, 0.15);
|
||||
|
||||
--error: #dc2626;
|
||||
--error-hover: #b91c1c;
|
||||
--error-light: rgba(220, 38, 38, 0.08);
|
||||
--error-border: rgba(220, 38, 38, 0.15);
|
||||
|
||||
--info: #2563eb;
|
||||
--info-hover: #1d4ed8;
|
||||
--info-light: rgba(37, 99, 235, 0.08);
|
||||
--info-border: rgba(37, 99, 235, 0.15);
|
||||
|
||||
--text-primary: #1a2332;
|
||||
--text-secondary: #4a5568;
|
||||
--text-tertiary: #6b7280;
|
||||
--text-quaternary: #9ca3af;
|
||||
--text-disabled: #c5cbd3;
|
||||
|
||||
--border-primary: #e5e7eb;
|
||||
--border-secondary: #d1d5db;
|
||||
--border-tertiary: #9ca3af;
|
||||
--border-quaternary: #6b7280;
|
||||
|
||||
--input-bg: #ffffff;
|
||||
--input-border: #d1d5db;
|
||||
--input-border-focus: #1e40af;
|
||||
--input-text: #1a2332;
|
||||
--input-placeholder: #9ca3af;
|
||||
--input-shadow-focus: 0 0 0 3px rgba(30, 64, 175, 0.1);
|
||||
|
||||
--card-bg: #ffffff;
|
||||
--card-border: #e5e7eb;
|
||||
--card-hover-border: #d1d5db;
|
||||
|
||||
--table-header-bg: #f5f7fa;
|
||||
--table-row-hover: #f9fafb;
|
||||
--table-border: #e5e7eb;
|
||||
--table-selected: rgba(30, 64, 175, 0.06);
|
||||
|
||||
--scrollbar-track: #f1f5f9;
|
||||
--scrollbar-thumb: #cbd5e1;
|
||||
--scrollbar-thumb-hover: #94a3b8;
|
||||
|
||||
--status-pending: #ca8a04;
|
||||
--status-pending-light: rgba(202, 138, 4, 0.08);
|
||||
--status-approved: #059669;
|
||||
--status-approved-light: rgba(5, 150, 105, 0.08);
|
||||
--status-played: #6b7280;
|
||||
--status-played-light: rgba(107, 114, 128, 0.08);
|
||||
|
||||
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
|
||||
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
|
||||
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
|
||||
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
|
||||
|
||||
--radius-sm: 3px;
|
||||
--radius-md: 5px;
|
||||
--radius-lg: 6px;
|
||||
--radius-xl: 8px;
|
||||
--radius-2xl: 10px;
|
||||
}
|
||||
|
||||
:root[data-theme='ModernLight'] {
|
||||
--primary: #4f46e5;
|
||||
--primary-hover: #4338ca;
|
||||
--primary-light: rgba(79, 70, 229, 0.1);
|
||||
--primary-border: rgba(79, 70, 229, 0.2);
|
||||
|
||||
--bg-primary: #fafafa;
|
||||
--bg-secondary: #f4f4f5;
|
||||
--bg-tertiary: #e4e4e7;
|
||||
--bg-quaternary: #d4d4d8;
|
||||
--bg-hover: #eeeeef;
|
||||
|
||||
--success: #16a34a;
|
||||
--success-hover: #15803d;
|
||||
--success-light: rgba(22, 163, 74, 0.1);
|
||||
--success-border: rgba(22, 163, 74, 0.2);
|
||||
|
||||
--warning: #ea580c;
|
||||
--warning-hover: #c2410c;
|
||||
--warning-light: rgba(234, 88, 12, 0.1);
|
||||
--warning-border: rgba(234, 88, 12, 0.2);
|
||||
|
||||
--error: #e11d48;
|
||||
--error-hover: #be123c;
|
||||
--error-light: rgba(225, 29, 72, 0.1);
|
||||
--error-border: rgba(225, 29, 72, 0.2);
|
||||
|
||||
--info: #0ea5e9;
|
||||
--info-hover: #0284c7;
|
||||
--info-light: rgba(14, 165, 233, 0.1);
|
||||
--info-border: rgba(14, 165, 233, 0.2);
|
||||
|
||||
--text-primary: #09090b;
|
||||
--text-secondary: #3f3f46;
|
||||
--text-tertiary: #71717a;
|
||||
--text-quaternary: #a1a1aa;
|
||||
--text-disabled: #d4d4d8;
|
||||
|
||||
--border-primary: #e4e4e7;
|
||||
--border-secondary: #d4d4d8;
|
||||
--border-tertiary: #a1a1aa;
|
||||
--border-quaternary: #71717a;
|
||||
|
||||
--input-bg: #ffffff;
|
||||
--input-border: #e4e4e7;
|
||||
--input-border-focus: #4f46e5;
|
||||
--input-text: #09090b;
|
||||
--input-placeholder: #a1a1aa;
|
||||
--input-shadow-focus: 0 0 0 3px rgba(79, 70, 229, 0.12);
|
||||
|
||||
--card-bg: #ffffff;
|
||||
--card-border: #e4e4e7;
|
||||
--card-hover-border: #d4d4d8;
|
||||
|
||||
--table-header-bg: #f4f4f5;
|
||||
--table-row-hover: #fafafa;
|
||||
--table-border: #e4e4e7;
|
||||
--table-selected: rgba(79, 70, 229, 0.08);
|
||||
|
||||
--scrollbar-track: #f4f4f5;
|
||||
--scrollbar-thumb: #d4d4d8;
|
||||
--scrollbar-thumb-hover: #a1a1aa;
|
||||
|
||||
--status-pending: #eab308;
|
||||
--status-pending-light: rgba(234, 179, 8, 0.12);
|
||||
--status-approved: #22c55e;
|
||||
--status-approved-light: rgba(34, 197, 94, 0.12);
|
||||
--status-played: #71717a;
|
||||
--status-played-light: rgba(113, 113, 122, 0.12);
|
||||
|
||||
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
|
||||
--shadow-md: 0 2px 8px -2px rgba(0, 0, 0, 0.05), 0 1px 3px 0 rgba(0, 0, 0, 0.03);
|
||||
--shadow-lg: 0 8px 24px -4px rgba(0, 0, 0, 0.06), 0 2px 8px -4px rgba(0, 0, 0, 0.04);
|
||||
--shadow-xl: 0 16px 40px -8px rgba(0, 0, 0, 0.08), 0 4px 16px -8px rgba(0, 0, 0, 0.05);
|
||||
|
||||
--radius-sm: 4px;
|
||||
--radius-md: 6px;
|
||||
--radius-lg: 8px;
|
||||
--radius-xl: 10px;
|
||||
--radius-2xl: 12px;
|
||||
}
|
||||
|
||||
/* 娣辫壊涓婚鐗瑰畾璋冩暣 */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
/* 鍦ㄦ繁鑹叉ā寮忎笅鍙互杩涜寰皟 */
|
||||
}
|
||||
}
|
||||
|
||||
/* 楂樺姣斿害妯″紡鏀寔 */
|
||||
@media (prefers-contrast: high) {
|
||||
:root {
|
||||
--border-primary: #444444;
|
||||
--border-secondary: #555555;
|
||||
--border-tertiary: #666666;
|
||||
--text-tertiary: #aaaaaa;
|
||||
--text-quaternary: #888888;
|
||||
}
|
||||
}
|
||||
|
||||
/* 鍑忓皯鍔ㄧ敾妯″紡鏀寔 */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
:root {
|
||||
--transition-fast: 0s;
|
||||
--transition-normal: 0s;
|
||||
--transition-slow: 0s;
|
||||
}
|
||||
}
|
||||
|
||||
/* 鍏ㄥ眬婊氬姩鏉℃牱寮?*/
|
||||
* {
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar-track {
|
||||
background: var(--scrollbar-track);
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar-thumb {
|
||||
background: var(--scrollbar-thumb);
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
*::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--scrollbar-thumb-hover);
|
||||
}
|
||||
|
||||
/* 鍏ㄥ眬閫夋嫨鏂囨湰鏍峰紡 */
|
||||
::selection {
|
||||
background: var(--primary-light);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
/* 鍏ㄥ眬鐒︾偣鏍峰紡 */
|
||||
*:focus {
|
||||
outline: 2px solid var(--primary);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
*:focus:not(:focus-visible) {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* 鍏ㄥ眬绂佺敤鐘舵€佹牱寮?*/
|
||||
*:disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
/* 鍏ㄥ眬閾炬帴鏍峰紡 */
|
||||
a {
|
||||
color: var(--primary);
|
||||
text-decoration: none;
|
||||
transition: color var(--transition-normal);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: var(--primary-hover);
|
||||
}
|
||||
|
||||
/* 鍏ㄥ眬鎸夐挳閲嶇疆 */
|
||||
button {
|
||||
border: none;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
* {
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
button,
|
||||
a,
|
||||
input,
|
||||
textarea {
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
@media (hover: none) and (pointer: coarse) {
|
||||
*:focus {
|
||||
outline: none !important;
|
||||
}
|
||||
button,
|
||||
a {
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* 鍏ㄥ眬杈撳叆妗嗛噸缃?*/
|
||||
input,
|
||||
textarea,
|
||||
select {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
/* 鍏ㄥ眬鍥剧墖鏍峰紡 */
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* 鍏ㄥ眬琛ㄦ牸鏍峰紡 */
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 鍏ㄥ眬浠g爜鏍峰紡 */
|
||||
code,
|
||||
pre {
|
||||
font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
|
||||
background: var(--bg-tertiary);
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
||||
code {
|
||||
padding: 2px 4px;
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: var(--spacing-lg);
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
pre code {
|
||||
padding: 0;
|
||||
background: none;
|
||||
}
|
||||
Reference in New Issue
Block a user