diff options
| -rw-r--r-- | main.go | 8 | ||||
| -rw-r--r-- | scss/main.scss | 1 | ||||
| -rw-r--r-- | scss/tag.scss | 1 | ||||
| -rw-r--r-- | templates/page/404.gohtml | 24 | ||||
| -rw-r--r-- | templates/page/legal.gohtml | 11 |
5 files changed, 41 insertions, 4 deletions
@@ -140,6 +140,14 @@ func main() { } g.NotFoundHandler = func(w http.ResponseWriter, r *http.Request) { + g.Render(w, "404", &golatt.TemplateData{ + Title: "Not found :(", + SEO: &golatt.SeoData{ + URL: r.URL.Path, + Description: "Not found", + }, + Data: &cfg, + }) http.Redirect(w, r, "/", http.StatusTemporaryRedirect) } diff --git a/scss/main.scss b/scss/main.scss index adb87be..95213cf 100644 --- a/scss/main.scss +++ b/scss/main.scss @@ -118,6 +118,7 @@ h3 { h4 { font-size: 1.25rem; font-weight: bold; + margin-bottom: 0.5rem; } ul, ol { diff --git a/scss/tag.scss b/scss/tag.scss index a604380..516ecdb 100644 --- a/scss/tag.scss +++ b/scss/tag.scss @@ -17,7 +17,6 @@ } & p { display: block; - margin-top: 0.5rem; } } 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/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}} |
