The backend for the AiteStory website
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.6 KiB

package model
import (
"strings"
)
// PageCategory represents a page category
type PageCategory struct {
Key string
Plural string
Icon string
Path 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", "/info/", "Information relevant to RP that might be something looked for in IRC logs"},
{"News", "News", "N", "/news/", "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", "/documents/", "Data files, shadow broker dossiers, and other data that is not inside an item"},
{"Background", "Background", "B", "/background/", "Rumors, suspicious persons, or inter-RP occurences that may be noticed"},
{"Story", "Stories", "S", "/stories/", "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
}
}