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.

40 lines
1.5 KiB

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