// Copyright 2015 - Present, The Gogs Authors. All rights reserved.
// Copyright 2018 - Present, Gitote. All rights reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.

package pages

import (
	"gitote/gitote/pkg/context"
)

const (
	// AboutTPL page template
	AboutTPL = "pages/about"

	// FaqTPL page template
	FaqTPL = "pages/faq"

	// PrivacyTPL page template
	PrivacyTPL = "pages/privacy"

	// TosTPL page template
	TosTPL = "pages/tos"

	// ContributeTPL page template
	ContributeTPL = "pages/contribute"

	// SecurityTPL page template
	SecurityTPL = "pages/security"

	// VerifiedTPL page template
	VerifiedTPL = "pages/verified"

	// HelpTPL page template
	HelpTPL = "pages/help"
)

// About shows about page
func About(c *context.Context) {
	c.Data["Title"] = "About"

	c.HTML(200, AboutTPL)
}

// Faq shows faq page
func Faq(c *context.Context) {
	c.Data["Title"] = "FAQ"

	c.HTML(200, FaqTPL)
}

// Privacy shows privacy page
func Privacy(c *context.Context) {
	c.Data["Title"] = "Privacy Policy"

	c.HTML(200, PrivacyTPL)
}

// Tos shows tos page
func Tos(c *context.Context) {
	c.Data["Title"] = "Terms of Service"

	c.HTML(200, TosTPL)
}

// Contribute shows contribute page
func Contribute(c *context.Context) {
	c.Data["PageIsContribute"] = true
	c.Data["Title"] = "Contribute"

	c.HTML(200, ContributeTPL)
}

// Security shows security page
func Security(c *context.Context) {
	c.Data["Title"] = "Security"

	c.HTML(200, SecurityTPL)
}

// Verified shows verified page
func Verified(c *context.Context) {
	c.Data["Title"] = "Verified"

	c.HTML(200, VerifiedTPL)
}

// Help shows help page
func Help(c *context.Context) {
	c.Data["Title"] = "Help"
	c.Data["PageIsHelp"] = true

	c.HTML(200, HelpTPL)
}
