Skip to content

Commit

Permalink
Fix 502 & 503 pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlgo11 committed Aug 2, 2024
1 parent b96ff62 commit f188e51
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 40 deletions.
12 changes: 12 additions & 0 deletions assets/css/error.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
main {
display: grid;
justify-content: center;
align-content: center;
height: 100%;
width: 100%;
text-align: center;
}

.note {
font-size: 2em;
}
5 changes: 5 additions & 0 deletions content/502.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: error
status: 502
error: Bad Gateway
---
5 changes: 5 additions & 0 deletions content/503.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
layout: error
status: 503
error: Service Unavailable
---
20 changes: 0 additions & 20 deletions layouts/502.html

This file was deleted.

20 changes: 0 additions & 20 deletions layouts/503.html

This file was deleted.

6 changes: 6 additions & 0 deletions layouts/_default/error.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{{ define "main" }}
<main>
<h1 class="display-1">{{ .Param "status" }}</h1>
<p class="note">{{ .Param "error" }}</p>
</main>
{{ end }}
4 changes: 4 additions & 0 deletions layouts/partials/base.stylesheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
{{ $styles = $styles | append "page" "note" }}
{{ end }}

{{ with eq .Layout "error" }}
{{ $styles = $styles | append "error" }}
{{ end }}


{{ $scss := slice }}
{{ range $style := $styles }}
Expand Down

0 comments on commit f188e51

Please sign in to comment.