A single Go binary with SQLite that serves a public page of the owner's ranked lists (movies, TV, albums, songs, video games, theater) and a login-gated editor. - Lists of 1–65,535 entries (100 recommended), several per category - Search-to-add via TMDB, TheTVDB, IGDB, Deezer/MusicBrainz, Wikipedia; manual entry as a fallback - Theater entries carry a production (Broadway, tour, …), venue and cast - Artwork cached locally; URL override and uploads - Drag, arrow and type-a-rank reordering; paginated for long lists - 12 theme presets plus custom CSS - First-run setup code or env-provided admin; bcrypt, rate-limited login, CSRF-guarded JSON API - Dockerfile and docker-compose.yml Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
36 lines
792 B
Go
36 lines
792 B
Go
package server
|
|
|
|
// Theme is a built-in color preset. The actual colors live in
|
|
// web/static/css/themes.css under [data-theme="<key>"].
|
|
type Theme struct {
|
|
Key string `json:"key"`
|
|
Label string `json:"label"`
|
|
Dark bool `json:"dark"`
|
|
}
|
|
|
|
var Themes = []Theme{
|
|
{"midnight", "Midnight", true},
|
|
{"obsidian", "Obsidian", true},
|
|
{"nord", "Nord", true},
|
|
{"dracula", "Dracula", true},
|
|
{"mocha", "Mocha", true},
|
|
{"rose-pine", "Rosé Pine", true},
|
|
{"gruvbox", "Gruvbox", true},
|
|
{"forest", "Forest", true},
|
|
{"synthwave", "Synthwave", true},
|
|
{"daylight", "Daylight", false},
|
|
{"paper", "Paper", false},
|
|
{"latte", "Latte", false},
|
|
}
|
|
|
|
const DefaultTheme = "midnight"
|
|
|
|
func validTheme(key string) bool {
|
|
for _, t := range Themes {
|
|
if t.Key == key {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|