package main import ( // Internal "notes2/html_template" ) type Page struct { HTMLTemplate.SimplePage Data map[string]any } func NewPage(page string) (p Page) { p.Page = page p.Data = make(map[string]any) return } func (p Page) GetVersion() string { return VERSION } func (p Page) GetLayout() string { if p.Layout == "" { return "main" } return p.Layout } func (p Page) GetData() any { p.Data["_dev"] = FlagDev return p.Data }