pages.go 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. package pages
  2. import (
  3. "gitote/gitote/pkg/context"
  4. )
  5. const (
  6. ABOUT = "pages/about"
  7. FAQ = "pages/faq"
  8. PRIVACY = "pages/privacy"
  9. TOS = "pages/tos"
  10. BRAND = "pages/brand"
  11. CONTACT = "pages/contact"
  12. CONTRIBUTE = "pages/contribute"
  13. SECURITY = "pages/security"
  14. VERIFIED = "pages/verified"
  15. MAKERS = "pages/makers"
  16. HELP = "pages/help"
  17. FEATURES = "pages/features"
  18. FEATUREREQUEST = "pages/request"
  19. SPONSORSHIP = "pages/sponsorship"
  20. SITEMAP = "pages/sitemap"
  21. DONATE = "pages/donate"
  22. )
  23. func About(c *context.Context) {
  24. c.Data["Title"] = "About"
  25. c.HTML(200, ABOUT)
  26. }
  27. func Faq(c *context.Context) {
  28. c.Data["Title"] = "FAQ"
  29. c.HTML(200, FAQ)
  30. }
  31. func Privacy(c *context.Context) {
  32. c.Data["Title"] = "Privacy Policy"
  33. c.HTML(200, PRIVACY)
  34. }
  35. func Tos(c *context.Context) {
  36. c.Data["Title"] = "Terms of Service"
  37. c.HTML(200, TOS)
  38. }
  39. func Brand(c *context.Context) {
  40. c.Data["Title"] = "Gitote Brand"
  41. c.HTML(200, BRAND)
  42. }
  43. func Contribute(c *context.Context) {
  44. c.Data["PageIsContribute"] = true
  45. c.Data["Title"] = "Contribute"
  46. c.HTML(200, CONTRIBUTE)
  47. }
  48. func Security(c *context.Context) {
  49. c.Data["Title"] = "Security"
  50. c.HTML(200, SECURITY)
  51. }
  52. func Verified(c *context.Context) {
  53. c.Data["Title"] = "Verified"
  54. c.HTML(200, VERIFIED)
  55. }
  56. func Makers(c *context.Context) {
  57. c.Data["Title"] = "Makers"
  58. c.HTML(200, MAKERS)
  59. }
  60. func Help(c *context.Context) {
  61. c.Data["Title"] = "Help"
  62. c.Data["PageIsHelp"] = true
  63. c.HTML(200, HELP)
  64. }
  65. func Contact(c *context.Context) {
  66. c.Data["Title"] = "Contact"
  67. c.HTML(200, CONTACT)
  68. }
  69. func Features(c *context.Context) {
  70. c.Data["Title"] = "Features"
  71. c.Data["PageIsFeatures"] = true
  72. c.HTML(200, FEATURES)
  73. }
  74. func FeatureRequest(c *context.Context) {
  75. c.Data["Title"] = "Feature Request"
  76. c.HTML(200, FEATUREREQUEST)
  77. }
  78. func Sponsorship(c *context.Context) {
  79. c.Data["Title"] = "Sponsorship"
  80. c.HTML(200, SPONSORSHIP)
  81. }
  82. func Donate(c *context.Context) {
  83. c.Data["Title"] = "Donate"
  84. c.HTML(200, DONATE)
  85. }