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/templateVariables.go
akuma06 6f00348cbc Merge branch 'master' of https://github.com/ewhal/nyaa.git
Conflicts:
	main.go
	models.go
	templates/index.html
Saw that some previous modifications were lost due to the previous merge :)
2017-05-05 05:04:04 +02:00

41 lignes
987 o
Go

package main
import (
"net/url"
"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
*/
type FaqTemplateVariables struct {
URL *url.URL // For parsing Url in templates
Route *mux.Route // For getting current route in templates
Query string
Status string
Category string
Sort string
Order string
Navigation Navigation
}
type HomeTemplateVariables struct {
ListTorrents []TorrentsJson
ListCategories []Categories
Query string
Status string
Category string
Sort string
Order string
Navigation Navigation
URL *url.URL // For parsing Url in templates
Route *mux.Route // For getting current route in templates
}
type Navigation struct {
TotalItem int
MaxItemPerPage int
CurrentPage int
Route string
}