重构前端:临床仪表盘主题 + AI日报编辑版式

- 全面采用临床数据仪表盘风格:IBM Plex Mono/Sans、teal 主色、无阴影设计
- theme.css 完整重写设计 token,支持亮色/暗色/跟随系统三挡切换
- ThemeControls 简化为图标三键切换组件
- NewsCard 临床风格重排:ALL CAPS 分类标签、INSIGHT 观点块
- NewsReader 精选栏:时间轴布局,蓝点 + 垂直轨道线
- AI日报全新排版:左侧 ARCHIVE 侧边栏 + 主区编辑版式
  - 报头:中文数字日期、星期、PHARMA INTEL tagline
  - 分节:52px teal 编号 + 22px 中文分类 + 英文副标题
  - 内容卡片:圆角12px,teal 标题,chips 行(来源/时间/评分)
  - 页脚统计:STORIES / PROCESSED / SOURCES
- 全响应式:≤900px 平板、≤640px 移动端自适应

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-26 22:18:36 +08:00
parent 264f00c138
commit 1b7210de4f
9 changed files with 1191 additions and 319 deletions

View File

@@ -1,3 +1,49 @@
<template>
<router-view />
<router-view v-slot="{ Component }">
<component
:is="Component"
:theme-mode="themeMode"
:resolved-theme="resolvedTheme"
@set-theme-mode="setThemeMode"
/>
</router-view>
</template>
<script setup>
import { onMounted, onUnmounted, ref, watch } from 'vue'
const STORAGE_KEY = 'theme-mode'
const themeMode = ref(localStorage.getItem(STORAGE_KEY) || 'system')
const resolvedTheme = ref('light')
let mediaQuery
function getSystemTheme() {
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'
}
function applyTheme() {
const nextTheme = themeMode.value === 'system' ? getSystemTheme() : themeMode.value
resolvedTheme.value = nextTheme
document.documentElement.dataset.theme = nextTheme
document.documentElement.style.colorScheme = nextTheme
}
function setThemeMode(mode) {
themeMode.value = mode
}
watch(themeMode, (mode) => {
localStorage.setItem(STORAGE_KEY, mode)
applyTheme()
})
onMounted(() => {
mediaQuery = window.matchMedia('(prefers-color-scheme: dark)')
mediaQuery.addEventListener('change', applyTheme)
applyTheme()
})
onUnmounted(() => {
mediaQuery?.removeEventListener('change', applyTheme)
})
</script>