37 lines
645 B
Go
37 lines
645 B
Go
package config
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
var base = []string{
|
|
"templates/baseof.html",
|
|
"templates/_partials/head.html",
|
|
"templates/_partials/header.html",
|
|
"templates/_partials/footer.html",
|
|
}
|
|
|
|
var ViewMap = map[string][]string{
|
|
"login-page": append(
|
|
base,
|
|
"templates/login.html",
|
|
"templates/login-page.html",
|
|
),
|
|
|
|
"index-page": append(
|
|
base,
|
|
"templates/index.html",
|
|
"templates/index-page.html",
|
|
),
|
|
}
|
|
|
|
var FuncMap = map[string]any{
|
|
"uppercase": func(s string) string { return strings.ToUpper(s) },
|
|
"firstWord": func(s string) string {
|
|
words := strings.Fields(s)
|
|
if len(words) > 0 {
|
|
return words[0]
|
|
}
|
|
return ""
|
|
},
|
|
}
|