Got cool stuff working
This commit is contained in:
12
templates/errors.gohtml
Normal file
12
templates/errors.gohtml
Normal file
@@ -0,0 +1,12 @@
|
||||
{{- /*gotype: main.ErrorVM*/}}
|
||||
{{define "errors"}}
|
||||
{{template "header" .StatusCode | statusText}}
|
||||
|
||||
<ul>
|
||||
{{range .Errors}}
|
||||
<li>{{.}}</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
|
||||
{{template "footer"}}
|
||||
{{end}}
|
||||
4
templates/footer.gohtml
Normal file
4
templates/footer.gohtml
Normal file
@@ -0,0 +1,4 @@
|
||||
{{define "footer"}}
|
||||
</body>
|
||||
</html>
|
||||
{{end}}
|
||||
14
templates/header.gohtml
Normal file
14
templates/header.gohtml
Normal file
@@ -0,0 +1,14 @@
|
||||
{{define "header"}}
|
||||
<html>
|
||||
<head>
|
||||
<title>PC Inventory - {{.}}</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>PC Inventory - <i>{{.}}</i></h1>
|
||||
<form action="/device" method="get">
|
||||
<label for="id">Device ID:</label>
|
||||
<input type="text" id="id" name="id">
|
||||
<button type="submit">Search</button>
|
||||
</form>
|
||||
<hr>
|
||||
{{end}}
|
||||
9
templates/index.gohtml
Normal file
9
templates/index.gohtml
Normal file
@@ -0,0 +1,9 @@
|
||||
{{- /*gotype: main.IndexVM */}}
|
||||
{{define "index"}}
|
||||
{{template "header" "wow"}}
|
||||
Some statistics:
|
||||
<ul>
|
||||
<li>Database contains {{.AssetCount}} assets.</li>
|
||||
</ul>
|
||||
{{template "footer"}}
|
||||
{{end}}
|
||||
Reference in New Issue
Block a user