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"}, // Custom lists hold anything else (sports teams, drinks…); the owner // names the list and adds entries by hand or from Wikipedia. {Key: "custom", Label: "Custom", Singular: "Favorite", Icon: "star", Aspect: "square", SubtitleHint: "Subtitle"}, } 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", }