Combine error templates.
This commit is contained in:
parent
3a9f0d1879
commit
58e75cf7a6
8 changed files with 24 additions and 18 deletions
11
views/pages/error.gohtml
Normal file
11
views/pages/error.gohtml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{{define "content"}}
|
||||
{{if gt .StatusCode 500}}
|
||||
<p>Please try again. Request ID: {{.RequestID}}</p>
|
||||
{{else if or (eq .StatusCode 403) (eq .StatusCode 401)}}
|
||||
<p>You are not authorized to view the requested page.</p>
|
||||
{{else if eq .StatusCode 404}}
|
||||
<p>Click {{link (call .Reverse "home") "here" .Path}} to return home</p>
|
||||
{{else}}
|
||||
<p>Something went wrong</p>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{{define "content"}}
|
||||
<p>Click {{link (call .Reverse "home") "here" .Path}} to return home</p>
|
||||
{{end}}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
{{define "content"}}
|
||||
<p>Please try again</p>
|
||||
{{end}}
|
||||
|
|
@ -1,15 +1,15 @@
|
|||
{{define "content"}}
|
||||
<form method="post">
|
||||
<div class="field">
|
||||
<label for="" class="label">Username</label>
|
||||
<label for="username" class="label">Username</label>
|
||||
<div class="control">
|
||||
<input type="textfield" name="username" class="input" value="{{.Data.Username}}" required>
|
||||
<input type="text" id="username" name="username" class="input" value="{{.Data.Username}}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="" class="label">Password</label>
|
||||
<label for="password" class="label">Password</label>
|
||||
<div class="control">
|
||||
<input type="password" name="password" placeholder="*******" class="input" required>
|
||||
<input type="password" id="password" name="password" placeholder="*******" class="input" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field is-grouped">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue