From 25d8895cf2d1988b39ecbe987d7def5f0d38a24d Mon Sep 17 00:00:00 2001 From: QQ Date: Tue, 3 Nov 2026 10:32:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(fx):=20=E9=92=89=E6=AD=BB=E9=A1=B5=E8=84=9A?= =?UTF-8?q?=E4=B8=8E=E7=99=BB=E5=BD=95=E8=A1=A8=E5=8D=95=E5=B8=83=E5=B1=80?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E5=86=8D=E8=A2=AB=20index.css=20=E7=9A=84?= =?UTF-8?q?=E7=AA=84=E5=B1=8F=E8=A7=84=E5=88=99=E5=B8=A6=E5=81=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - .page-footer.qq-icp-footer 逐条 !important:row / nowrap / center / center (index.css 窄屏会把 .page-footer 改成 column + space-between,导致 ICP 跑到左边) - 登录页 .ui.form .field 显式 flex row + label 96px + input flex:1, index.css 在窄容器下会把 inline.field 退化成上下堆叠 - 登录页容器 430px -> 560px,表单有足够宽度一行放下 - docs/TODO.md 补 v1.1 阶段清单 --- custom/public/assets/css/qq-fx.css | 38 ++++++++++++++++++-- custom/public/assets/css/qq-ui.css | 43 +++++++++++++++++++++-- custom/templates/base/footer_content.tmpl | 24 ++++++++++--- docs/TODO.md | 9 +++++ preview/_footer_probe.html | 32 +++++++++++++++++ 5 files changed, 137 insertions(+), 9 deletions(-) create mode 100644 preview/_footer_probe.html diff --git a/custom/public/assets/css/qq-fx.css b/custom/public/assets/css/qq-fx.css index 340b2a8..9180208 100644 --- a/custom/public/assets/css/qq-fx.css +++ b/custom/public/assets/css/qq-fx.css @@ -296,7 +296,7 @@ body.qq-fx-active .page { .page-content.user.signin .ui.container.column.fluid { position: relative; width: 100%; - max-width: 430px; + max-width: 560px; margin: 0 auto; padding: 0; } @@ -349,7 +349,7 @@ body.qq-fx-active .page { /* 登录/注册/OpenID 三个页签,收成卡片顶部的一条 */ .page-content.user.signin .new-menu.navbar { margin: 0 auto; - max-width: 430px; + max-width: 560px; border-bottom: 1px solid var(--color-secondary); background: transparent; } @@ -462,3 +462,37 @@ body.qq-fx-active .page { .qq-hero-tag { font-size: 14px; } .qq-home-cards { padding: 0 16px 9vh; } } + +/* 表单字段:强制「标签在左、输入框在右」的一行式布局。 + index.css 里 .inline.field 的行为在窄容器下会退化成上下堆叠, + 这里用显式 flex 规则钉死,保证深浅色/窄屏都是同一套版式。 */ +.page-content.user.signin .ui.form .field { + display: flex !important; + flex-direction: row !important; + flex-wrap: nowrap !important; + align-items: center !important; + gap: 12px !important; + margin: 0 0 14px 0 !important; +} + +.page-content.user.signin .ui.form .field > label { + flex: 0 0 96px !important; + width: 96px !important; + margin: 0 !important; + text-align: right !important; + font-size: 13px !important; + line-height: 1.6 !important; +} + +.page-content.user.signin .ui.form .field > input { + flex: 1 1 auto !important; + width: auto !important; + min-width: 0 !important; + box-sizing: border-box !important; +} + +.page-content.user.signin .ui.form .field > .ui.checkbox, +.page-content.user.signin .ui.form .field > button, +.page-content.user.signin .ui.form .field > a { + flex: 0 0 auto !important; +} diff --git a/custom/public/assets/css/qq-ui.css b/custom/public/assets/css/qq-ui.css index fa2c169..9adbff9 100644 --- a/custom/public/assets/css/qq-ui.css +++ b/custom/public/assets/css/qq-ui.css @@ -228,9 +228,13 @@ samp, right: 0; bottom: 0; z-index: 20; - display: flex; - justify-content: center; - align-items: center; + /* index.css 里 .page-footer 在窄屏会变成 column + space-between, + 这里逐条压回去,保证永远是「一行、居中」 */ + display: flex !important; + flex-direction: row !important; + flex-wrap: nowrap !important; + justify-content: center !important; + align-items: center !important; gap: 8px; padding: 9px 12px; font-size: 12px; @@ -257,3 +261,36 @@ samp, body { padding-bottom: var(--qq-icp-footer-height, 42px); } + +/* 未登录访客的语言切换:贴右,ICP 仍保持居中 */ +.page-footer.qq-icp-footer .qq-lang { + position: absolute; + right: 14px; + top: 50%; + transform: translateY(-50%); + display: flex; + align-items: center; + gap: 8px; + font-size: 12px; + line-height: 1; +} + +.page-footer.qq-icp-footer .qq-lang a { + color: var(--color-text-light-2); + text-decoration: none; +} + +.page-footer.qq-icp-footer .qq-lang a:hover { + color: var(--color-primary); + text-decoration: underline; +} + +.page-footer.qq-icp-footer .qq-lang-cur { + color: var(--color-primary); + font-weight: 600; +} + +/* 极窄屏挤不下就只留备案号 */ +@media (max-width: 460px) { + .page-footer.qq-icp-footer .qq-lang { display: none; } +} diff --git a/custom/templates/base/footer_content.tmpl b/custom/templates/base/footer_content.tmpl index 623be7b..adfec04 100644 --- a/custom/templates/base/footer_content.tmpl +++ b/custom/templates/base/footer_content.tmpl @@ -4,12 +4,28 @@ 官方那一整条包含「Powered by Gitea / 当前版本 / 页面耗时 / 模板耗时 / 简体中文语言菜单 / 许可证 / API」,本站不需要,整体删掉。 - 这里只留一条 ICP 备案号,靠 qq-ui.css 里的 .qq-icp-footer 悬挂在视口底部 - (内容不满一屏时也贴底,不随白底留空飘到页面中间)。 + 这里只留: + 1. ICP 备案号(居中,靠 qq-ui.css 的 .qq-icp-footer 悬挂在视口底部) + 2. 未登录访客的语言切换(右侧;登录用户的语言在右上角用户菜单里) - 备案号:闽ICP备2023002932号(QQ 于 2026-11-03 提供)。要更换时只改下面 里的文字即可,改完重新跑 ./scripts/deploy.sh --yes。 - 备案查询链接指向工信部官网 https://beian.miit.gov.cn/ ,这是通行做法。 + 备案号:闽ICP备2023002932号(QQ 于 2026-11-03 提供)。 + 换号码只改下面 里的文字,改完跑 ./scripts/deploy.sh --yes。 + + 语言切换刻意写成普通链接而不是官方的 .ui.dropdown: + 官方那个依赖 index.js 初始化下拉,一旦脚本没加载就点不动; + /?lang=xx 是 Gitea i18n 中间件认的参数,纯链接也能生效。 */}} diff --git a/docs/TODO.md b/docs/TODO.md index 643bb7a..3419e2c 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -72,3 +72,12 @@ - [ ] 服务器 `dpkg --audit` 中 openresty / openresty-opm / openresty-resty 处于半配置状态 (**既有问题,非本次引入**;装 `librsvg2-bin` 时被触发,已 `stop` + `reset-failed`,站点仍 200) + +## v1.1 动效层(首页 + 登录页) + +- [x] 7.1 `qq-fx.css` / `qq-fx.js`:粒子星座、旋转光环、渐变标题、打字口号、毛玻璃卡片 +- [x] 7.2 登录页卡片化(不覆盖模板,纯 CSS 作用域 `.page-content.user.signin`) +- [x] 7.3 页脚补语言切换(`{{if not .SignedUser}}` + `/?lang=xx` 纯链接,不依赖 JS) +- [x] 7.4 修复 index.css 干扰:`.page-footer` 窄屏 column/space-between、`.inline.field` 堆叠 → 全部用显式 flex 规则钉死 +- [x] 7.5 上线并实拍验证(桌面浅色 / 登录页 / 深色走预览图) +- [ ] 7.6 待 QQ 提供公安联网备案号后追加 diff --git a/preview/_footer_probe.html b/preview/_footer_probe.html new file mode 100644 index 0000000..841a7a2 --- /dev/null +++ b/preview/_footer_probe.html @@ -0,0 +1,32 @@ + + + + + + + + + +
占位
+ +
pending
+ + +