Initial commit

This commit is contained in:
2020-04-08 08:56:42 +02:00
commit 3a84d819ff
44 changed files with 1769 additions and 0 deletions

View File

@ -0,0 +1,19 @@
{{define "base"}}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{block "title" . -}}{{- end}}</title>
{{- block "head_style" . -}}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.8.0/css/bulma.min.css" />
<link rel="stylesheet" href="/css/style.css" />
{{end}}
{{- block "head_script" . -}}{{end}}
</head>
<body>
{{- block "body" . -}}{{- end -}}
{{- block "body_script" . -}}{{end}}
</body>
</html>
{{end}}

View File

@ -0,0 +1,23 @@
{{define "flash"}}
<div class="flash has-margin-top-small has-margin-bottom-small">
{{- range .Flashes -}}
{{- if eq .Type "error" -}}
{{template "flash_message" map "Title" "Erreur" "MessageClass" "is-danger" "Message" .Message }}
{{- else if eq .Type "warn" -}}
{{template "flash_message" map "Title" "Attention" "MessageClass" "is-warning" "Message" .Message }}
{{- else if eq .Type "success" -}}
{{template "flash_message" map "Title" "Succès" "MessageClass" "is-success" "Message" .Message }}
{{- else -}}
{{template "flash_message" map "Title" "Information" "MessageClass" "is-info" "Message" .Message }}
{{- end -}}
{{- end -}}
</div>
{{end}}
{{define "flash_message" -}}
<div class="message {{.MessageClass}}">
<div class="message-body">
<span class="has-text-weight-bold">{{.Title}}</span> {{.Message}}
</div>
</div>
{{- end}}

View File

@ -0,0 +1,7 @@
{{define "footer"}}
<p class="has-margin-top-small has-text-right is-size-7 has-text-grey">
Version: {{ .BuildInfo.ProjectVersion }} -
Réf.: {{ .BuildInfo.GitRef }} -
Date de construction: {{ .BuildInfo.BuildDate }}
</p>
{{end}}

View File

@ -0,0 +1,11 @@
{{define "header"}}
<div class="columns is-mobile">
<div class="column is-4-tablet is-8-mobile">
<div class="columns is-mobile is-gapless">
<div class="column is-narrow">
<h1 class="is-size-3 title"><a href="/" rel="Homepage" class="has-text-black">Your project</a></h1>
</div>
</div>
</div>
</div>
{{end}}

View File

@ -0,0 +1,9 @@
{{define "title"}}Consent{{end}}
{{define "body"}}
<section class="home is-fullheight section">
<div class="container">
</div>
</section>
{{end}}
{{template "base" .}}

View File

@ -0,0 +1,20 @@
{{define "title"}}Connexion{{end}}
{{define "body"}}
<section class="hero is-fullheight">
<div class="hero-body">
<div class="container">
<div class="columns">
<div class="column is-4 is-offset-4">
<div class="message is-success">
<div class="message-body">
<p class="title is-size-4">Un message a été envoyé à votre adresse courriel.</p>
<p>Celui ci contient un lien qui vous permettra de vous connecter à l'application.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
{{end}}
{{template "base" .}}

View File

@ -0,0 +1,11 @@
{{define "title"}}Accueil{{end}}
{{define "body"}}
<section class="home is-fullheight section">
<div class="container">
{{template "header" .}}
<h1>Bienvenue !</h1>
{{template "footer" .}}
</div>
</section>
{{end}}
{{template "base" .}}

View File

@ -0,0 +1,33 @@
{{define "title"}}Connexion{{end}}
{{define "body"}}
<section class="hero is-fullheight">
<div class="hero-body">
<div class="container has-text-centered">
<div class="columns">
<div class="column is-4 is-offset-4">
<p class="has-text-black title">
Connexion
</p>
<p class="has-text-black subtitle">
Veuillez entrer votre adresse courriel.
</p>
<div class="box">
<form action="/login" method="POST">
<div class="field">
<div class="control">
<input class="input is-large" type="email"
id="email"
name="email" placeholder="john.doe@email.com" />
</div>
</div>
{{ .csrfField }}
<button type="submit" class="button is-link is-medium is-block is-fullwidth">Envoyer</button>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
{{end}}
{{template "base" .}}