diff --git a/internal/assets/static/main.css b/internal/assets/static/main.css index 1e64def1..008c25c1 100644 --- a/internal/assets/static/main.css +++ b/internal/assets/static/main.css @@ -285,6 +285,20 @@ body { font-size: 2rem; } +.page-404-container { + margin: 50px auto; + width: fit-content; + font-size: 2rem; + text-align: center; +} + +.logo-404 { + height: 100%; + line-height: var(--header-height); + font-size: 2rem; + color: var(--color-text-highlight); +} + @keyframes loadingContainerEntrance { from { opacity: 0; diff --git a/internal/assets/templates.go b/internal/assets/templates.go index b8aa6aed..943b3761 100644 --- a/internal/assets/templates.go +++ b/internal/assets/templates.go @@ -13,6 +13,7 @@ import ( var ( PageTemplate = compileTemplate("page.html", "document.html", "page-style-overrides.gotmpl") + Page404Template = compileTemplate("404.html", "document.html", "page-style-overrides.gotmpl") PageContentTemplate = compileTemplate("content.html") CalendarTemplate = compileTemplate("calendar.html", "widget-base.html") BookmarksTemplate = compileTemplate("bookmarks.html", "widget-base.html") diff --git a/internal/assets/templates/404.html b/internal/assets/templates/404.html new file mode 100644 index 00000000..a45c152c --- /dev/null +++ b/internal/assets/templates/404.html @@ -0,0 +1,52 @@ +{{ template "document.html" . }} + +{{ define "document-title" }}{{ .Page.Title }} - Glance{{ end }} + +{{ define "document-head-before" }} + +{{ end }} + +{{ define "document-root-attrs" }}{{ if .App.Config.Theme.Light }}class="light-scheme"{{ end }}{{ end }} +{{ define "document-head-after" }} +{{ template "page-style-overrides.gotmpl" . }} +{{ if ne "" .App.Config.Theme.CustomCSSFile }} + +{{ end }} +{{ end }} + +{{ define "navigation-links" }} +{{ range .App.Config.Pages }} +{{ .Title }} +{{ end }} +{{ end }} + +{{ define "document-body" }} +