style: dark stealth theme with teal/burgundy pieces and cache-busting

Darken the DaisyUI theme and game board colors for a muted, low-chroma
aesthetic. Pieces use dark teal vs burgundy for subtle contrast.
Add MD5-based cache busting to the DaisyUI stylesheet link so CSS
changes are picked up without a hard refresh.
This commit is contained in:
Ryan Hamamura
2026-02-05 09:51:36 -10:00
parent 9a3d1fd164
commit 73128dc119
3 changed files with 1962 additions and 42 deletions

View File

@@ -2,8 +2,10 @@ package main
import (
"context"
"crypto/md5"
"database/sql"
_ "embed"
"encoding/hex"
"log"
"net/http"
"os"
@@ -32,11 +34,13 @@ var (
var daisyUICSS []byte
func DaisyUIPlugin(v *via.V) {
sum := md5.Sum(daisyUICSS)
version := hex.EncodeToString(sum[:4])
v.HTTPServeMux().HandleFunc("GET /_plugins/daisyui/style.css", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/css")
_, _ = w.Write(daisyUICSS)
})
v.AppendToHead(h.Link(h.Rel("stylesheet"), h.Href("/_plugins/daisyui/style.css")))
v.AppendToHead(h.Link(h.Rel("stylesheet"), h.Href("/_plugins/daisyui/style.css?v="+version)))
}
func port() string {