1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-06-30 02:05:57 -04:00

add a partial template that returns an asset's URL and hash from webpack's manifest

still a mess but slightly more modular. also added a real 404 page.
This commit is contained in:
2021-09-03 11:16:27 -04:00
parent a304fa5079
commit 3a3849e8ec
13 changed files with 97 additions and 111 deletions
+10 -56
View File
@@ -1,57 +1,11 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
{{ hugo.Generator }}
<title>Page Not Found</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex">
{{ define "main" }}
<div class="layout layout-404">
{{ with partial "functions/webpack" (dict "context" . "src" "images/angry-panda.gif") }}
<img src="{{ .src }}" width="435" height="300" alt="Panda takes out anger on innocent computer.">
{{ end }}
<style>
body {
background: #efefef;
color: #5f5f5f;
font-family: Helvetica, Arial, sans-serif;
margin: 0;
padding: 0;
}
div#message {
background: #ffffff;
max-width: 400px;
margin: 100px auto 16px;
padding: 16px 32px;
border-radius: 4px;
box-shadow: 0 1px 3px #e0e0e0, 0 1px 2px #888888;
}
h1 {
margin: 16px 0;
font-size: 24px;
font-weight: 300;
}
p {
margin: 16px 0;
font-size: 15px;
line-height: 140%;
}
a {
color: #0e6dc2;
}
a:hover {
text-decoration: underline;
}
@media (max-width: 600px) {
body, div#message {
background: #ffffff;
margin-top: 16px;
box-shadow: none;
}
}
</style>
</head>
<body>
<div id="message">
<h1>Welp, this is awkward... 😳</h1>
<p>The file you asked for wasn't found in this neck of the woods. Please check the URL for mistakes and try again, or take your ball and <a href="{{ .Site.BaseURL }}">go home</a>.</p>
</div>
</body>
</html>
<h2>404 Makes Panda Angry</h2>
<p><a href="/">Maybe it's wise to get out of here and go home...?</a></p>
</div>
{{ end }}