文档站面向用户清理:删摆设组件 + 去实现名词 + 标题去重
- 删「打印/导出 PDF」按钮与「是否有帮助」反馈组件(静态站无后端,纯摆设)及未使用 SVG 图标 - 文档去 Tauri/Gin 等实现层名词(本地代理/隧道等用户语义保留) - 5 页 markdown 首行 H1 与页面标题去重 - homepage dist 同步重建
This commit is contained in:
1 parent
946983d599
commit
ec9a7b8695
39 files changed
+53
-811
No files matched your search
@@ -1,4 +1,4 @@
|
||||
/* OpsxAPI 文档站交互:搜索 / 代码复制 / 目录高亮 / 反馈 / 移动端导航 */
|
||||
/* OpsxAPI 文档站交互:搜索 / 代码复制 / 目录高亮 / 移动端导航 */
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
@@ -180,30 +180,7 @@
|
||||
document.querySelectorAll("article.md h2[id], article.md h3[id]").forEach(function (h) { io.observe(h); });
|
||||
}
|
||||
|
||||
/* ---------- 反馈组件 ---------- */
|
||||
var fb = document.getElementById("feedback");
|
||||
if (fb) {
|
||||
var pageKey = "opsx-docs-fb:" + location.pathname;
|
||||
var voted = null;
|
||||
try { voted = localStorage.getItem(pageKey); } catch (e) {}
|
||||
var btns = fb.querySelectorAll(".fb-btn");
|
||||
var thanks = document.getElementById("fb-thanks");
|
||||
function mark(v) {
|
||||
btns.forEach(function (b) {
|
||||
if (b.dataset.v === v) b.classList.add("done");
|
||||
});
|
||||
thanks.hidden = false;
|
||||
try { localStorage.setItem(pageKey, v); } catch (e) {}
|
||||
}
|
||||
if (voted) mark(voted);
|
||||
btns.forEach(function (b) {
|
||||
b.addEventListener("click", function () { mark(b.dataset.v); });
|
||||
});
|
||||
}
|
||||
|
||||
/* ---------- 打印 ---------- */
|
||||
var printBtn = document.getElementById("print-btn");
|
||||
if (printBtn) printBtn.addEventListener("click", function () { window.print(); });
|
||||
|
||||
/* ---------- 移动端侧栏 ---------- */
|
||||
var menuBtn = document.getElementById("menu-btn");
|
||||
|
||||
Reference in new issue
Block a user