Web UI: music channel, posted-to-Matrix glow, redesigned index, AVIF thumbnails
- Add music as a fourth channel (nav + theme color) - Glowing themed border on cards that have been posted to Matrix - Replace per-channel index sections with: "Pete just posted" strip, channel dashboard (last post, 24h count, totals), unified latest feed - /img proxy: SSRF-guarded thumbnail re-encoder that resizes to 800px and runs avifenc -q 45, cached under data/img-cache
This commit is contained in:
@@ -34,6 +34,7 @@ var channels = []Channel{
|
||||
{Slug: "gaming", Title: "Gaming", Theme: "gaming", Emoji: "🎮", Blurb: "Releases, platforms, and the people making the games."},
|
||||
{Slug: "tech", Title: "Tech", Theme: "tech", Emoji: "💻", Blurb: "Industry, products, and the wires that hold it all together."},
|
||||
{Slug: "politics", Title: "Politics", Theme: "politics", Emoji: "🏛️", Blurb: "Policy, power, and the news of the day."},
|
||||
{Slug: "music", Title: "Music", Theme: "music", Emoji: "🎵", Blurb: "Records, scenes, and the artists shaping the sound."},
|
||||
}
|
||||
|
||||
// Server is the HTTP server for Pete's web UI.
|
||||
@@ -68,6 +69,7 @@ func New(cfg config.WebConfig) (*Server, error) {
|
||||
return nil, err
|
||||
}
|
||||
mux.Handle("GET /static/", http.StripPrefix("/static/", http.FileServer(http.FS(staticSub))))
|
||||
mux.HandleFunc("GET /img/{hash}.avif", s.handleImg)
|
||||
|
||||
mux.HandleFunc("GET /{$}", s.handleIndex)
|
||||
for _, ch := range channels {
|
||||
|
||||
Reference in New Issue
Block a user