fix(fx): 钉死页脚与登录表单布局,不再被 index.css 的窄屏规则带偏
- .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 阶段清单
This commit is contained in:
parent
dd19bbb341
commit
25d8895cf2
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 提供)。要更换时只改下面 <a> 里的文字即可,改完重新跑 ./scripts/deploy.sh --yes。
|
||||
备案查询链接指向工信部官网 https://beian.miit.gov.cn/ ,这是通行做法。
|
||||
备案号:闽ICP备2023002932号(QQ 于 2026-11-03 提供)。
|
||||
换号码只改下面 <a> 里的文字,改完跑 ./scripts/deploy.sh --yes。
|
||||
|
||||
语言切换刻意写成普通链接而不是官方的 .ui.dropdown:
|
||||
官方那个依赖 index.js 初始化下拉,一旦脚本没加载就点不动;
|
||||
/?lang=xx 是 Gitea i18n 中间件认的参数,纯链接也能生效。
|
||||
*/}}
|
||||
<footer class="page-footer qq-icp-footer" role="contentinfo" aria-label="备案信息">
|
||||
<a class="qq-icp" href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer">闽ICP备2023002932号</a>
|
||||
{{if not .SignedUser}}
|
||||
<nav class="qq-lang" aria-label="语言 / Language">
|
||||
{{if eq ctx.Locale.Lang "zh-CN"}}
|
||||
<span class="qq-lang-cur">简体中文</span>
|
||||
<a href="{{AppSubUrl}}/?lang=en-US" hreflang="en-US">English</a>
|
||||
{{else}}
|
||||
<a href="{{AppSubUrl}}/?lang=zh-CN" hreflang="zh-CN">简体中文</a>
|
||||
<span class="qq-lang-cur">{{ctx.Locale.LangName}}</span>
|
||||
{{end}}
|
||||
</nav>
|
||||
{{end}}
|
||||
</footer>
|
||||
|
|
|
|||
|
|
@ -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 提供公安联网备案号后追加
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN" class="theme-qq-auto">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="https://git.qyhhh.top/assets/css/index.css?v=1.21.11">
|
||||
<link rel="stylesheet" href="https://git.qyhhh.top/assets/css/theme-qq-auto.css?v=1.21.11">
|
||||
<link rel="stylesheet" href="https://git.qyhhh.top/assets/css/qq-ui.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="height:600px">占位</div>
|
||||
<footer class="page-footer qq-icp-footer" role="contentinfo" aria-label="备案信息">
|
||||
<a class="qq-icp" href="https://beian.miit.gov.cn/">闽ICP备2023002932号</a>
|
||||
<nav class="qq-lang" aria-label="语言 / Language">
|
||||
<span class="qq-lang-cur">简体中文</span>
|
||||
<a href="/?lang=en-US">English</a>
|
||||
</nav>
|
||||
</footer>
|
||||
<pre id="out">pending</pre>
|
||||
<script>
|
||||
var f = document.querySelector('.page-footer'), n = document.querySelector('.qq-lang');
|
||||
var cf = getComputedStyle(f), cn = getComputedStyle(n);
|
||||
document.getElementById('out').textContent = [
|
||||
'footer display = ' + cf.display,
|
||||
'footer justify = ' + cf.justifyContent,
|
||||
'footer flexDirection = ' + cf.flexDirection,
|
||||
'footer position = ' + cf.position,
|
||||
'lang position = ' + cn.position + ' right=' + cn.right,
|
||||
'lang display = ' + cn.display
|
||||
].join('\n');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in New Issue