Initial commit

This commit is contained in:
2020-05-20 10:43:12 +02:00
commit 8ba7b5d492
27 changed files with 1326 additions and 0 deletions

View File

@ -0,0 +1,18 @@
{{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" />
{{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,16 @@
{{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">OIDC Test App</a></h1>
</div>
</div>
</div>
<div class="column">
<div class="buttons is-right">
<a class="button" href="/logout">Logout</a>
</div>
</div>
</div>
{{end}}