|
|
package model
import ( "strings" )
// PageCategory represents a page category
type PageCategory struct { Key string Plural string Icon string Info string }
// URLRoot is the "folder" used for searching within the category
func (category *PageCategory) URLRoot() string { return strings.ToLower(category.Plural) }
// PageCategories are used by the view model and page to enforce
// a limited selection of categories. I may move it to a configuration
// or the database, but for now I think this list is pretty fixed
var PageCategories = []PageCategory{ //{"OoC", "OoC", "O", "OoC content is for announcements, scheduling, general information, or anything that is not in-universe"},
{"Info", "Info", "i", "Information relevant to RP that might be something looked for in IRC logs"}, {"News", "News", "N", "News stories that might be pertinent to ongoing plots"}, //{"Item", "Items", "I", "Items relevant to plots, that is more than just a document saved on a character's own omni-tool"},
{"Document", "Documents", "D", "Data files, shadow broker dossiers, and other data that is not inside an item"}, {"Background", "Background", "B", "Rumors, suspicious persons, or inter-RP occurences that may be noticed"}, {"Story", "Stories", "S", "Background stories and inter-RP character intearactions"}, } var pageCategories []string
// init setups pageCategories
func init() { pageCategories = make([]string, len(PageCategories)) for i, category := range PageCategories { pageCategories[i] = category.Key } }
|