fix: 自动适配CUPS不同版本的CSS类名

- 模板默认使用旧类名(header/body/footer)兼容CUPS 2.4.1
- 安装脚本自动检测目标系统CUPS版本的CSS类名
- 如果是新版CUPS(使用cups-header等),自动替换模板类名
- 解决不同CUPS版本CSS样式不加载的问题

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-01 10:32:12 +08:00
parent 9af3df356e
commit 3360fc7bd8
3 changed files with 20 additions and 3 deletions

View File

@@ -24,7 +24,7 @@
<title>{title} - CUPS 打印管理</title>
</head>
<body onload="check_cookies();">
<div class="cups-header">
<div class="header">
<ul>
<li><a href="https://openprinting.github.io/cups/" target="_blank">OpenPrinting CUPS</a></li>
<li><a {SECTION=admin?class="active" :}href="/">首页</a></li>
@@ -35,6 +35,6 @@
<li><a {SECTION=printers?class="active" :}href="/printers/">打印机</a></li>
</ul>
</div>
<div class="cups-body">
<div class="body">
<div class="row">
<h1>{title}</h1>

View File

@@ -1,5 +1,5 @@
</div>
</div>
<div class="cups-footer">CUPS 和 CUPS 标志是 <a href="http://www.apple.com">Apple Inc.</a> 的商标 | 中文汉化版</div>
<div class="footer">CUPS 和 CUPS 标志是 <a href="http://www.apple.com">Apple Inc.</a> 的商标 | 中文汉化版</div>
</body>
</html>