pages.go 2.8 KB

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