pages.go 2.0 KB

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