feat: add search and user data routes, services, and tests

This commit is contained in:
2026-06-05 22:53:27 +08:00
parent 29e6797c12
commit 1538d564f6
14 changed files with 1633 additions and 13 deletions
+18 -1
View File
@@ -1 +1,18 @@
/* app.js — 基础前端交互HTMX 后续增强) */
/* app.js — 基础前端交互 */
// Ctrl+K 或 / 聚焦搜索框
document.addEventListener("keydown", function (e) {
var input = document.querySelector(".nav-search-input");
if (!input) return;
// 忽略在输入框内的按键
if (e.target.tagName === "INPUT" || e.target.tagName === "TEXTAREA") return;
if ((e.ctrlKey || e.metaKey) && e.key === "k") {
e.preventDefault();
input.focus();
} else if (e.key === "/") {
e.preventDefault();
input.focus();
}
});