aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/base/base.gohtml5
-rw-r--r--templates/page/404.gohtml24
-rw-r--r--templates/page/custom_page.gohtml2
-rw-r--r--templates/page/index.gohtml2
-rw-r--r--templates/page/legal.gohtml11
-rw-r--r--templates/page/now.gohtml23
-rw-r--r--templates/page/tags.gohtml18
7 files changed, 60 insertions, 25 deletions
diff --git a/templates/base/base.gohtml b/templates/base/base.gohtml
index 34d5451..894685b 100644
--- a/templates/base/base.gohtml
+++ b/templates/base/base.gohtml
@@ -1,4 +1,5 @@
{{define "base"}}
+ {{ $notRoot := ne .SEO.URL "/" }}
<!doctype html>
<html lang="fr" prefix="og: https://ogp.me/ns#">
<head>
@@ -20,7 +21,7 @@
</style>
<link rel="stylesheet" href="{{getAssetPath "styles.css"}}" />
{{template "opengraph-base" .SEO}}
- {{ if .Data.IsCustomPage }}
+ {{ if $notRoot }}
<style>
.links { {{ .Data.Color.Button.GetBackground }}{{ .Data.Color.Button.GetTextColor }} }
</style>
@@ -36,7 +37,7 @@
</div>
{{ $rings := getRings }}
{{ if ne $rings nil }}
- <div class="rings {{ if ne .SEO.URL "/" }}fixed{{ end }}">
+ <div class="rings {{ if $notRoot }}fixed{{ end }}">
{{ range $ring := $rings }}
<a href="{{ $ring.Link }}" target="_blank" class="ring">
<img src="{{ getImage $ring.Image }}" alt="{{ $ring.Name }} logo">
diff --git a/templates/page/404.gohtml b/templates/page/404.gohtml
new file mode 100644
index 0000000..76f9128
--- /dev/null
+++ b/templates/page/404.gohtml
@@ -0,0 +1,24 @@
+{{define "body"}}
+ <main style="{{ .GetBackground }}">
+ <div class="header">
+ <h1 class="header__title">404 - Not found</h1>
+ <nav>
+ <a href="/">Home</a>
+ </nav>
+ </div>
+ <p>
+ Oh no, you are lost. Do you need help?
+ </p>
+ <nav class="links" style="{{ .Color.Button.GetBackground }}{{ .Color.Button.GetTextColor }}">
+ <div class="link">
+ <a href="/legal">Legal information</a>
+ </div>
+ <div class="link">
+ <a href="/">Home</a>
+ </div>
+ <div class="link">
+ <a href="/now">Now</a>
+ </div>
+ </nav>
+ </main>
+{{end}} \ No newline at end of file
diff --git a/templates/page/custom_page.gohtml b/templates/page/custom_page.gohtml
index 5b4de00..7963a97 100644
--- a/templates/page/custom_page.gohtml
+++ b/templates/page/custom_page.gohtml
@@ -4,7 +4,7 @@
<h1 class="header__title">{{ .Title }}</h1>
<nav>
<a href="/">Home</a>
- <a href="/tags">Tags</a>
+ <a href="/now">Now</a>
</nav>
</div>
{{ .GetContent }}
diff --git a/templates/page/index.gohtml b/templates/page/index.gohtml
index 73301fb..8f376f3 100644
--- a/templates/page/index.gohtml
+++ b/templates/page/index.gohtml
@@ -19,7 +19,7 @@
</div>
{{ end }}
<div class="link">
- <a href="/tags">Tags</a>
+ <a href="/now">Now</a>
</div>
</nav>
</main>
diff --git a/templates/page/legal.gohtml b/templates/page/legal.gohtml
index b3a3a54..0ed112a 100644
--- a/templates/page/legal.gohtml
+++ b/templates/page/legal.gohtml
@@ -1,11 +1,16 @@
{{define "body"}}
- <div class="credits-legal" style="{{ .GetBackground }}">
- <h1>Legal information</h1>
+ <main style="{{ .GetBackground }}">
+ <div class="header">
+ <h1 class="header__title">Legal information</h1>
+ <nav>
+ <a href="/">Home</a>
+ </nav>
+ </div>
<p>
The software behind this website was made by <a href="https://anhgelus.world/" target="_blank">Anhgelus Morhtuuzh</a>.
It is available on <a href="https://git.anhgelus.world/anhgelus/now">my forge</a> for free and licensed under
the <a href="https://git.anhgelus.world/anhgelus/now/raw/branch/main/LICENSE" target="_blank">AGPL</a> license.
</p>
{{ .GetLegal }}
- </div>
+ </main>
{{end}}
diff --git a/templates/page/now.gohtml b/templates/page/now.gohtml
new file mode 100644
index 0000000..96c8b77
--- /dev/null
+++ b/templates/page/now.gohtml
@@ -0,0 +1,23 @@
+{{define "body"}}
+ <main style="{{ .GetBackground }}">
+ <div class="header">
+ <h1 class="header__title">Now</h1>
+ <nav>
+ <a href="/">Home</a>
+ </nav>
+ </div>
+ <div class="tags" style="{{ .Color.GetTagColor }}">
+ {{ range $now := .Person.Now }}
+ <div class="tag">
+ {{ if ne .Name "" }}
+ <h4>{{ .Name }}</h4>
+ {{ end }}
+ <p>{{ .Description }}</p>
+ {{ if and (ne .Link "") (ne .LinkName "") }}
+ <p><a href="{{ .Link }}">{{ .LinkName }}</a></p>
+ {{ end }}
+ </div>
+ {{ end }}
+ </div>
+ </main>
+{{end}} \ No newline at end of file
diff --git a/templates/page/tags.gohtml b/templates/page/tags.gohtml
deleted file mode 100644
index 6106152..0000000
--- a/templates/page/tags.gohtml
+++ /dev/null
@@ -1,18 +0,0 @@
-{{define "body"}}
- <main style="{{ .GetBackground }}">
- <div class="header">
- <h1 class="header__title">Tags</h1>
- <nav>
- <a href="/">Home</a>
- </nav>
- </div>
- <div class="tags" style="{{ .Color.GetTagColor }}">
- {{ range $tag := .Person.Tags }}
- <div class="tag" data-href="{{ .Link }}" title="{{ .Link }}">
- <h3>{{ .Name }}</h3>
- <p>{{ .Description }}</p>
- </div>
- {{ end }}
- </div>
- </main>
-{{end}} \ No newline at end of file