From a5f92beb958125db96b519405fff66bc974c90c3 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Sun, 25 Jun 2017 22:43:43 +0100 Subject: [PATCH] move templates to separate file Former-commit-id: b466ad616c836dc08206cf0b5f706c343fc923f0 --- _assets/templates/base.tmpl | 86 +------------------------------ _assets/templates/templates.tmpl | 87 ++++++++++++++++++++++++++++++++ page.go | 2 + 3 files changed, 90 insertions(+), 85 deletions(-) create mode 100644 _assets/templates/templates.tmpl diff --git a/_assets/templates/base.tmpl b/_assets/templates/base.tmpl index e72a29f6..e56cbae6 100644 --- a/_assets/templates/base.tmpl +++ b/_assets/templates/base.tmpl @@ -198,91 +198,7 @@ {{- end }} - - - - - - - - -
-

Help

- - - -

Not available yet

- - - -
- -
-
+ {{ template "templates" . }} diff --git a/_assets/templates/templates.tmpl b/_assets/templates/templates.tmpl new file mode 100644 index 00000000..33bbabb5 --- /dev/null +++ b/_assets/templates/templates.tmpl @@ -0,0 +1,87 @@ +{{ define "templates" }} + + + + + + + + +
+

Help

+ + + +

Not available yet

+ + + +
+ +
+
+{{ end }} \ No newline at end of file diff --git a/page.go b/page.go index 6a2f0fcc..dec7a0a3 100644 --- a/page.go +++ b/page.go @@ -103,6 +103,8 @@ func (p page) PreviousLink() string { // PrintAsHTML formats the page in HTML and executes the template func (p page) PrintAsHTML(w http.ResponseWriter, m *FileManager, templates ...string) (int, error) { + templates = append(templates, "templates") + if p.minimal { templates = append(templates, "minimal") } else {