Documentation ¶
Index ¶
- Constants
- Variables
- func NewDBFromConfig(db structs.Database) *database.Queries
- func PrefixURL(url, p string) string
- func RenderContent(w http.ResponseWriter, context structs.PageContext, data interface{}, ...) error
- func RenderHTML(value interface{}) template.HTML
- func RenderICal(w http.ResponseWriter, data interface{}, text string) error
- func RenderTemplates(w http.ResponseWriter, context structs.PageContext, data interface{}, ...) error
Constants ¶
View Source
const ( TemplatePrefix = "views" AdminPrefix = "internal" TextPrefix = "text" )
Variables ¶
View Source
var AdminTemplates = []string{
"partials/header.gohtml",
"partials/footer.gohtml",
"elements/adminbar.gohtml",
"partials/base.gohtml",
}
View Source
var BaseTemplates = []string{
"partials/header.gohtml",
"partials/footer.gohtml",
"elements/navbar.gohtml",
"partials/base.gohtml",
}
Functions ¶
func RenderContent ¶
func RenderContent(w http.ResponseWriter, context structs.PageContext, data interface{}, content string) error
func RenderHTML ¶
func RenderICal ¶
func RenderICal(w http.ResponseWriter, data interface{}, text string) error
func RenderTemplates ¶
func RenderTemplates(w http.ResponseWriter, context structs.PageContext, data interface{}, templates ...string) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.