Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions assets/sass/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,36 @@ footer nav ul li a {
margin: auto 0px;
}
}
.not-found {
text-align: center;
margin: 3rem auto;
}

.not-found-logo {
width: 200px;
margin: 0 auto 1.5rem;
display: block;
}

.not-found h1 {
margin: 0 0 1rem;
font-size: 3rem;
font-weight: 700;
}

.not-found p {
margin: 0 0 1rem;
}

body.page-404 {
min-height: 90vh;
display: flex;
flex-direction: column;
}

body.page-404 .not-found {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
}
9 changes: 9 additions & 0 deletions layouts/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{ define "main" }}
<div class="not-found">
<img class="not-found-logo" src="{{ relURL "images/gitgitgadget-logo.png" }}" alt="GitGitGadget logo" width="200">
<h1>404 Not Found</h1>
<p>The page you are looking for doesn't exist</p>
<p><a href="{{ relURL "/" }}">Return home</a></p>
</div>
{{ partial "footer.html" . }}
{{ end }}
11 changes: 9 additions & 2 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@
<title>{{ .Title }}</title>
{{- $canonical := .Permalink | replaceRE "\\.html$" "" -}}
<link rel="canonical" href="{{ $canonical }}">
<link rel="icon" href="{{ relURL "favicon.ico" }}">
{{- if eq .Kind "404" }}
<script>
document.write('<base href="{{ .Site.Home.Permalink }}">');
</script>
{{- end }}
{{- $style := resources.Get "sass/main.scss" | resources.ExecuteAsTemplate "main.scss" . | css.Sass }}
<link rel="icon" href="{{ relURL "favicon.ico" }}">
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
{{- partial "breadcrumbs.html" . -}}
</head>
<body>
<body{{ if eq .Kind "404" }} class="page-404"{{ end }}>
{{- if ne .Kind "404" }}
{{ partial "banner.html" . -}}
{{- end }}

{{ block "main" . }}
{{ .Content }}
Expand Down
Binary file added static/images/gitgitgadget-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.