6f00348cbc
Conflicts: main.go models.go templates/index.html Saw that some previous modifications were lost due to the previous merge :)
41 lignes
987 o
Go
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
|
|
}
|