add templates for kontor-gin
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 6s

This commit is contained in:
Thomas Peetz
2026-09-21 19:55:46 +02:00
parent 652aa3005b
commit f2f4a0aaf6
28 changed files with 787 additions and 41 deletions
+3
View File
@@ -0,0 +1,3 @@
{{ define "footer.tmpl" }}
<div class="footer">{{ .version }}</div>
{{end}}
+14
View File
@@ -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 }}
+12
View File
@@ -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>
+40
View File
@@ -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>
+12
View File
@@ -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 }}
+8
View File
@@ -0,0 +1,8 @@
package templates
import (
"embed"
)
//go:embed html/*
var TemplateFiles embed.FS