move to embedded css, update hx state for spinner bug

This commit is contained in:
2025-08-17 14:32:33 +00:00
parent 749d68cdeb
commit 18d151e0cf
3 changed files with 22 additions and 10 deletions

View File

@@ -1,6 +1,7 @@
package main
import (
"embed"
"fmt"
"log"
"net/http"
@@ -11,11 +12,14 @@ import (
"git.valxntine.dev/valxntine/blog/templates"
)
//go:embed static/*
var staticFS embed.FS
func main() {
mux := http.NewServeMux()
fs := http.FileServer(http.Dir("./static/"))
mux.Handle("/static/", http.StripPrefix("/static/", fs))
staticHandler := http.FileServer(http.FS(staticFS))
mux.Handle("/static/", staticHandler)
mux.HandleFunc("/", handleHome)
mux.HandleFunc("/posts/", handlePost)