package router
import (
"net/url"
"github.com/ewhal/nyaa/model"
"github.com/ewhal/nyaa/templates"
userForms "github.com/ewhal/nyaa/service/user/form"
"github.com/gorilla/mux"
)
/* Each Page should have an object to pass to their own template
* Therefore, we put them in a separate file for better maintenance
*
* MAIN Template Variables
*/
type FaqTemplateVariables struct {
Navigation templates.Navigation
Search templates.SearchForm
URL *url.URL // For parsing Url in templates
Route *mux.Route // For getting current route in templates
}
type ViewTemplateVariables struct {
Torrent model.TorrentsJson
type UserRegisterTemplateVariables struct {
RegistrationForm userForms.RegistrationForm
type HomeTemplateVariables struct {
ListTorrents []model.TorrentsJson
ListCategories []model.Categories
type UploadTemplateVariables struct {
Upload UploadForm
URL *url.URL
Route *mux.Route