This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
{{ define "footer.tmpl" }}
|
||||
<div class="footer">{{ .version }}</div>
|
||||
{{end}}
|
||||
@@ -0,0 +1,14 @@
|
||||
{{ define "header.tmpl" }}
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link
|
||||
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css"
|
||||
rel="stylesheet"
|
||||
integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl"
|
||||
crossorigin="anonymous"
|
||||
/>
|
||||
<link rel="stylesheet" href="/public/style/main.css" />
|
||||
<title>{{ .title }}</title>
|
||||
</head>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,12 @@
|
||||
<!doctype html>
|
||||
<html lang="de-DE">
|
||||
{{ template "header.tmpl" . }}
|
||||
|
||||
<body>
|
||||
<div class="header"></div>
|
||||
{{ template "navbar.tmpl" . }}
|
||||
<div class="content">{{ .title }}</div>
|
||||
|
||||
{{ template "footer.tmpl" . }}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,40 @@
|
||||
<!doctype html>
|
||||
<html lang="de-DE">
|
||||
{{ template "header.tmpl" . }}
|
||||
|
||||
<body>
|
||||
<div class="header"></div>
|
||||
{{ template "navbar.tmpl" . }}
|
||||
|
||||
<div class="content">
|
||||
<form action="/auth/login" method="post">
|
||||
|
||||
<div class="container" style="border: 1px solid lightgray; border-radius: 3px; padding: 15px;">
|
||||
|
||||
{{ if .content }}
|
||||
<div class="notification is-danger">{{ .content }}</div>
|
||||
{{ end}}
|
||||
|
||||
<div class="field">
|
||||
<label class="label">Username</label>
|
||||
<div class="control">
|
||||
<input class="input" type="text" placeholder="Enter Username" name="username" required/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label">Passwort</label>
|
||||
<div class="control">
|
||||
<input class="input" type="password" placeholder="Enter Password" name="password" required/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<button class="button is-link">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{{ template "footer.tmpl" . }}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,12 @@
|
||||
{{ define "navbar.tmpl" }}
|
||||
<div class="topnav">
|
||||
<a href="/">Kontor</a>
|
||||
<a href="/comic/comics">Comics</a>
|
||||
<a href="/media/files">Media</a>
|
||||
{{ if .user }}
|
||||
<a style="float:right" href="/auth/logout/">Logout</a></li>
|
||||
{{ else }}
|
||||
<a style="float:right" href="/auth/login/">Login</a></li>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,8 @@
|
||||
package templates
|
||||
|
||||
import (
|
||||
"embed"
|
||||
)
|
||||
|
||||
//go:embed html/*
|
||||
var TemplateFiles embed.FS
|
||||
Reference in New Issue
Block a user