Implement login flow
This commit is contained in:
parent
027ed72fdc
commit
c0e9e88dba
7 changed files with 624 additions and 95 deletions
10
templates/base.html
Normal file
10
templates/base.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{ define "base" }}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head><title>{{ .Title }}</title></head>
|
||||
<body>
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ template "content" . }}
|
||||
</body>
|
||||
</html>
|
||||
{{ end }}
|
12
templates/login.html
Normal file
12
templates/login.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{{ define "content" }}
|
||||
<form method="post">
|
||||
{{ .csrfField }}
|
||||
{{ if .errors.Email }}<p>{{ .errors.Email }}</p>{{ end }}
|
||||
<label for="email">{{ .LabelEmail }}</label>
|
||||
<input type="text" id="email" name="email" value="{{ .Email }}"/><br/>
|
||||
{{ if .errors.Password }}<p>{{ .errors.Password }}</p>{{ end }}
|
||||
<label for="password">{{ .LabelPassword }}</label>
|
||||
<input type="password" id="password" name="password" value=""/><br/>
|
||||
<button type="submit">{{ .LabelLogin }}</button>
|
||||
</form>
|
||||
{{ end }}
|
Reference in a new issue