diff --git a/page/page.go b/page/page.go index 585b7c61..c8be31cc 100644 --- a/page/page.go +++ b/page/page.go @@ -25,7 +25,7 @@ type Page struct { // Render the page func (p *Page) Render(w http.ResponseWriter, templates ...string) (int, error) { - templates = append(templates, "header", "footer") + templates = append(templates, "base_full") var tpl *template.Template for i, t := range templates { diff --git a/templates/header.tmpl b/templates/base_full.tmpl similarity index 92% rename from templates/header.tmpl rename to templates/base_full.tmpl index e94b6ea1..8ffdf5d0 100644 --- a/templates/header.tmpl +++ b/templates/base_full.tmpl @@ -1,4 +1,3 @@ -{{ define "header" }} @@ -21,4 +20,9 @@ -{{ end }} + +{{ template "content" . }} + + + + diff --git a/templates/base_minimal.tmpl b/templates/base_minimal.tmpl new file mode 100644 index 00000000..66e0068d --- /dev/null +++ b/templates/base_minimal.tmpl @@ -0,0 +1 @@ +{{ template "content" . }} diff --git a/templates/footer.tmpl b/templates/footer.tmpl deleted file mode 100644 index e2692fc3..00000000 --- a/templates/footer.tmpl +++ /dev/null @@ -1,5 +0,0 @@ -{{ define "footer" }} - - - -{{ end }} diff --git a/templates/settings.tmpl b/templates/settings.tmpl index de3b9419..7dc8c79f 100644 --- a/templates/settings.tmpl +++ b/templates/settings.tmpl @@ -1,4 +1,4 @@ -{{ template "header" . }} +{{ define "content" }} {{ with .Body }}
@@ -9,4 +9,4 @@
{{ end }} -{{ template "footer" . }} +{{ end }}