feat(404.html): add 404 page layout

The 404.html file is a new file added to the layouts directory. This file defines the layout for the 404 page. It includes a container div, a navigation partial, and an article element with three paragraphs displaying the "404 page not found" message. This layout will be used when a user navigates to a non-existent page on the website.
This commit is contained in:
Sped0n
2023-11-01 23:09:27 +08:00
parent a395513bd6
commit 1ac67f17ae

16
layouts/404.html Normal file
View File

@@ -0,0 +1,16 @@
{{- define "main" -}}
{{- $params := .Scratch.Get "params" -}}
{{- $currentPage := . -}}
{{- with partial "function/currentMenuItem.html" . -}}
{{- partial "resources/imageJSON.html" (dict "Path" .Name "Page" $currentPage) -}}
<script>document.getElementById("main").setAttribute("currentMenuItemIndex", "{{- (sub .ID 1) -}}")</script>
{{- end -}}
<div class="container">
{{- partial "nav.html" . -}}
</div>
<article class="info">
<p class="error">&#9949; <u>404</u> page not found &#9949;</p>
<p class="error">&#9949; <u>404</u> page not found &#9949;</p>
<p class="error">&#9949; <u>404</u> page not found &#9949;</p>
</article>
{{- end -}}