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

  1. package model
  2. import (
  3. "strings"
  4. )
  5. // PageCategory represents a page category
  6. type PageCategory struct {
  7. Key string
  8. Plural string
  9. Icon string
  10. Path string
  11. Info string
  12. }
  13. // URLRoot is the "folder" used for searching within the category
  14. func (category *PageCategory) URLRoot() string {
  15. return strings.ToLower(category.Plural)
  16. }
  17. // PageCategories are used by the view model and page to enforce
  18. // a limited selection of categories. I may move it to a configuration
  19. // or the database, but for now I think this list is pretty fixed
  20. var PageCategories = []PageCategory{
  21. //{"OoC", "OoC", "O", "OoC content is for announcements, scheduling, general information, or anything that is not in-universe"},
  22. {"Info", "Info", "i", "/info/", "Information relevant to RP that might be something looked for in IRC logs"},
  23. {"News", "News", "N", "/news/", "News stories that might be pertinent to ongoing plots"},
  24. //{"Item", "Items", "I", "Items relevant to plots, that is more than just a document saved on a character's own omni-tool"},
  25. {"Document", "Documents", "D", "/documents/", "Data files, shadow broker dossiers, and other data that is not inside an item"},
  26. {"Background", "Background", "B", "/background/", "Rumors, suspicious persons, or inter-RP occurences that may be noticed"},
  27. {"Story", "Stories", "S", "/stories/", "Background stories and inter-RP character intearactions"},
  28. }
  29. var pageCategories []string
  30. // init setups pageCategories
  31. func init() {
  32. pageCategories = make([]string, len(PageCategories))
  33. for i, category := range PageCategories {
  34. pageCategories[i] = category.Key
  35. }
  36. }