pages.go 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. // Copyright 2015 - Present, The Gogs Authors. All rights reserved.
  2. // Copyright 2018 - Present, 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. // HelpTPL page template
  30. HelpTPL = "pages/help"
  31. )
  32. // About shows about page
  33. func About(c *context.Context) {
  34. c.Data["Title"] = "About"
  35. c.HTML(200, AboutTPL)
  36. }
  37. // Faq shows faq page
  38. func Faq(c *context.Context) {
  39. c.Data["Title"] = "FAQ"
  40. c.HTML(200, FaqTPL)
  41. }
  42. // Privacy shows privacy page
  43. func Privacy(c *context.Context) {
  44. c.Data["Title"] = "Privacy Policy"
  45. c.HTML(200, PrivacyTPL)
  46. }
  47. // Tos shows tos page
  48. func Tos(c *context.Context) {
  49. c.Data["Title"] = "Terms of Service"
  50. c.HTML(200, TosTPL)
  51. }
  52. // Brand shows brand page
  53. func Brand(c *context.Context) {
  54. c.Data["Title"] = "Gitote Brand"
  55. c.HTML(200, BrandTPL)
  56. }
  57. // Contribute shows contribute page
  58. func Contribute(c *context.Context) {
  59. c.Data["PageIsContribute"] = true
  60. c.Data["Title"] = "Contribute"
  61. c.HTML(200, ContributeTPL)
  62. }
  63. // Security shows security page
  64. func Security(c *context.Context) {
  65. c.Data["Title"] = "Security"
  66. c.HTML(200, SecurityTPL)
  67. }
  68. // Verified shows verified page
  69. func Verified(c *context.Context) {
  70. c.Data["Title"] = "Verified"
  71. c.HTML(200, VerifiedTPL)
  72. }
  73. // Help shows help page
  74. func Help(c *context.Context) {
  75. c.Data["Title"] = "Help"
  76. c.Data["PageIsHelp"] = true
  77. c.HTML(200, HelpTPL)
  78. }
  79. // Contact shows contact page
  80. func Contact(c *context.Context) {
  81. c.Data["Title"] = "Contact"
  82. c.HTML(200, ContactTPL)
  83. }