Skip to content

Commit

Permalink
fix: 404 page styling
Browse files Browse the repository at this point in the history
  • Loading branch information
HEIGE-PCloud committed Dec 29, 2024
1 parent 1ffb9e9 commit 3203c35
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 13 deletions.
6 changes: 0 additions & 6 deletions assets/css/_page/_404.scss

This file was deleted.

1 change: 0 additions & 1 deletion assets/css/_page/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@
@import "_special";
@import "_archive";
@import "_home";
@import "_404";
@import "_taxonomy";
21 changes: 21 additions & 0 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,10 @@ html.dark {
height: 2.5rem;
}

.tw-h-\[90vh\] {
height: 90vh;
}

.tw-h-fit {
height: -moz-fit-content;
height: fit-content;
Expand Down Expand Up @@ -930,6 +934,14 @@ html.dark {
flex-direction: column;
}

.tw-items-center {
align-items: center;
}

.tw-justify-center {
justify-content: center;
}

.tw-justify-between {
justify-content: space-between;
}
Expand Down Expand Up @@ -997,6 +1009,10 @@ html.dark {
padding-top: 8rem;
}

.tw-text-center {
text-align: center;
}

.tw-align-text-bottom {
vertical-align: text-bottom;
}
Expand All @@ -1006,6 +1022,11 @@ html.dark {
line-height: 2rem;
}

.tw-text-3xl {
font-size: 1.875rem;
line-height: 2.25rem;
}

.tw-uppercase {
text-transform: uppercase;
}
Expand Down
10 changes: 4 additions & 6 deletions layouts/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@
{{- end -}}

{{- define "content" -}}
<div class="page" id="content-404">
<div class="page tw-h-[90vh] tw-flex tw-flex-col tw-justify-center tw-items-center tw-text-3xl tw-text-center">
<h1 id="error-emoji"></h1>
<p class="error-text">
{{- T "pageNotFoundText" -}}&nbsp;
<button onclick="window.history.back();">{{ partial "plugin/fontawesome.html" (dict "Style" "regular" "Icon" "hand-point-left") }}</button>
</p>
</div>
<script type="text/javascript">
(function() {
var emojiArray = ['\\(o_o)/', '(˚Δ˚)b', '(^-^*)', '(≥o≤)', '(^_^)b', '(·_·)','(=\'X\'=)', '(>_<)', '(;-;)'];
document.getElementById('error-emoji').appendChild(document.createTextNode(emojiArray[Math.floor(Math.random() * emojiArray.length)]));
})();
<script>
const emojiArray = ['\\(o_o)/', '(˚Δ˚)b', '(^-^*)', '(≥o≤)', '(^_^)b', '(·_·)','(=\'X\'=)', '(>_<)', '(;-;)'];
document.getElementById('error-emoji').appendChild(document.createTextNode(emojiArray[Math.floor(Math.random() * emojiArray.length)]));
</script>
{{- end -}}

0 comments on commit 3203c35

Please sign in to comment.