Noah Petherbridge
6d3de7da69
Since most of the `render.Vars{}` fields were hardcoded/not really editable for the templates, apart from .Data, this struct is now locked away in the render subpackage. End http.HandlerFunc's can then make any arbitrary template data structure they want to, available inside the templates as `.Data`.
18 lines
398 B
Plaintext
18 lines
398 B
Plaintext
{{ define "title" }}Not Found{{ end }}
|
|
{{ define "content" }}
|
|
<h1>404 Not Found</h1>
|
|
|
|
{{ .Data.Message }}
|
|
|
|
{{ if .CurrentUser.Admin }}
|
|
<p>
|
|
<strong>Admin:</strong> create a
|
|
<a href="/admin/editor?file={{ .Request.URL.Path }}.md">Markdown</a>
|
|
or
|
|
<a href="/admin/editor?file={{ .Request.URL.Path }}.gohtml">HTML</a>
|
|
page here.
|
|
</p>
|
|
{{ end }}
|
|
|
|
{{ end }}
|