pages.go 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. // Copyright 2015 The Gogs Authors. All rights reserved.
  2. // Copyright 2018 Gitote. All rights reserved.
  3. //
  4. // This source code is licensed under the MIT license found in the
  5. // LICENSE file in the root directory of this source tree.
  6. package pages
  7. import (
  8. "gitote/gitote/pkg/context"
  9. )
  10. const (
  11. // AboutTPL page template
  12. AboutTPL = "pages/about"
  13. // FaqTPL page template
  14. FaqTPL = "pages/faq"
  15. // PrivacyTPL page template
  16. PrivacyTPL = "pages/privacy"
  17. // TosTPL page template
  18. TosTPL = "pages/tos"
  19. // BrandTPL page template
  20. BrandTPL = "pages/brand"
  21. // ContactTPL page template
  22. ContactTPL = "pages/contact"
  23. // ContributeTPL page template
  24. ContributeTPL = "pages/contribute"
  25. // SecurityTPL page template
  26. SecurityTPL = "pages/security"
  27. // VerifiedTPL page template
  28. VerifiedTPL = "pages/verified"
  29. // MakersTPL page template
  30. MakersTPL = "pages/makers"
  31. // HelpTPL page template
  32. HelpTPL = "pages/help"
  33. // FeaturesTPL page template
  34. FeaturesTPL = "pages/features"
  35. // FeatureRequestTPL page template
  36. FeatureRequestTPL = "pages/request"
  37. // SponsorshipTPL page template
  38. SponsorshipTPL = "pages/sponsorship"
  39. // SponsorsTPL page template
  40. SponsorsTPL = "pages/sponsors"
  41. // SitemapTPL page template
  42. SitemapTPL = "pages/sitemap"
  43. )
  44. // About shows about page
  45. func About(c *context.Context) {
  46. c.Data["Title"] = "About"
  47. c.HTML(200, AboutTPL)
  48. }
  49. // Faq shows faq page
  50. func Faq(c *context.Context) {
  51. c.Data["Title"] = "FAQ"
  52. c.HTML(200, FaqTPL)
  53. }
  54. // Privacy shows privacy page
  55. func Privacy(c *context.Context) {
  56. c.Data["Title"] = "Privacy Policy"
  57. c.HTML(200, PrivacyTPL)
  58. }
  59. // Tos shows tos page
  60. func Tos(c *context.Context) {
  61. c.Data["Title"] = "Terms of Service"
  62. c.HTML(200, TosTPL)
  63. }
  64. // Brand shows brand page
  65. func Brand(c *context.Context) {
  66. c.Data["Title"] = "Gitote Brand"
  67. c.HTML(200, BrandTPL)
  68. }
  69. // Contribute shows contribute page
  70. func Contribute(c *context.Context) {
  71. c.Data["PageIsContribute"] = true
  72. c.Data["Title"] = "Contribute"
  73. c.HTML(200, ContributeTPL)
  74. }
  75. // Security shows security page
  76. func Security(c *context.Context) {
  77. c.Data["Title"] = "Security"
  78. c.HTML(200, SecurityTPL)
  79. }
  80. // Verified shows verified page
  81. func Verified(c *context.Context) {
  82. c.Data["Title"] = "Verified"
  83. c.HTML(200, VerifiedTPL)
  84. }
  85. // Makers shows maker page
  86. func Makers(c *context.Context) {
  87. c.Data["Title"] = "Makers"
  88. c.HTML(200, MakersTPL)
  89. }
  90. // Help shows help page
  91. func Help(c *context.Context) {
  92. c.Data["Title"] = "Help"
  93. c.Data["PageIsHelp"] = true
  94. c.HTML(200, HelpTPL)
  95. }
  96. // Contact shows contact page
  97. func Contact(c *context.Context) {
  98. c.Data["Title"] = "Contact"
  99. c.HTML(200, ContactTPL)
  100. }
  101. // Features shows features page
  102. func Features(c *context.Context) {
  103. c.Data["Title"] = "Features"
  104. c.Data["PageIsFeatures"] = true
  105. c.HTML(200, FeaturesTPL)
  106. }
  107. // FeatureRequest shows feature request page
  108. func FeatureRequest(c *context.Context) {
  109. c.Data["Title"] = "Feature Request"
  110. c.HTML(200, FeatureRequestTPL)
  111. }
  112. // Sponsorship shows sponsorship page
  113. func Sponsorship(c *context.Context) {
  114. c.Data["Title"] = "Sponsorship"
  115. c.HTML(200, SponsorshipTPL)
  116. }
  117. // Sponsors shows sponsorship page
  118. func Sponsors(c *context.Context) {
  119. c.Data["Title"] = "Sponsorship"
  120. c.HTML(200, SponsorsTPL)
  121. }