Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Ce dépôt a été archivé le 2022-05-07. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
nyaa-pantsu/router/templateVariables.go

57 lignes
1,6 Kio
Go
Brut Vue normale Historique

package router
import (
2017-05-06 23:16:21 +02:00
"net/url"
"github.com/ewhal/nyaa/model"
2017-05-06 23:16:21 +02:00
"github.com/ewhal/nyaa/templates"
userForms "github.com/ewhal/nyaa/service/user/form"
2017-05-06 10:36:37 +02:00
"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 {
2017-05-06 23:16:21 +02:00
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 {
2017-05-06 10:36:37 +02:00
Torrent model.TorrentsJson
2017-05-06 23:16:21 +02:00
Search templates.SearchForm
Navigation templates.Navigation
2017-05-06 10:36:37 +02:00
URL *url.URL // For parsing Url in templates
Route *mux.Route // For getting current route in templates
}
type UserRegisterTemplateVariables struct {
RegistrationForm userForms.RegistrationForm
Search templates.SearchForm
Navigation templates.Navigation
URL *url.URL // For parsing Url in templates
Route *mux.Route // For getting current route in templates
}
type HomeTemplateVariables struct {
ListTorrents []model.TorrentsJson
ListCategories []model.Categories
2017-05-06 23:16:21 +02:00
Search templates.SearchForm
Navigation templates.Navigation
URL *url.URL // For parsing Url in templates
Route *mux.Route // For getting current route in templates
}
2017-05-06 10:36:37 +02:00
type UploadTemplateVariables struct {
Upload UploadForm
2017-05-06 23:16:21 +02:00
Search templates.SearchForm
Navigation templates.Navigation
2017-05-06 10:36:37 +02:00
URL *url.URL
Route *mux.Route
}