commit 5d31ee57432bee3aadad8ebfb168360fb3535a32 Author: Nelson <1475262689@qq.com> Date: Wed Aug 12 18:01:17 2026 +0800 feat: 初始化慧遇书院官网一期 diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..256fe01 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,14 @@ +node_modules +.nuxt +.output +.git +.DS_Store +data/db/* +data/media/* +素材库 +docs +*.log +.env* +public/images/hero-bg-v3-master.png +public/images/brand-logo-source.png +public/images/hero-bg-v1.png diff --git a/.env.docker.example b/.env.docker.example new file mode 100644 index 0000000..8db4bb6 --- /dev/null +++ b/.env.docker.example @@ -0,0 +1,9 @@ +NUXT_SESSION_PASSWORD=replace-with-at-least-32-random-characters +NUXT_SESSION_COOKIE_SECURE=false +NUXT_INITIAL_ADMIN_USERNAME=admin +NUXT_INITIAL_ADMIN_PASSWORD=replace-with-a-strong-admin-password +APP_BIND_IP=127.0.0.1 +APP_PORT=3000 +IMAGE_TAG=2026.08.11-1 +SITE_URL=https://example.com +BACKUP_HOST_DIR=./backups diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..d7e783f --- /dev/null +++ b/.env.example @@ -0,0 +1,6 @@ +NUXT_SESSION_PASSWORD=replace-with-at-least-32-random-characters +NUXT_SESSION_COOKIE_SECURE=false +NUXT_DATABASE_PATH=./data/db/huiyu.sqlite +NUXT_INITIAL_ADMIN_USERNAME=admin +NUXT_INITIAL_ADMIN_PASSWORD=replace-before-first-start +NUXT_PUBLIC_SITE_URL=http://localhost:3000 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e4c2a9b --- /dev/null +++ b/.gitignore @@ -0,0 +1,44 @@ +.nuxt/ +.output/ +node_modules/ + +# 本地与生产环境变量(仅提交脱敏模板) +.env +.env.* +!.env.example +!.env.docker.example + +# 日志、测试输出与编辑器文件 +*.log +coverage/ +.idea/ +.vscode/ +*.swp +*.swo + +# 私钥、证书及本地凭据 +*.key +*.pem +*.p12 +*.pfx +*.crt +*.cer +*.kdbx +data/db/*.sqlite* +data/uploads/original/* +data/uploads/derived/* +data/uploads/trash/* +backups/* +!backups/.gitkeep +!data/uploads/**/.gitkeep +npm-debug.log* +.DS_Store + +# 部署不需要的大文件夹 +artifacts/ +素材库/ + +# 设计母版仅本地留档;线上使用 AVIF/WebP 压缩版本 +public/images/hero-bg-v3-master.png +public/images/brand-logo-source.png +public/images/hero-bg-v1.png diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a5361e0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +FROM node:22-bookworm-slim AS build +WORKDIR /app +RUN apt-get update \ + && apt-get install -y --no-install-recommends python3 make g++ \ + && rm -rf /var/lib/apt/lists/* +COPY package.json package-lock.json ./ +RUN npm config set registry https://registry.npmmirror.com \ + && npm config set fetch-retries 5 \ + && npm config set fetch-retry-mintimeout 20000 \ + && npm config set fetch-retry-maxtimeout 120000 \ + && npm ci --legacy-peer-deps +COPY . . +RUN npm run build + +FROM node:22-bookworm-slim AS runtime +RUN apt-get update \ + && apt-get install -y --no-install-recommends openssl \ + && rm -rf /var/lib/apt/lists/* +ENV NODE_ENV=production \ + HOST=0.0.0.0 \ + PORT=3000 +WORKDIR /app +COPY --from=build /app/.output ./.output +COPY --from=build /app/node_modules ./node_modules +COPY --from=build /app/server/database/migrations ./server/database/migrations +RUN mkdir -p /app/data/db /app/data/media /app/data/uploads/original /app/data/uploads/derived /app/data/uploads/trash /app/offsite-backups \ + && chown -R node:node /app +USER node +EXPOSE 3000 +CMD ["node", ".output/server/index.mjs"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..7e61448 --- /dev/null +++ b/README.md @@ -0,0 +1,72 @@ +# 慧愈科技官网一期 + +单体 Nuxt 4 全栈应用:公开官网、结构化内容管理后台、SQLite、服务器本地图片存储。 + +## 一期功能范围 + +- 一屏一屏滚动展示的品牌首页,含公司、卢慧老师、课程产品、官方信息、团队与品牌动态。 +- 卢慧老师、课程列表与详情、动态列表与详情、官方声明、陪伴团队、隐私政策和服务条款独立页面。 +- 后台首页编辑、课程产品/动态声明/团队增删改查、公司主体/人物资料/官方渠道/法律文本配置。 +- 素材中心支持图片像素校验、原图保留、WebP/缩略图生成、来源与授权记录、引用保护和回收站恢复。 +- 草稿与发布版本分离、发布版本记录、审计日志、管理员登录与上传图片校验。 +- 最近 20 个发布版本可恢复为草稿,管理员可在后台修改高强度密码。 +- `sitemap.xml`、`robots.txt`、canonical、Open Graph 和首页组织机构 JSON-LD。 + +## 本机直接运行 + +```bash +npm install --legacy-peer-deps +npm run dev +``` + +后台入口:`/admin/login`。开发环境初始账号为 `admin`,初始密码为 `DevOnly-ChangeMe-2026!`。 + +## Docker 测试环境 + +项目已附带仅供本机测试的 `.env.docker`。启动: + +```bash +docker compose up -d --build +docker compose ps +``` + +本机测试后台账号为 `admin`,密码为 `LocalTest-Huiyu-2026!`。正式部署前必须替换 `.env.docker` 中的两个密码;该文件已被 Git 忽略。 + +```bash +docker compose logs -f web +docker compose down +``` + +数据库和上传图片保存在 Docker 命名卷 `huiyu_official_site_data`,重建容器不会丢失。不要使用 `docker compose down -v`,除非明确需要删除全部业务数据。 + +## 备份 + +容器运行时执行: + +```bash +sh scripts/backup.sh +``` + +脚本使用 SQLite 在线备份 API,同时打包上传素材,加密后写入宿主机 `BACKUP_HOST_DIR`,并立即执行完整性校验。详细操作见 [部署与恢复手册](docs/部署与恢复手册.md)。 + +## 上线前最低检查 + +- 修改会话密钥和后台初始密码。 +- 配置域名、HTTPS 和反向代理。 +- 域名启用 HTTPS 后,把 `NUXT_SESSION_COOKIE_SECURE` 改为 `true`。 +- 配置每日备份及恢复演练。 +- 将 `.env.docker` 仅保存在服务器,不提交版本库。 +- 验证后台发布、图片上传、首页移动端和桌面端展示。 +- 在部署环境设置 `NUXT_PUBLIC_SITE_URL=https://正式域名`,用于 canonical、站点地图和 robots。 + +## 当前演示内容说明 + +数据库首次启动会写入清楚标注的演示课程、动态、声明和团队内容。正式上线前,请在后台逐项替换并由相关负责人核验;公司主体、联系方式、备案号和官方账号默认显示“待后台配置”。 + +需要重新写入完整演示数据时,在 Docker 测试环境启动后执行: + +```bash +ADMIN_PASSWORD='本地后台密码' node scripts/seed-mock-content.mjs +``` + +脚本会通过后台 API 保存草稿并立即发布新版本。数据源在 `content/演示数据/一期官网演示数据.json`,人物资料依据已清洗的百度百科内容整理,其余公司、课程、团队、账号和联系信息均明确属于演示数据。 diff --git a/app/app.vue b/app/app.vue new file mode 100644 index 0000000..250e3e9 --- /dev/null +++ b/app/app.vue @@ -0,0 +1,44 @@ + + + diff --git a/app/assets/css/main.scss b/app/assets/css/main.scss new file mode 100644 index 0000000..c6ddffa --- /dev/null +++ b/app/assets/css/main.scss @@ -0,0 +1,503 @@ +:root { + --ink: #0b3152; + --ink-2: #234d70; + --muted: #667d92; + --line: rgba(36, 77, 112, 0.13); + --mist: #eef3f8; + --paper: #fbfcfd; + --warm: #f6eee5; + --white: #fff; + --shadow: 0 22px 70px rgba(42, 75, 104, 0.12); + --shadow-card: 0 16px 44px rgba(42, 75, 104, 0.1); + --section-space: clamp(104px, 8vw, 120px); + --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", serif; + --sans: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; +} + +* { box-sizing: border-box; } +html { scroll-behavior: smooth; background: var(--paper); } +body { margin: 0; color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.65; background: var(--paper); -webkit-font-smoothing: antialiased; } +body.nav-open { overflow: hidden; } +a { color: inherit; text-decoration: none; } +button, input, textarea { font: inherit; } +button { color: inherit; } +img { max-width: 100%; } +:focus-visible { outline: 3px solid #2f70a6; outline-offset: 4px; } +.skip-link { position: fixed; z-index: 1000; top: 12px; left: 12px; padding: 10px 14px; border-radius: 9px; color: white; background: var(--ink); transform: translateY(-150%); transition: transform .2s ease; } +.skip-link:focus { transform: none; } +.page-progress { position: fixed; z-index: 100; top: 0; left: 0; width: 100%; height: 3px; pointer-events: none; } +.page-progress span { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #6f9dc1, #dcae79, #245a83); transform-origin: left; } +.draft-preview-ribbon { position: fixed; z-index: 90; right: 20px; bottom: 20px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid rgba(35,77,112,.16); border-radius: 14px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); backdrop-filter: blur(16px); } +.draft-preview-ribbon span { color: var(--muted); font-size: 12px; } +.draft-preview-ribbon a { padding: 7px 10px; border-radius: 8px; color: white; background: var(--ink); font-size: 12px; } + +.page-enter-active, .page-leave-active { transition: opacity .28s ease; } +.page-enter-from, .page-leave-to { opacity: 0; } +.eyebrow { margin: 0 0 14px; color: #607b92; font-size: 13px; line-height: 1.4; letter-spacing: .24em; text-transform: uppercase; } +.section-pad { padding: var(--section-space) max(6vw, 32px); } +.section-heading h2 { margin: 0; font: 500 clamp(36px, 4.1vw, 58px)/1.18 var(--serif); letter-spacing: .045em; } +.section-heading > p:last-child { color: var(--muted); font-size: 17px; line-height: 1.9; } +.section-heading.centered { max-width: 780px; margin: 0 auto 56px; text-align: center; } + +.site-header { position: absolute; z-index: 20; top: 0; left: 0; display: grid; grid-template-columns: 250px 1fr 160px; align-items: center; width: 100%; padding: 26px 4.2vw; } +.main-nav { display: flex; justify-content: center; gap: clamp(24px, 3.2vw, 54px); } +.main-nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: #17364e; font-size: 14px; white-space: nowrap; } +.main-nav a::after { position: absolute; right: 50%; bottom: -12px; left: 50%; height: 1px; content: ""; background: var(--ink); transition: .28s ease; } +.main-nav a:hover::after, .main-nav a:focus-visible::after, .main-nav a[aria-current="page"]::after { right: 0; left: 0; } +.header-cta, .primary-button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 11px; overflow: hidden; border-radius: 999px; color: white; background: linear-gradient(135deg, #2b5f8b, #0a3456); box-shadow: 0 12px 28px rgba(10, 52, 86, .2); isolation: isolate; } +.header-cta::before, .primary-button::before { position: absolute; top: -80%; left: -45%; z-index: -1; width: 32%; height: 260%; content: ""; background: linear-gradient(90deg, transparent, rgba(255,255,255,.32), transparent); transform: rotate(20deg) translateX(-260%); transition: transform .65s cubic-bezier(.2,.7,.2,1); } +.header-cta:hover::before, .header-cta:focus-visible::before, .primary-button:hover::before, .primary-button:focus-visible::before { transform: rotate(20deg) translateX(620%); } +.header-cta { min-height: 46px; padding: 0 22px; font-size: 14px; } +.menu-toggle { display: none; border: 0; background: transparent; } + +.hero { --hero-scroll: 0; --pointer-x: 0; --pointer-y: 0; position: relative; min-height: 81svh; overflow: hidden; background: #e8eef3; } +.hero-media { position: absolute; inset: -4%; display: block; } +.hero-media img { width: 100%; height: 100%; max-width: none; object-fit: cover; transform: translate3d(calc(var(--pointer-x) * -12px), calc(var(--hero-scroll) * 36px + var(--pointer-y) * -8px), 0) scale(1.035); transition: transform .18s linear; will-change: transform; } +.hero::after { position: absolute; inset: 0; z-index: 0; content: ""; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 65%, rgba(255,255,255,.28)); } +.hero-copy { position: relative; z-index: 2; width: min(720px, 72vw); padding: clamp(230px, 29vh, 280px) 0 120px 10.5vw; transform: translate3d(0, calc(var(--hero-scroll) * -38px), 0); animation: hero-in 1s cubic-bezier(.2,.7,.2,1) both; will-change: transform; } +.hero-copy h1 { display: flex; flex-direction: column; margin: 0 0 24px; font: 500 clamp(58px, 4.5vw, 74px)/1.08 var(--serif); letter-spacing: .055em; text-shadow: 0 2px 24px rgba(255,255,255,.36); } +.hero-copy h1 span { display: block; animation: title-rise .9s cubic-bezier(.16,.8,.25,1) both; } +.hero-copy h1 span:nth-child(2) { animation-delay: .12s; } +.hero-subtitle { margin: 0 0 38px; color: #244b69; font: 400 clamp(18px, 1.45vw, 24px)/1.75 var(--serif); letter-spacing: .085em; } +.primary-button { min-height: 52px; padding: 0 28px; transition: transform .25s ease, box-shadow .25s ease; } +.primary-button:hover { transform: translateY(-3px); box-shadow: 0 18px 34px rgba(10,52,86,.26); } +.scroll-cue { position: absolute; z-index: 3; bottom: 54px; left: 50%; display: flex; flex-direction: column; align-items: center; gap: 8px; color: rgba(12,49,80,.68); font-size: 11px; letter-spacing: .18em; transform: translateX(-50%); animation: float-cue 2.2s ease-in-out infinite; } +.hero-wave { position: absolute; z-index: 1; right: -5%; bottom: -82px; left: -5%; height: 142px; border-radius: 50% 50% 0 0/100% 100% 0 0; background: var(--paper); } + +.reveal-section { opacity: .68; transform: translateY(24px); transition: opacity .65s ease, transform .65s cubic-bezier(.16,.8,.25,1); } +.reveal-section.visible { opacity: 1; transform: none; } +.reveal-section > * { opacity: .72; transform: translateY(16px); } +.reveal-section.visible > * { animation: section-rise .68s cubic-bezier(.16,.8,.25,1) both; } +.reveal-section.visible > *:nth-child(2) { animation-delay: .07s; } +.reveal-section.visible > *:nth-child(3) { animation-delay: .12s; } +.about.reveal-section { opacity: 1; transform: none; } +.about.reveal-section > * { opacity: 1; transform: none; } +.about { min-height: 100svh; padding-top: 54px; background: var(--paper); } +.about-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 44px; max-width: 1260px; margin: 0 auto; } +.about-visual { min-height: 430px; overflow: hidden; border-radius: 34px; box-shadow: var(--shadow); } +.about-visual img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); transition: transform 1.8s cubic-bezier(.16,.8,.25,1); } +.reveal-section.visible .about-visual img { transform: scale(1.025); } +.metric-grid { display: grid; grid-template-rows: repeat(3, 1fr); gap: 16px; } +.metric-card { display: grid; grid-template-columns: 52px 104px minmax(0, 1fr); grid-template-rows: 1fr 1fr; column-gap: 14px; align-items: center; padding: 24px 28px; border: 1px solid rgba(68,105,133,.11); border-radius: 24px; opacity: .72; background: rgba(239,244,249,.8); box-shadow: 0 14px 34px rgba(62,91,116,.1); transform: translateX(18px); transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease; } +.reveal-section.visible .metric-card { animation: metric-in .75s cubic-bezier(.16,.8,.25,1) both; animation-delay: var(--delay); } +.metric-card:hover { transform: translateX(5px); } +.metric-card svg { grid-row: 1/3; align-self: center; color: #6689a7; } +.metric-card strong { grid-column: 2; grid-row: 1/3; align-self: center; white-space: nowrap; font: 500 27px/1.2 var(--serif); } +.metric-card span { grid-column: 3; grid-row: 1; align-self: end; font-size: 15px; line-height: 1.45; } +.metric-card small { grid-column: 3; grid-row: 2; align-self: start; margin-top: 5px; color: var(--muted); line-height: 1.45; } + +.teacher-section { min-height: 100svh; background: linear-gradient(135deg, #edf3f8, #fff9f4); } +.teacher-card { display: grid; grid-template-columns: minmax(360px, .86fr) minmax(420px, 1.14fr); max-width: 1270px; min-height: 650px; margin: 0 auto; overflow: hidden; border: 1px solid rgba(255,255,255,.8); border-radius: 38px; background: rgba(255,255,255,.72); box-shadow: var(--shadow); clip-path: inset(0 100% 0 0 round 38px); } +.reveal-section.visible .teacher-card { animation: panel-wipe .72s cubic-bezier(.16,.8,.25,1) both; } +.teacher-portrait { position: relative; overflow: hidden; background: linear-gradient(180deg, #dfe9f1, #f8f1eb); } +.teacher-portrait::after { position: absolute; inset: 8% -30% auto 4%; height: 82%; border: 1px solid rgba(255,255,255,.7); border-radius: 50%; content: ""; } +.teacher-portrait img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: center 18%; transform: scale(1.06); transition: transform 1.2s cubic-bezier(.16,.8,.25,1); } +.teacher-card:hover .teacher-portrait img { transform: scale(1.015); } +.teacher-copy { align-self: center; max-width: 680px; padding: 70px clamp(44px, 5vw, 82px); } +.teacher-copy h2 { margin: 0 0 12px; font: 500 clamp(44px, 4.1vw, 58px)/1.18 var(--serif); letter-spacing: .045em; } +.teacher-title { color: #365a77; font: 400 18px/1.7 var(--serif); } +.teacher-summary { max-width: 610px; margin: 26px 0 30px; color: #526e84; font-size: 16px; line-height: 1.95; } +.tag-list { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; } +.tag-list span { padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px; color: #456984; background: rgba(238,244,248,.8); font-size: 13px; } +.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 5px 2px; border-bottom: 1px solid #7892a7; transition: gap .25s ease, color .25s ease; } +.text-link:hover, .text-link:focus-visible { gap: 13px; color: #1d5d8e; } + +.philosophy { min-height: 90svh; } +.philosophy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1260px; margin: 0 auto; } +.philosophy-card { position: relative; min-height: 360px; padding: 46px; overflow: hidden; border-radius: 30px; background-image: linear-gradient(180deg, rgba(246,249,251,.38), rgba(229,237,245,.88)), url('/images/hero-bg-v3.webp'); background-position: center; background-size: 118%; box-shadow: 0 18px 46px rgba(54,84,110,.12); transition: transform .5s cubic-bezier(.16,.8,.25,1), background-size .8s ease, box-shadow .5s ease; } +.philosophy-card:nth-child(2) { background-position: 68% center; } +.philosophy-card:nth-child(3) { background-position: 20% center; } +.philosophy-card:hover { transform: translateY(-10px) rotateX(2deg); background-size: 108%; box-shadow: 0 28px 60px rgba(54,84,110,.18); } +.philosophy-index { position: absolute; top: 34px; right: 38px; color: rgba(11,49,82,.38); font: 500 13px var(--sans); letter-spacing: .18em; } +.philosophy-card h3 { margin: 90px 0 8px; font: 500 42px var(--serif); } +.philosophy-card p { color: #526f86; } + +.products { background: linear-gradient(180deg, #f8fafc, #eef3f7); } +.split-heading { display: flex; align-items: end; justify-content: space-between; max-width: 1260px; margin: 0 auto 56px; } +.split-heading > p { max-width: 470px; margin: 0; } +.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1260px; margin: 0 auto; } +.product-card { display: grid; grid-template-columns: 1fr auto; overflow: hidden; border: 1px solid rgba(36,77,112,.06); border-radius: 26px; background: white; box-shadow: var(--shadow-card); transition: transform .38s cubic-bezier(.16,.8,.25,1), box-shadow .38s ease; } +.product-card:hover { transform: translateY(-9px); box-shadow: 0 28px 56px rgba(52,82,107,.16); } +.product-card img { grid-column: 1/3; width: 100%; height: 240px; object-fit: cover; transition: transform .75s cubic-bezier(.16,.8,.25,1); } +.product-card:hover img { transform: scale(1.045); } +.product-card div { padding: 25px 8px 28px 28px; } +.product-card h3 { margin: 0 0 8px; font: 500 24px var(--serif); } +.product-card p { margin: 0; color: var(--muted); } +.product-card > svg { align-self: center; margin-right: 25px; } + +.official { min-height: 76svh; } +.official-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; max-width: 1260px; margin: 0 auto; } +.official-grid article { min-height: 230px; padding: 36px; border: 1px solid var(--line); border-radius: 26px; background: white; transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease; } +.official-grid article:hover { border-color: rgba(36,77,112,.24); box-shadow: 0 20px 42px rgba(54,84,110,.1); transform: translateY(-6px); } +.official-grid article svg { color: #6e8faa; } +.official-grid h3 { margin: 46px 0 10px; font: 500 23px var(--serif); } +.official-grid p { color: var(--muted); font-size: 14px; } + +.news-section { background: #eef3f7; } +.news-panel { display: grid; grid-template-columns: .9fr 1.1fr; max-width: 1260px; margin: 0 auto; overflow: hidden; border-radius: 34px; background: white; box-shadow: var(--shadow); } +.news-feature { min-height: 430px; padding: 72px 56px; background-image: linear-gradient(120deg, rgba(238,244,249,.9), rgba(255,249,244,.72)), url('/images/hero-bg-v3.webp'); background-size: cover; } +.news-feature h2 { margin: 0 0 24px; font: 500 48px var(--serif); } +.news-feature > p:last-child { max-width: 420px; color: var(--muted); line-height: 1.9; } +.news-list { display: flex; flex-direction: column; justify-content: center; padding: 38px 54px; } +.news-list a { display: grid; grid-template-columns: 1fr auto 20px; gap: 20px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); } +.news-list time { color: #8092a1; font-size: 12px; } + +.site-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; padding: 72px max(6vw, 32px) 26px; background: #e3ebf2; } +.footer-brand p { max-width: 360px; color: var(--muted); line-height: 1.8; } +.footer-contact { display: grid; align-content: center; justify-content: end; } +.footer-contact p { display: flex; align-items: center; gap: 10px; margin: 7px 0; color: #48667e; } +.footer-meta { grid-column: 1/3; display: flex; justify-content: space-between; padding-top: 24px; border-top: 1px solid rgba(44,75,101,.13); color: #667f93; font-size: 13px; } +.footer-meta a { display: inline-flex; align-items: center; min-height: 40px; } +.filing-links { display: inline-flex; align-items: center; gap: 6px; } +.police-filing-link { gap: 5px; } +.disabled-channel { padding: 12px 18px; border: 1px dashed var(--line); border-radius: 999px; color: #7c91a3; cursor: not-allowed; } + +.public-page-shell { min-height: 100svh; background: linear-gradient(180deg, #edf3f8 0, #fbfcfd 420px); } +.public-page-shell > .site-header { position: absolute; } +.public-page-main { min-height: 72svh; padding-top: 112px; } +.listing-hero { max-width: 1260px; margin: 0 auto; padding: 100px 32px 74px; text-align: center; } +.listing-hero h1, .detail-hero h1, .story-page h1, .legal-page h1 { margin: 0 0 20px; font: 500 clamp(48px, 5.2vw, 78px)/1.18 var(--serif); letter-spacing: .07em; } +.listing-hero > p:last-child { max-width: 620px; margin: 0 auto; color: var(--muted); font-size: 17px; line-height: 1.9; } +.listing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1260px; margin: 0 auto; padding: 0 32px 120px; } +.listing-card { overflow: hidden; border-radius: 28px; background: white; box-shadow: var(--shadow); transition: transform .3s ease; } +.listing-card:hover { transform: translateY(-7px); } +.listing-card img { width: 100%; height: 250px; object-fit: cover; } +.listing-card > div { padding: 30px; } +.listing-card small, .article-list time { color: #7890a4; font-size: 12px; letter-spacing: .08em; } +.listing-card h2 { margin: 12px 0; font: 500 27px var(--serif); } +.listing-card p { min-height: 54px; color: var(--muted); line-height: 1.8; } +.listing-card span { display: inline-block; margin-top: 16px; color: #2e638f; font-size: 13px; } +.article-list, .statement-list { max-width: 1080px; margin: 0 auto; padding: 0 32px 120px; } +.article-list > a { display: grid; grid-template-columns: 230px 1fr 30px; gap: 30px; align-items: center; padding: 25px 0; border-bottom: 1px solid var(--line); } +.article-list img { width: 230px; height: 140px; border-radius: 20px; object-fit: cover; } +.article-list h2, .statement-list h2 { margin: 9px 0; font: 500 26px var(--serif); } +.article-list p, .statement-list p { margin: 0; color: var(--muted); line-height: 1.8; } +.statement-list > a { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 34px; border-bottom: 1px solid var(--line); } +.statement-list small, .statement-list time { color: #7c91a3; } +.story-page { max-width: 1060px; margin: 0 auto; padding: 72px 32px 130px; } +.story-page header { text-align: center; } +.story-page header > p { color: var(--muted); } +.story-page header > img { width: 100%; max-height: 530px; margin-top: 48px; border-radius: 34px; object-fit: cover; box-shadow: var(--shadow); } +.story-body { max-width: 760px; margin: 58px auto 0; } +.detail-back { display: inline-flex; margin-bottom: 34px; color: #59758c; font-size: 13px; } +.related-content { max-width: 760px; margin: 90px auto 0; padding-top: 42px; border-top: 1px solid var(--line); } +.related-content h2 { margin: 0 0 20px; font: 500 34px var(--serif); } +.related-content a { display: flex; justify-content: space-between; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); } +.related-content time { color: #7b91a4; font-size: 12px; } +.story-body .lead { margin-bottom: 30px; color: #315a7a; font: 400 22px/1.8 var(--serif); } +.long-copy { color: #516b80; font-size: 16px; line-height: 2.15; white-space: pre-line; } +.story-body .primary-button { min-height: 50px; margin-top: 38px; padding: 0 28px; } +.statement-page { max-width: 900px; } +.statement-page header { padding: 66px 30px; border-radius: 34px; background: rgba(255,255,255,.7); box-shadow: var(--shadow); } +.detail-hero { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; max-width: 1260px; min-height: 620px; margin: 0 auto; padding: 54px 32px 80px; } +.detail-hero > div { padding-left: 5vw; } +.detail-hero > div > p:last-child { max-width: 540px; color: #4d6d87; font: 400 19px/1.8 var(--serif); } +.detail-hero img { justify-self: center; width: min(440px, 100%); height: 540px; border-radius: 220px 220px 30px 30px; object-fit: cover; object-position: top; box-shadow: var(--shadow); } +.detail-content { display: grid; grid-template-columns: 1.4fr .6fr; gap: 80px; max-width: 1120px; margin: 0 auto; padding: 90px 32px; } +.detail-content h2 { font: 500 42px var(--serif); } +.detail-content aside { padding: 34px; border-radius: 26px; background: #edf3f8; } +.detail-content aside h3 { margin: 0 0 20px; font: 500 20px var(--serif); } +.detail-content aside h3:not(:first-child) { margin-top: 34px; } +.detail-content li { margin: 12px 0; color: var(--muted); line-height: 1.7; } +.timeline-section { background: #eef3f7; } +.timeline-list { max-width: 880px; margin: 0 auto; } +.timeline-list article { display: grid; grid-template-columns: 110px 1fr; gap: 28px; padding: 27px 0; border-bottom: 1px solid var(--line); } +.timeline-list time { color: #4f7797; font-size: 22px; } +.timeline-list h3 { margin: 0 0 8px; font: 500 22px var(--serif); } +.timeline-list p { margin: 0; color: var(--muted); } +.authority-links { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 70px 30px; } +.authority-links h2 { margin-right: 30px; font: 500 28px var(--serif); } +.authority-links a { padding: 12px 18px; border: 1px solid var(--line); border-radius: 999px; transition: transform .25s ease, border-color .25s ease, background .25s ease; } +.authority-links a:hover { border-color: #7899b2; background: #f2f6fa; transform: translateY(-2px); } +.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 1100px; margin: 0 auto; padding: 0 32px 120px; } +.team-grid article { display: grid; grid-template-columns: 210px 1fr; gap: 30px; padding: 24px; border-radius: 28px; background: white; box-shadow: var(--shadow); } +.team-grid img { width: 210px; height: 290px; border-radius: 20px; object-fit: cover; object-position: top; } +.team-grid article > div { min-width: 0; } +.team-grid h2, .team-grid h3 { margin: 18px 0 8px; font: 500 28px var(--serif); } +.team-grid h2, .team-grid h3, .team-grid .role { word-break: keep-all; overflow-wrap: normal; } +.team-grid .role { color: #426987; } +.team-grid article > div > p:not(.role) { color: var(--muted); line-height: 1.8; } +.legal-page { max-width: 850px; margin: 0 auto; padding: 110px 32px 160px; } + +.login-page { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100svh; padding: 3.8vw; background: url('/images/hero-bg-v3.webp') center/cover; } +.login-brand { display: flex; flex-direction: column; justify-content: space-between; padding: 8px 5vw 7vh 0; } +.login-brand h1 { margin: 0 0 22px; font: 500 clamp(58px, 5vw, 86px)/1.15 var(--serif); letter-spacing: .08em; } +.login-brand p { color: #4d6d87; font: 400 20px var(--serif); letter-spacing: .08em; } +.login-card { align-self: center; width: min(620px, 100%); padding: clamp(48px, 5vw, 78px); border: 1px solid rgba(255,255,255,.78); border-radius: 34px; background: rgba(255,255,255,.76); box-shadow: 0 28px 80px rgba(58,76,91,.17); backdrop-filter: blur(22px); } +.login-card h2 { margin: 0; font: 500 43px var(--serif); letter-spacing: .08em; } +.login-intro { margin: 14px 0 40px; color: var(--muted); } +.login-card form { display: grid; } +.login-card label { margin: 18px 0 9px; font-weight: 600; } +.field { display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 17px; border: 1px solid #cbd7e1; border-radius: 13px; background: rgba(255,255,255,.78); } +.field:focus-within { border-color: #5d8fbb; box-shadow: 0 0 0 3px rgba(74,127,172,.1); } +.field svg { color: #6d87a0; flex: none; } +.field input { width: 100%; border: 0; outline: 0; background: transparent; } +.field button { display: inline-flex; border: 0; background: transparent; cursor: pointer; } +.form-error { margin: 14px 0 0; color: #a94b43; font-size: 13px; } +.login-submit { display: flex; align-items: center; justify-content: center; gap: 14px; height: 58px; margin-top: 30px; border: 0; border-radius: 13px; color: white; background: linear-gradient(135deg, #326992, #0b3557); box-shadow: 0 14px 28px rgba(19,58,91,.2); cursor: pointer; } +.login-submit:disabled { opacity: .66; cursor: wait; } +.security-note { margin: 28px 0 0; color: #607a90; font-size: 13px; text-align: center; } + +.admin-shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100svh; background: #f3f6f9; } +.admin-sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100svh; padding: 24px 18px; border-right: 1px solid var(--line); background: linear-gradient(180deg, #f9fbfd 60%, #f5eee7); } +.admin-sidebar nav { display: grid; gap: 8px; margin-top: 48px; } +.admin-sidebar nav a, .admin-sidebar > button { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; font-size: 14px; } +.admin-sidebar nav a.active { color: #1f5a8b; background: #e3edf9; } +.admin-sidebar > button { margin-top: auto; cursor: pointer; } +.admin-main { min-width: 0; } +.admin-topbar { position: sticky; z-index: 10; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: 88px; padding: 16px 28px; border-bottom: 1px solid var(--line); background: rgba(249,251,253,.9); backdrop-filter: blur(18px); } +.admin-topbar p { margin: 0 0 5px; font: 500 22px var(--serif); } +.admin-topbar small { color: var(--muted); } +.admin-actions { display: flex; align-items: center; gap: 10px; } +.admin-actions a, .admin-actions button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 15px; border: 1px solid #ccd8e2; border-radius: 9px; background: white; cursor: pointer; } +.admin-actions .publish-button { border-color: var(--ink); color: white; background: var(--ink); } +.save-message { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; color: #3f8557; font-size: 13px; } +.dirty-indicator { padding: 7px 10px; border-radius: 999px; color: #8b5d2b; background: #fff1df; font-size: 12px; } +.admin-loading { padding: 90px; color: var(--muted); text-align: center; } +.admin-workspace { display: grid; grid-template-columns: minmax(540px, 1fr) minmax(430px, .9fr); gap: 20px; padding: 22px; } +.editor-panel, .preview-panel { border: 1px solid rgba(29,64,91,.08); border-radius: 20px; background: white; box-shadow: 0 12px 32px rgba(44,72,96,.06); } +.editor-panel { padding: 28px; } +.panel-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); } +.panel-heading.secondary { margin-top: 42px; } +.panel-heading > div { display: flex; align-items: center; gap: 12px; } +.panel-heading span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: #3d6e97; background: #e6f0fa; font-size: 12px; } +.panel-heading h1, .panel-heading h2 { margin: 0; font: 500 20px var(--serif); } +.panel-heading small { color: var(--muted); } +.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-top: 22px; } +.form-grid label { display: grid; gap: 8px; color: #38566e; font-size: 13px; } +.form-grid label.full { grid-column: 1/3; } +.form-grid input, .form-grid textarea { width: 100%; padding: 12px 13px; border: 1px solid #d5dfe7; border-radius: 9px; outline: 0; color: #1c3c56; background: #fbfcfd; resize: vertical; } +.form-grid input:focus, .form-grid textarea:focus { border-color: #6d96b7; box-shadow: 0 0 0 3px rgba(78,128,168,.08); } +.image-input { position: relative; display: grid; grid-template-columns: 116px 1fr; align-items: center; min-height: 82px; overflow: hidden; border: 1px dashed #b8c8d6; border-radius: 12px; background: #f8fafc; cursor: pointer; } +.image-input img { width: 116px; height: 82px; padding: 8px; object-fit: contain; background: white; } +.image-input.portrait img { object-fit: cover; object-position: top; } +.image-input input { position: absolute; inset: 0; opacity: 0; cursor: pointer; } +.image-input b { justify-self: center; color: #3d6e97; font-size: 13px; font-weight: 600; } +.media-placeholder { display: flex; align-items: center; gap: 18px; margin-top: 38px; padding: 24px; border: 1px dashed #b8c8d6; border-radius: 14px; color: #53738d; background: #f8fafc; } +.media-placeholder strong { display: block; margin-bottom: 5px; } +.media-placeholder p { margin: 0; color: var(--muted); font-size: 13px; } +.preview-panel { position: sticky; top: 109px; align-self: start; padding: 18px; } +.preview-label { display: flex; justify-content: space-between; padding: 4px 4px 16px; font-size: 14px; } +.preview-label small { color: var(--muted); } +.preview-window { min-height: 390px; padding: 22px; overflow: hidden; border-radius: 16px; background-position: center; background-size: cover; } +.preview-window .brand-logo img { width: 38px; height: 38px; } +.preview-window .brand-logo-copy strong { font-size: 17px; } +.preview-window .brand-logo-copy small { font-size: 6px; } +.preview-window > div:last-child { margin: 82px 0 0 8%; } +.preview-window h2 { margin: 0 0 12px; font: 500 44px/1.17 var(--serif); } +.preview-window p { max-width: 330px; color: #496b85; font: 400 14px var(--serif); } +.preview-window span { display: inline-flex; margin-top: 16px; padding: 9px 15px; border-radius: 999px; color: white; background: var(--ink); font-size: 11px; } +.preview-teacher { display: grid; grid-template-columns: 128px 1fr; gap: 22px; margin-top: 16px; padding: 22px; border-radius: 15px; background: linear-gradient(135deg, #eef4f8, #fff8f2); } +.preview-teacher img { width: 128px; height: 168px; border-radius: 12px; object-fit: cover; object-position: top; } +.preview-teacher h3 { margin: 7px 0; font: 500 25px var(--serif); } +.preview-teacher p { margin: 0 0 12px; color: #496b85; font-size: 12px; } +.preview-teacher small { display: block; color: var(--muted); line-height: 1.7; } + +.content-admin-body, .settings-admin-body { padding: 22px; } +.content-tabs { display: flex; gap: 8px; margin-bottom: 16px; padding: 6px; width: fit-content; border: 1px solid var(--line); border-radius: 12px; background: white; } +.content-tabs button { padding: 10px 18px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; } +.content-tabs button.active { color: white; background: var(--ink); } +.content-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; } +.content-list, .content-editor { border: 1px solid rgba(29,64,91,.08); border-radius: 18px; background: white; box-shadow: 0 12px 32px rgba(44,72,96,.05); } +.content-list { display: flex; flex-direction: column; gap: 7px; align-self: start; padding: 12px; } +.content-list > button { display: grid; gap: 5px; padding: 13px; border: 0; border-radius: 10px; text-align: left; background: transparent; cursor: pointer; } +.content-list > button.active { color: #1f5a8b; background: #e8f0f8; } +.content-list > button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.content-list > button small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; } +.content-list .add-content { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 5px; border: 1px dashed #aac0d2; color: #35698f; } +.content-editor { padding: 28px; } +.danger-link, .inline-add { display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; border: 0; border-radius: 8px; color: #9b4b43; background: #fff1ef; cursor: pointer; } +.inline-add { color: #35698f; background: #e9f1f8; } +.form-grid select { width: 100%; padding: 12px 13px; border: 1px solid #d5dfe7; border-radius: 9px; color: #1c3c56; background: #fbfcfd; } +.compact-upload { position: relative; justify-self: start; margin-top: 2px; padding: 7px 11px; overflow: hidden; border: 1px solid #ccd8e2; border-radius: 8px; cursor: pointer; } +.compact-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; } +.media-picker-trigger { display: inline-flex; align-items: center; justify-self: start; gap: 7px; margin-top: 3px; padding: 8px 11px; border: 1px solid #ccd8e2; border-radius: 8px; color: #35698f; background: white; cursor: pointer; } +.media-picker-backdrop { position: fixed; z-index: 1000; inset: 0; display: grid; padding: 28px; place-items: center; background: rgba(15,35,52,.34); backdrop-filter: blur(8px); } +.media-picker-dialog { display: grid; grid-template-rows: auto auto minmax(0,1fr); width: min(900px, 96vw); max-height: min(760px, 90vh); padding: 24px; border-radius: 24px; background: white; box-shadow: 0 34px 100px rgba(17,44,66,.28); } +.media-picker-dialog > header { display: flex; align-items: center; justify-content: space-between; } +.media-picker-dialog header small { color: #7890a3; letter-spacing: .18em; } +.media-picker-dialog h2 { margin: 5px 0 16px; font: 500 30px var(--serif); } +.media-picker-dialog header button { display: grid; width: 40px; height: 40px; place-items: center; border: 0; border-radius: 50%; background: #eef3f7; cursor: pointer; } +.media-picker-search { display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid #d5dfe7; border-radius: 11px; } +.media-picker-search input { width: 100%; height: 44px; border: 0; outline: 0; } +.media-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px,1fr)); gap: 12px; margin-top: 18px; padding-right: 4px; overflow: auto; } +.media-picker-grid button { position: relative; display: grid; gap: 7px; min-width: 0; padding: 8px; border: 1px solid transparent; border-radius: 14px; text-align: left; background: #f5f8fa; cursor: pointer; } +.media-picker-grid button:hover, .media-picker-grid button.selected { border-color: #7396b3; background: #edf4f9; } +.media-picker-grid img { width: 100%; aspect-ratio: 4/3; border-radius: 10px; object-fit: cover; } +.media-picker-grid span, .media-picker-grid small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.media-picker-grid small { color: #7890a3; } +.media-picker-grid svg { position: absolute; top: 14px; right: 14px; padding: 4px; border-radius: 50%; color: white; background: #2e648e; box-sizing: content-box; } +.media-picker-empty { display: grid; min-height: 260px; place-items: center; color: var(--muted); } +.empty-editor { padding: 100px 20px; color: var(--muted); text-align: center; } +.settings-admin-body { display: grid; gap: 18px; max-width: 1080px; } +.subsection-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 30px; } +.subsection-heading h3 { margin: 0; font: 500 17px var(--serif); } +.repeat-settings article { position: relative; margin-top: 18px; padding: 0 18px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fafcfd; } +.repeat-settings article > .danger-link { margin-top: 14px; } +.health-ok { color: #317346 !important; } +.audit-list { display: grid; padding-top: 10px; } +.audit-list article { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 3px; border-bottom: 1px solid var(--line); } +.audit-list article > div { display: flex; align-items: center; gap: 12px; } +.audit-list article span, .audit-list article small { color: var(--muted); font-size: 12px; } +.centered-links { justify-content: center; margin-top: 42px; } +.authority-links a.disabled { pointer-events: none; opacity: .62; } +.compact-team { max-width: 1180px; margin: 0 auto; } +.center-action { display: flex; justify-content: center; margin-top: 34px; } +.media-admin-body { display: grid; gap: 18px; padding: 22px; } +.media-upload-panel { display: grid; grid-template-columns: 240px minmax(0, 1fr) 180px; align-items: center; gap: 18px; padding: 22px; } +.media-upload-panel > div:first-child { display: grid; grid-template-columns: 38px 1fr; align-items: center; color: #35698f; } +.media-upload-panel > div:first-child small { grid-column: 2; margin-top: 3px; color: var(--muted); } +.media-upload-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; } +.media-upload-meta input, .media-upload-meta select { min-width: 0; padding: 10px 11px; border: 1px solid #d5dfe7; border-radius: 8px; background: #fbfcfd; } +.media-upload-button { position: relative; display: grid; min-height: 44px; place-items: center; overflow: hidden; border-radius: 9px; color: white; background: var(--ink); cursor: pointer; } +.media-upload-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; } +.media-library-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px; align-items: start; } +.media-grid-panel { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; min-height: 360px; padding: 14px; border: 1px solid rgba(29,64,91,.08); border-radius: 18px; background: white; } +.media-tile { position: relative; display: grid; align-content: start; gap: 6px; min-width: 0; padding: 8px; border: 1px solid transparent; border-radius: 13px; text-align: left; background: #f7f9fb; cursor: pointer; } +.media-tile.active { border-color: #6d96b7; background: #eef4f9; box-shadow: 0 0 0 3px rgba(78,128,168,.08); } +.media-tile img { width: 100%; aspect-ratio: 4/3; border-radius: 9px; object-fit: cover; background: #e9eef2; } +.media-tile span, .media-tile small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.media-tile small { color: var(--muted); } +.media-tile b { position: absolute; top: 14px; right: 14px; padding: 4px 7px; border-radius: 999px; color: #2f7448; background: #e5f4e9; font-size: 10px; } +.media-detail { position: sticky; top: 108px; padding: 18px; } +.media-detail > img { width: 100%; max-height: 300px; border-radius: 12px; object-fit: contain; background: #edf1f4; } +.media-detail-meta { display: grid; gap: 5px; padding: 14px 2px 0; } +.media-detail-meta small { color: var(--muted); } +.media-detail-meta a { justify-self: start; color: #35698f; font-size: 12px; } +.media-detail-actions { display: flex; gap: 8px; margin-top: 18px; } +.media-detail-actions button { display: inline-flex; align-items: center; gap: 7px; padding: 10px 13px; border: 1px solid #ccd8e2; border-radius: 9px; background: white; cursor: pointer; } +.revision-list { display: grid; gap: 8px; padding-top: 20px; } +.revision-list article { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fafcfd; } +.revision-list article > div { display: flex; align-items: center; gap: 16px; } +.revision-list small { color: var(--muted); } +.revision-list button { padding: 8px 11px; border: 1px solid #ccd8e2; border-radius: 8px; color: #35698f; background: white; cursor: pointer; } +.password-action { display: flex; align-items: end; } + +@keyframes hero-in { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } to { opacity: 1; transform: translateY(calc(var(--hero-scroll) * -38px)); filter: none; } } +@keyframes title-rise { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } } +@keyframes section-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } } +@keyframes metric-in { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } } +@keyframes panel-wipe { from { opacity: .4; clip-path: inset(0 100% 0 0 round 38px); transform: translateY(22px); } to { opacity: 1; clip-path: inset(0 0 0 0 round 38px); transform: none; } } +@keyframes float-cue { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 7px); } } + +@media (max-width: 1100px) { + .site-header { position: fixed; grid-template-columns: 1fr auto; min-height: 72px; padding: 12px 24px; border-bottom: 1px solid rgba(28,62,88,.08); background: rgba(248,250,252,.9); backdrop-filter: blur(18px); } + .menu-toggle { z-index: 3; display: inline-flex; padding: 10px; cursor: pointer; } + .main-nav { position: fixed; top: 0; left: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100vw; height: 100svh; gap: 28px; visibility: hidden; opacity: 0; background: rgba(247,249,251,.97); transition: visibility .28s ease, opacity .28s ease; } + .main-nav.open { visibility: visible; opacity: 1; } + .main-nav a { display: flex; min-width: 180px; min-height: 48px; justify-content: center; font: 500 24px var(--serif); } + .header-cta { display: none; } + .teacher-card { grid-template-columns: .9fr 1.1fr; } + .official-grid { grid-template-columns: repeat(2, 1fr); } + .team-grid { grid-template-columns: 1fr; max-width: 760px; } + .admin-workspace { grid-template-columns: 1fr; } + .preview-panel { position: static; } +} + +@media (max-width: 760px) { + :root { --section-space: 68px; } + .section-pad { padding: var(--section-space) 20px; } + .site-header { min-height: 70px; padding: 11px 18px; } + .section-heading.centered { margin-bottom: 40px; } + .section-heading > p:last-child { font-size: 16px; line-height: 1.82; } + .eyebrow { font-size: 12px; letter-spacing: .22em; } + .hero-copy { width: 100%; padding: 25vh 22px 130px; text-align: center; } + .hero-copy h1 { font-size: clamp(50px, 14.2vw, 56px); letter-spacing: .045em; } + .hero-subtitle { margin-bottom: 30px; font-size: 17px; line-height: 1.65; letter-spacing: .06em; } + .hero { min-height: 100svh; background-position: 68% center; } + .hero-wave { bottom: -105px; } + .about-layout, .teacher-card, .news-panel, .login-page { grid-template-columns: 1fr; } + .listing-grid, .team-grid { grid-template-columns: 1fr; } + .public-page-main { padding-top: 70px; } + .listing-hero { padding-top: 80px; } + .article-list > a { grid-template-columns: 1fr 20px; } + .article-list img { grid-column: 1/3; width: 100%; height: 210px; } + .detail-hero, .detail-content { grid-template-columns: 1fr; } + .detail-hero { padding-top: 70px; text-align: center; } + .detail-hero > div { padding-left: 0; } + .detail-hero img { height: 460px; } + .detail-content { gap: 28px; padding-top: 45px; } + .team-grid article { grid-template-columns: 120px 1fr; } + .team-grid img { width: 120px; height: 175px; } + .authority-links { flex-wrap: wrap; } + .authority-links h2 { width: 100%; margin: 0; text-align: center; } + .about { min-height: 0; padding-top: 48px; } + .about-layout { gap: 28px; } + .about-visual { min-height: 270px; border-radius: 28px; } + .metric-grid { gap: 12px; } + .metric-card { grid-template-columns: 38px 90px minmax(0, 1fr); column-gap: 8px; min-height: 104px; padding: 17px 18px; border-radius: 21px; } + .metric-card strong { font-size: 25px; } + .metric-card span { font-size: 14px; } + .metric-card small { font-size: 13px; } + .teacher-card { min-height: 0; } + .teacher-portrait { height: 470px; } + .teacher-copy { padding: 38px 28px 46px; } + .teacher-copy h2 { font-size: 42px; } + .teacher-title { font-size: 17px; } + .philosophy-grid, .product-grid { grid-template-columns: 1fr; } + .philosophy-grid, .product-grid { gap: 18px; } + .philosophy-card { min-height: 250px; padding: 34px; } + .philosophy-card h3 { margin-top: 70px; font-size: 36px; } + .product-card img { height: 190px; } + .product-card div { padding: 21px 8px 23px 23px; } + .product-card h3 { font-size: 22px; } + .split-heading { display: block; } + .split-heading > p { margin-top: 22px; } + .official-grid { grid-template-columns: 1fr 1fr; } + .official-grid { gap: 12px; } + .official-grid article { min-height: 165px; padding: 22px 18px; border-radius: 22px; } + .official-grid h3 { margin: 24px 0 7px; font-size: 20px; } + .authority-links { gap: 12px; padding: 48px 0 0; } + .authority-links h2 { font-size: 26px; } + .news-feature { min-height: 300px; padding: 42px 28px; } + .news-list { padding: 20px 28px 36px; } + .news-list a { grid-template-columns: 1fr 18px; } + .news-list time { display: none; } + .site-footer { grid-template-columns: 1fr; gap: 32px; padding: 52px 20px 22px; } + .footer-contact { justify-content: start; } + .footer-meta { grid-column: 1; flex-direction: column; gap: 8px; } + .draft-preview-ribbon { right: 12px; bottom: 12px; left: 12px; justify-content: space-between; } + .draft-preview-ribbon span { display: none; } + .media-picker-backdrop { padding: 10px; } + .media-picker-dialog { max-height: 94vh; padding: 18px; border-radius: 18px; } + .media-picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } + .login-page { padding: 18px; background-position: 66% center; } + .login-brand { min-height: 110px; padding: 4px; } + .login-brand > div { display: none; } + .login-card { padding: 38px 24px; border-radius: 26px; } + .admin-shell { grid-template-columns: 1fr; } + .admin-sidebar { display: none; } + .admin-topbar { align-items: flex-start; gap: 12px; padding: 14px 16px; } + .admin-topbar > div:first-child small { display: none; } + .admin-actions a, .save-message { display: none; } + .admin-actions button { padding: 0 10px; font-size: 12px; } + .admin-workspace { padding: 12px; } + .content-admin-body, .settings-admin-body { padding: 12px; } + .media-admin-body { padding: 12px; } + .media-upload-panel, .media-library-layout { grid-template-columns: 1fr; } + .media-detail { position: static; } + .content-layout { grid-template-columns: 1fr; } + .content-list { max-height: 300px; overflow: auto; } + .content-editor { padding: 20px 16px; } + .editor-panel { padding: 20px 16px; } + .form-grid { grid-template-columns: 1fr; } + .form-grid label.full { grid-column: 1; } +} + +@media (max-width: 520px) { + .team-grid { padding-right: 20px; padding-left: 20px; } + .team-grid article { grid-template-columns: 1fr; gap: 16px; padding: 18px; } + .team-grid img { width: 100%; height: auto; aspect-ratio: 4 / 3; } + .team-grid h2, .team-grid h3 { margin-top: 4px; } +} + +@media (hover: none) { + .metric-card:hover, .philosophy-card:hover, .product-card:hover, .official-grid article:hover, .listing-card:hover { transform: none; } +} + +@media (prefers-reduced-motion: reduce) { + *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } + .reveal-section { opacity: 1; transform: none; } + .reveal-section > *, .metric-card, .teacher-card { opacity: 1; clip-path: none; transform: none; } + .hero-media img, .hero-copy, .teacher-portrait img, .about-visual img { transform: none !important; } +} diff --git a/app/components/AdminSidebar.vue b/app/components/AdminSidebar.vue new file mode 100644 index 0000000..f08687e --- /dev/null +++ b/app/components/AdminSidebar.vue @@ -0,0 +1,23 @@ + + + diff --git a/app/components/AnimatedMetric.vue b/app/components/AnimatedMetric.vue new file mode 100644 index 0000000..6fe776f --- /dev/null +++ b/app/components/AnimatedMetric.vue @@ -0,0 +1,32 @@ + + + diff --git a/app/components/BrandLogo.vue b/app/components/BrandLogo.vue new file mode 100644 index 0000000..5c0cbee --- /dev/null +++ b/app/components/BrandLogo.vue @@ -0,0 +1,43 @@ + + + + + diff --git a/app/components/FilingLinks.vue b/app/components/FilingLinks.vue new file mode 100644 index 0000000..c38f977 --- /dev/null +++ b/app/components/FilingLinks.vue @@ -0,0 +1,21 @@ + + + diff --git a/app/components/MediaPicker.vue b/app/components/MediaPicker.vue new file mode 100644 index 0000000..4628959 --- /dev/null +++ b/app/components/MediaPicker.vue @@ -0,0 +1,61 @@ + + + diff --git a/app/components/PublicPageLayout.vue b/app/components/PublicPageLayout.vue new file mode 100644 index 0000000..d94e36e --- /dev/null +++ b/app/components/PublicPageLayout.vue @@ -0,0 +1,24 @@ + + + diff --git a/app/components/RevealSection.vue b/app/components/RevealSection.vue new file mode 100644 index 0000000..87a3cda --- /dev/null +++ b/app/components/RevealSection.vue @@ -0,0 +1,27 @@ + + + diff --git a/app/components/SiteHeader.vue b/app/components/SiteHeader.vue new file mode 100644 index 0000000..243b3d8 --- /dev/null +++ b/app/components/SiteHeader.vue @@ -0,0 +1,57 @@ + + + diff --git a/app/composables/useSiteDocument.ts b/app/composables/useSiteDocument.ts new file mode 100644 index 0000000..ce6d0e3 --- /dev/null +++ b/app/composables/useSiteDocument.ts @@ -0,0 +1,32 @@ +import type { SiteDocument } from '../../server/utils/site-schema' + +export async function useSiteDocument() { + const route = useRoute() + const isPreview = computed(() => route.query.preview === 'draft') + const endpoint = computed(() => isPreview.value ? '/api/admin/site' : '/api/public/site') + const headers = import.meta.server && isPreview.value ? useRequestHeaders(['cookie']) : undefined + useHead(() => isPreview.value ? { meta: [{ name: 'robots', content: 'noindex, nofollow' }] } : {}) + const { data: response, error } = await useFetch<{ data: SiteDocument }>(endpoint, { headers }) + + if (error.value) { + if (isPreview.value && error.value.statusCode === 401) { + throw createError({ statusCode: 401, statusMessage: '预览草稿前请先登录后台' }) + } + throw error.value + } + + return { + site: computed(() => response.value!.data), + isPreview, + } +} + +export function useAbsoluteUrl() { + const config = useRuntimeConfig() + const base = String(config.public.siteUrl).replace(/\/$/, '') + return (path?: string | null) => { + if (!path) return base + if (/^https?:\/\//i.test(path)) return path + return `${base}${path.startsWith('/') ? path : `/${path}`}` + } +} diff --git a/app/composables/useUnsavedChanges.ts b/app/composables/useUnsavedChanges.ts new file mode 100644 index 0000000..fbc863b --- /dev/null +++ b/app/composables/useUnsavedChanges.ts @@ -0,0 +1,35 @@ +import type { Ref } from 'vue' + +export function useUnsavedChanges(source: Ref) { + const dirty = ref(false) + let baseline = '' + + function snapshot() { + baseline = JSON.stringify(source.value ?? null) + dirty.value = false + } + + watch(source, (value) => { + if (!baseline) return + dirty.value = JSON.stringify(value ?? null) !== baseline + }, { deep: true }) + + function beforeUnload(event: BeforeUnloadEvent) { + if (!dirty.value) return + event.preventDefault() + event.returnValue = '' + } + + onMounted(() => window.addEventListener('beforeunload', beforeUnload)) + onBeforeUnmount(() => window.removeEventListener('beforeunload', beforeUnload)) + onBeforeRouteLeave(() => !dirty.value || window.confirm('当前修改尚未保存,确定离开吗?')) + + return { dirty, markClean: snapshot } +} + +export function apiErrorMessage(error: any, fallback: string) { + const issue = error?.data?.data?.issues?.[0] + if (!issue) return error?.data?.statusMessage || fallback + const path = Array.isArray(issue.path) && issue.path.length ? `${issue.path.join('.')}:` : '' + return `${path}${issue.message || fallback}` +} diff --git a/app/pages/admin/content.vue b/app/pages/admin/content.vue new file mode 100644 index 0000000..fdbcc79 --- /dev/null +++ b/app/pages/admin/content.vue @@ -0,0 +1,149 @@ + + +