Initial TopDeck: self-hosted ranked favorites
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>
This commit is contained in:
commit
e9a75a968a
53 files changed
+7078
No files matched your search
@@ -0,0 +1,51 @@
|
||||
package store
|
||||
|
||||
// Category describes one kind of list. The Key is what's stored in the
|
||||
// database; everything else is presentation.
|
||||
type Category struct {
|
||||
Key string `json:"key"`
|
||||
Label string `json:"label"` // plural, e.g. "Movies"
|
||||
Singular string `json:"singular"` // e.g. "Movie"
|
||||
Icon string `json:"icon"` // name of an inline SVG icon
|
||||
Aspect string `json:"aspect"` // "poster" (2:3) or "square" (1:1)
|
||||
// SubtitleHint labels the free-text subtitle field in the editor.
|
||||
SubtitleHint string `json:"subtitleHint"`
|
||||
}
|
||||
|
||||
var Categories = []Category{
|
||||
{Key: "movie", Label: "Movies", Singular: "Movie", Icon: "film", Aspect: "poster", SubtitleHint: "Director"},
|
||||
{Key: "tv", Label: "TV Shows", Singular: "TV Show", Icon: "tv", Aspect: "poster", SubtitleHint: "Network"},
|
||||
{Key: "album", Label: "Albums", Singular: "Album", Icon: "disc", Aspect: "square", SubtitleHint: "Artist"},
|
||||
{Key: "song", Label: "Songs", Singular: "Song", Icon: "music", Aspect: "square", SubtitleHint: "Artist"},
|
||||
{Key: "game", Label: "Video Games", Singular: "Video Game", Icon: "gamepad", Aspect: "poster", SubtitleHint: "Developer"},
|
||||
{Key: "theater", Label: "Theater", Singular: "Show", Icon: "masks", Aspect: "poster", SubtitleHint: "Creators"},
|
||||
}
|
||||
|
||||
func CategoryByKey(key string) (Category, bool) {
|
||||
for _, c := range Categories {
|
||||
if c.Key == key {
|
||||
return c, true
|
||||
}
|
||||
}
|
||||
return Category{}, false
|
||||
}
|
||||
|
||||
// TheaterProductions are the suggested production labels for theater items.
|
||||
// The owner can also type anything else.
|
||||
var TheaterProductions = []string{
|
||||
"Broadway",
|
||||
"Broadway Revival",
|
||||
"Off-Broadway",
|
||||
"West End",
|
||||
"West End Revival",
|
||||
"Off-West End",
|
||||
"North American Tour",
|
||||
"US National Tour",
|
||||
"UK & Ireland Tour",
|
||||
"Australian Production",
|
||||
"International Tour",
|
||||
"Regional",
|
||||
"Concert / Staged Reading",
|
||||
"Filmed / Pro-shot",
|
||||
"Original Cast Recording",
|
||||
}
|
||||
Reference in new issue
Block a user