1
0
forked from rosa/hakurei

cmd/pkgserver: finish search implementation

This commit is contained in:
mae
2026-04-18 02:07:52 -05:00
parent ba17f9d4f3
commit 004ac511a9
14 changed files with 411 additions and 206 deletions

View File

@@ -15,12 +15,7 @@ func serveWebUI(w http.ResponseWriter, r *http.Request) {
func serveStaticContent(w http.ResponseWriter, r *http.Request) {
switch r.URL.Path {
case "/static/style.css":
darkTheme := r.CookiesNamed("dark_theme")
if len(darkTheme) > 0 && darkTheme[0].Value == "true" {
http.ServeFileFS(w, r, content, "ui/static/dark.css")
} else {
http.ServeFileFS(w, r, content, "ui/static/light.css")
}
http.ServeFileFS(w, r, content, "ui/static/style.css")
case "/favicon.ico":
http.ServeFileFS(w, r, content, "ui/static/favicon.ico")
case "/static/index.js":