From 85920b8c7a2696115d1f77c046f48f6f00d639f1 Mon Sep 17 00:00:00 2001 From: ivar Date: Tue, 7 Apr 2026 00:23:24 +0200 Subject: Init --- templates/admin/error.html | 7 ++++ templates/admin/form.html | 82 +++++++++++++++++++++++++++++++++++++++++++ templates/admin/index.html | 36 +++++++++++++++++++ templates/admin/list.html | 50 ++++++++++++++++++++++++++ templates/admin/settings.html | 20 +++++++++++ templates/admin/setup.html | 47 +++++++++++++++++++++++++ templates/index.html | 47 +++++++++++++++++++++++++ templates/post.html | 47 +++++++++++++++++++++++++ 8 files changed, 336 insertions(+) create mode 100644 templates/admin/error.html create mode 100644 templates/admin/form.html create mode 100644 templates/admin/index.html create mode 100644 templates/admin/list.html create mode 100644 templates/admin/settings.html create mode 100644 templates/admin/setup.html create mode 100644 templates/index.html create mode 100644 templates/post.html (limited to 'templates') diff --git a/templates/admin/error.html b/templates/admin/error.html new file mode 100644 index 0000000..36a4a8a --- /dev/null +++ b/templates/admin/error.html @@ -0,0 +1,7 @@ +{{define "error-content"}} +
+

Error

+

{{.Message}}

+

Go back

+
+{{end}} diff --git a/templates/admin/form.html b/templates/admin/form.html new file mode 100644 index 0000000..133951f --- /dev/null +++ b/templates/admin/form.html @@ -0,0 +1,82 @@ +{{define "form-content"}} +
+ + + + {{if not .IsNew}} + + + {{end}} + + + + + + + + + Cancel +
+ +
+ +{{end}} \ No newline at end of file diff --git a/templates/admin/index.html b/templates/admin/index.html new file mode 100644 index 0000000..decc138 --- /dev/null +++ b/templates/admin/index.html @@ -0,0 +1,36 @@ +{{define "base"}} + + + + + + + Admin — {{.Title}} + + + + + + +
+ {{if eq .ContentTemplate "list-content"}}{{template "list-content" .}}{{end}} + {{if eq .ContentTemplate "form-content"}}{{template "form-content" .}}{{end}} + {{if eq .ContentTemplate "error-content"}}{{template "error-content" .}}{{end}} + {{if eq .ContentTemplate "settings-content"}}{{template "settings-content" .}}{{end}} +
+ + + +{{end}} \ No newline at end of file diff --git a/templates/admin/list.html b/templates/admin/list.html new file mode 100644 index 0000000..8e488b6 --- /dev/null +++ b/templates/admin/list.html @@ -0,0 +1,50 @@ +{{define "list-content"}} +{{if .Posts}} + + + + + + + + + + + + {{range .Posts}} + + + + + + + + {{end}} + +
TittelDatoEmneStatus
{{.Title}}{{.Date}} + {{if .Tags}} +
+ {{range .Tags}}{{.}} {{end}} +
+ {{end}} +
+ {{if .Draft}}Ikke publisert{{else}}Publisert{{end}} + +
+ Rediger + +
+
+{{else}} +
Ingen innlegg
+{{end}} + + +{{end}} \ No newline at end of file diff --git a/templates/admin/settings.html b/templates/admin/settings.html new file mode 100644 index 0000000..fc42ee2 --- /dev/null +++ b/templates/admin/settings.html @@ -0,0 +1,20 @@ +{{define "settings-content"}} +{{if .Success}}

Settings saved.

{{end}} +{{if .Error}}

{{.Error}}

{{end}} +
+ + + + + + + + +

Leave blank to keep the current logo.

+ +
+ + Cancel +
+
+{{end}} diff --git a/templates/admin/setup.html b/templates/admin/setup.html new file mode 100644 index 0000000..4294238 --- /dev/null +++ b/templates/admin/setup.html @@ -0,0 +1,47 @@ +{{define "setup.html"}} + + + + + + Setup + + + + +

Setup

+ {{if .Error}}

{{.Error}}

{{end}} +
+ + + + + + + + + + + + + + + + + + +

Shown on the front page. Leave blank to keep the default.

+ +
+ +
+
+ + +{{end}} diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..00cae5c --- /dev/null +++ b/templates/index.html @@ -0,0 +1,47 @@ +{{define "index.html"}} + + + + + + + {{.SiteTitle}} + + + + + +
+ + + + {{if .ActiveTag}} +

Emne: {{.ActiveTag}} tøm

+ {{end}} + + {{if .Posts}} + + {{else}} +

Dessverre.

+ {{end}} +
+ + + +{{end}} \ No newline at end of file diff --git a/templates/post.html b/templates/post.html new file mode 100644 index 0000000..10c51ee --- /dev/null +++ b/templates/post.html @@ -0,0 +1,47 @@ +{{define "post.html"}} + + + + + + + {{.Title}} + + + {{- range .ComponentScripts}} + + {{- end}} + + + + +
+ + {{.Content}} +
+ + + + + +{{end}} \ No newline at end of file -- cgit v1.3