一分钟搭建影视站,支持Docker等部署方式
style: 暗色主题沿用旧版赛博配色并设为默认,整体调深一档
bestZwei6a7645061eee
diff --git a/src/app/globals.css b/src/app/globals.cssindex 065e8b7..c29c310 100644--- a/src/app/globals.css+++ b/src/app/globals.css@@ -23,18 +23,19 @@}.dark {- --c-page: 17 17 17; /* #111111 旧版页面底色 */- --c-surface: 25 25 25; /* #191919 旧版弹窗/抽屉底色 */- --c-surface-raised: 25 25 25;- --c-card: 30 30 30; /* #1e1e1e */- --c-chip: 34 34 34; /* #222222 旧版卡片/输入框底色 */- --c-hover: 38 38 38; /* #262626 */- --c-line: 48 48 48; /* #303030 */- --c-content: 231 231 231; /* #e7e7e7 */- --c-muted: 155 155 155; /* #9b9b9b */- --c-faint: 122 122 122; /* #7a7a7a */- --c-accent: 37 99 235;- --c-accent-hover: 29 78 216;+ /* 旧版 LibreTV(backup-2025)赛博影视主题(整体调深一档):深蓝黑底 + 霓虹蓝/粉点缀 */+ --c-page: 11 16 26; /* #0b101a 深蓝黑页面底色 */+ --c-surface: 20 28 41; /* #141c29 弹窗/抽屉底色 */+ --c-surface-raised: 20 28 41;+ --c-card: 13 20 31; /* #0d141f 卡片底色 */+ --c-chip: 22 32 46; /* #16202e 卡片/输入框底色 */+ --c-hover: 29 42 61; /* #1d2a3d 悬停态(chip 提亮) */+ --c-line: 34 48 69; /* #223045 边框(近似旧版 rgba(0,204,255,.15) 观感) */+ --c-content: 230 242 255; /* #e6f2ff 蓝白主文本(--text-color) */+ --c-muted: 133 153 178; /* #8599b2 次级文本(--text-muted) */+ --c-faint: 107 127 153; /* #6b7f99 三级文本 */+ --c-accent: 0 184 230; /* #00b8e6 霓虹蓝主色(--primary-color 调深一档) */+ --c-accent-hover: 51 214 255; /* #33d6ff 霓虹蓝浅变体(--primary-light) */color-scheme: dark;}@@ -43,6 +44,11 @@ body {@apply bg-page text-content antialiased;}+/* 暗色主题:模拟旧版 .page-bg 的深蓝黑纵向渐变 */+.dark body {+ background: linear-gradient(180deg, rgb(11 16 26), rgb(20 28 41)) fixed;+}+body {font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC','Hiragino Sans GB', 'Microsoft YaHei', sans-serif;diff --git a/src/app/layout.tsx b/src/app/layout.tsxindex 5180820..cff7280 100644--- a/src/app/layout.tsx+++ b/src/app/layout.tsx@@ -17,7 +17,7 @@ export const metadata: Metadata = {};export const viewport: Viewport = {- themeColor: '#111111',+ themeColor: '#0b101a',width: 'device-width',initialScale: 1,};@@ -30,7 +30,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })<scriptdangerouslySetInnerHTML={{__html:- "(function(){try{var t=localStorage.getItem('libretv-theme')||'system';var d=t==='dark'||(t==='system'&&window.matchMedia('(prefers-color-scheme: dark)').matches);document.documentElement.classList.toggle('dark',d);}catch(e){}})()",+ "(function(){try{var t=localStorage.getItem('libretv-theme')||'dark';var d=t==='dark'||(t==='system'&&window.matchMedia('(prefers-color-scheme: dark)').matches);document.documentElement.classList.toggle('dark',d);}catch(e){}})()",}}/></head>diff --git a/src/app/manifest.ts b/src/app/manifest.tsindex b175529..f460d2d 100644--- a/src/app/manifest.ts+++ b/src/app/manifest.ts@@ -8,7 +8,7 @@ export default function manifest(): MetadataRoute.Manifest {start_url: '/',display: 'standalone',background_color: '#111111',- theme_color: '#111111',+ theme_color: '#0b101a',icons: [{src: '/icons/icon-192.png',diff --git a/src/components/theme.tsx b/src/components/theme.tsxindex f0670a1..bbb9ce6 100644--- a/src/components/theme.tsx+++ b/src/components/theme.tsx@@ -3,7 +3,7 @@import { createContext, useCallback, useContext, useEffect, useState, type ReactNode } from 'react';/**- * 主题上下文:light / dark / system,持久化到 localStorage。+ * 主题上下文:light / dark / system,持久化到 localStorage,默认 dark。* html 上的 .dark 类由 layout 中的内联脚本先行设置(避免首屏闪烁),此处负责后续切换。*/@@ -17,7 +17,7 @@ interface ThemeContextValue {}const ThemeContext = createContext<ThemeContextValue>({- theme: 'system',+ theme: 'dark',resolved: 'dark',setTheme: () => {},});@@ -37,17 +37,17 @@ function apply(choice: ThemeChoice): 'light' | 'dark' {}export function ThemeProvider({ children }: { children: ReactNode }) {- const [theme, setThemeState] = useState<ThemeChoice>('system');+ const [theme, setThemeState] = useState<ThemeChoice>('dark');const [resolved, setResolved] = useState<'light' | 'dark'>('dark');useEffect(() => {- const stored = (localStorage.getItem(STORAGE_KEY) as ThemeChoice | null) || 'system';+ const stored = (localStorage.getItem(STORAGE_KEY) as ThemeChoice | null) || 'dark';setThemeState(stored);setResolved(apply(stored));const media = window.matchMedia('(prefers-color-scheme: dark)');const onChange = () => {- const current = (localStorage.getItem(STORAGE_KEY) as ThemeChoice | null) || 'system';+ const current = (localStorage.getItem(STORAGE_KEY) as ThemeChoice | null) || 'dark';if (current === 'system') {setResolved(apply('system'));}diff --git a/tailwind.config.ts b/tailwind.config.tsindex 44425d8..5981716 100644--- a/tailwind.config.ts+++ b/tailwind.config.ts@@ -2,7 +2,7 @@ import type { Config } from 'tailwindcss';/*** 语义化颜色 token:全部通过 CSS 变量驱动,支持亮暗主题切换。- * 深色主题沿用旧版 LibreTV 配色(#111 页面 / #191919 面板 / #222 卡片 / blue-600 主色)。+ * 深色主题默认启用,沿用旧版 LibreTV(backup-2025)赛博配色并整体调深一档(#0b101a 页面 / #141c29 面板 / #0d141f 卡片 / #00ccff 霓虹蓝主色)。*/const config: Config = {darkMode: 'class',