just link home on error page instead of showing full navbar
This commit is contained in:
parent
85fcd94bfa
commit
ae1606081f
2 changed files with 19 additions and 1 deletions
|
@ -41,7 +41,7 @@ func main() {
|
||||||
},
|
},
|
||||||
Fallback: *template.Must(template.ParseFiles(
|
Fallback: *template.Must(template.ParseFiles(
|
||||||
pathConcat(templateRoot, "error.html"),
|
pathConcat(templateRoot, "error.html"),
|
||||||
pathConcat(templateRoot, "header.html"),
|
pathConcat(templateRoot, "header_err.html"),
|
||||||
pathConcat(templateRoot, "footer.html"))),
|
pathConcat(templateRoot, "footer.html"))),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
18
templates/header_err.html
Normal file
18
templates/header_err.html
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
{{define "header"}}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang='en'>
|
||||||
|
<head>
|
||||||
|
<meta charset='utf-8'>
|
||||||
|
<meta name='description' content='Nirvash CMS'/>
|
||||||
|
<meta name='viewport' content='width=device-width,initial-scale=1'>
|
||||||
|
<link rel='stylesheet' type='text/css' href='/static/style.css'>
|
||||||
|
<title>Nirvash — CMS</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header><h1>Nirvash CMS</h1></header>
|
||||||
|
<nav>
|
||||||
|
<ul>
|
||||||
|
<li><a href="/">Go home</a></li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
{{end}}
|
Loading…
Reference in a new issue