From 7dc2eebdf6161fb01c0a0e76bb80a4dc8fac459e Mon Sep 17 00:00:00 2001 From: QQ Date: Tue, 3 Nov 2026 14:28:18 +0800 Subject: [PATCH] =?UTF-8?q?style(footer):=20=E5=A4=87=E6=A1=88=E5=8F=B7?= =?UTF-8?q?=E7=A7=BB=E5=88=B0=E5=8F=B3=E4=B8=8B=EF=BC=8C=E8=AF=AD=E8=A8=80?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=B1=85=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - .qq-icp 绝对定位到 right:14px - .qq-lang 改到水平居中 - 左侧仍是「QQGit · Gitea 1.21.11」 - 三段都绝对定位后页脚没有流内内容,补 min-height:34px 撑住高度 样式表 ?v=14 --- custom/public/assets/css/qq-ui.css | 32 ++++++++++++++--------------- custom/templates/custom/header.tmpl | 6 +++--- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/custom/public/assets/css/qq-ui.css b/custom/public/assets/css/qq-ui.css index b29bd90..060c4cf 100644 --- a/custom/public/assets/css/qq-ui.css +++ b/custom/public/assets/css/qq-ui.css @@ -236,6 +236,8 @@ samp, justify-content: center !important; align-items: center !important; gap: 8px; + min-height: 34px; + box-sizing: border-box; padding: 9px 12px; font-size: 12px; line-height: 1.6; @@ -247,32 +249,28 @@ samp, border-top: 1px solid var(--color-secondary); } -.qq-icp-footer .qq-icp { - color: var(--color-text-light-2); - text-decoration: none; - transition: color 0.15s ease; -} - -.qq-icp-footer .qq-icp:hover { - color: var(--color-primary); -} - -/* 固定页脚会盖住页面最后一行,给 body 底部留出等高空白 */ -body { - padding-bottom: var(--qq-icp-footer-height, 42px); -} - -/* 未登录访客的语言切换:贴右,ICP 仍保持居中 */ -.page-footer.qq-icp-footer .qq-lang { +/* 页脚三段:左 = 站点信息,中 = 语言切换,右 = 备案号 + (index.css 的 .page-footer 会抢布局,这里全部用绝对定位摆,互不影响) */ +.page-footer.qq-icp-footer .qq-icp { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); + white-space: nowrap; +} + +/* 未登录访客的语言切换:居中 */ +.page-footer.qq-icp-footer .qq-lang { + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 1; + white-space: nowrap; } .page-footer.qq-icp-footer .qq-lang a { diff --git a/custom/templates/custom/header.tmpl b/custom/templates/custom/header.tmpl index 054816c..351c710 100644 --- a/custom/templates/custom/header.tmpl +++ b/custom/templates/custom/header.tmpl @@ -4,9 +4,9 @@ 注意:只做外观增强,不引入任何外部依赖,全部资源随 custom/ 一起发布 */}} - - - + + +