diff options
author | Alex Auvolat <alex@adnab.me> | 2020-02-09 16:46:26 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-02-09 16:46:26 +0100 |
commit | ebb7553cc87b5a2504edc8e06ee12375fd925029 (patch) | |
tree | 83b17cb90ed9e631a8056a26e6a09334a747e68f /templates | |
parent | 3fe43f85aefedc6223aee45171df483e2f57c381 (diff) | |
download | guichet-ebb7553cc87b5a2504edc8e06ee12375fd925029.tar.gz guichet-ebb7553cc87b5a2504edc8e06ee12375fd925029.zip |
Implement logout
Diffstat (limited to 'templates')
-rw-r--r-- | templates/home.html | 15 | ||||
-rw-r--r-- | templates/layout.html | 10 | ||||
-rw-r--r-- | templates/login.html | 21 |
3 files changed, 35 insertions, 11 deletions
diff --git a/templates/home.html b/templates/home.html index 0b39e11..6a11af3 100644 --- a/templates/home.html +++ b/templates/home.html @@ -1,7 +1,18 @@ {{define "title"}}Guichet{{end}} {{define "body"}} -<h1>Guichet</h1> +<div class="alert alert-success"> + Bienvenue, <strong>{{ .Username }}</strong> ! +</div> + +<div class="card"> + <div class="card-header"> + Gérer mon compte + </div> + <div class="list-group list-group-flush"> + <a class="list-group-item list-group-item-action" href="/">Test</a> + <a class="list-group-item list-group-item-action" href="/logout">Se déconnecter</a> + </div> +</div> -Welcome, {{ .Username }}! {{end}} diff --git a/templates/layout.html b/templates/layout.html index 28cd262..5f4a315 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -2,12 +2,16 @@ <html> <head> <meta charset="utf-8"> - <title>{{template "title"}}</title> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <link rel="stylesheet" href="/static/css/bootstrap.min.css"> - <link rel="stylesheet" href="/static/css/main.css"> + + <title>{{template "title"}} Guichet</title> </head> <body> - <div id="contents"> + <div class="container"> + <h1>Guichet Deuxfleurs💮💮</h1> + <hr /> {{template "body" .}} </div> </body> diff --git a/templates/login.html b/templates/login.html index 80642ea..0801884 100644 --- a/templates/login.html +++ b/templates/login.html @@ -1,12 +1,21 @@ -{{define "title"}}Log in{{end}} +{{define "title"}}{{end}} {{define "body"}} -<h1>Log in</h1> <form method="POST"> - <div>{{ .ErrorMessage }}</div> - Username: <input type="text" name="username" value="{{ .Username }}" /><br /> - Password: <input type="password" name="password" /><br /> - <input type="submit" value="log in"> + {{if .ErrorMessage}} + <div class="alert alert-danger">Impossible de se connecter. + <div style="font-size: 0.8em">{{ .ErrorMessage }}</div> + </div> + {{end}} + <div class="form-group"> + <label for="username">Nom d'utilisateur:</label> + <input type="text" name="username" id="username" class="form-control" value="{{ .Username }}" /> + </div> + <div class="form-group"> + <label for="password">Mot de passe:</label> + <input type="password" name="password" id="password" class="form-control" /> + </div> + <button type="submit" class="btn btn-primary">Se connecter</button> </form> {{end}} |