more updates

Former-commit-id: 8c19eda25f
This commit is contained in:
Henrique Dias
2017-06-19 18:23:57 +01:00
parent 8d4981fcb8
commit bd7184d5df
16 changed files with 79 additions and 83 deletions

11
page.go
View File

@@ -11,6 +11,15 @@ import (
"strings"
)
// Create the functions map, then the template, check for erros and
// execute the template if there aren't errors
var functionMap = template.FuncMap{
"Defined": defined,
"CSS": css,
"Marshal": marshal,
"EncodeBase64": encodeBase64,
}
// page contains the informations and functions needed to show the Page
type page struct {
Info *pageInfo
@@ -23,7 +32,7 @@ type pageInfo struct {
Path string
IsDir bool
User *User
Config *Config
Config *FileManager
Data interface{}
Editor bool
Display string