pages-server/views/error.tmpl
hazycora e7a14c2100
All checks were successful
Deploy to VPS / build_site (push) Successful in 6s
add error pages
2024-03-29 23:03:26 -05:00

65 lines
1.3 KiB
Cheetah

{{template "header.tmpl" .}}
<style>
body {
margin: 6rem 1rem;
margin: min(6rem, 12vh) 1rem;
}
hr {
border: none;
border-bottom: 1px solid #372f41;
}
.muted {
color: var(--muted-clr);
}
footer {
display: flex;
justify-content: center;
color: #867d98;
gap: 0.5rem;
}
.section-wrapper {
display: grid;
justify-content: center;
}
.error {
max-width: 40rem;
justify-self: center;
text-wrap: balance;
width: fit-content;
text-align: center;
}
.error .status {
font-size: 4rem;
margin: 0;
text-shadow: 0 0 0.25rem var(--accent-clr);
}
.error .message {
font-size: 1.25rem;
font-weight: 600;
margin-block: 0.5rem;
}
.error .long-message {
margin: 0.5rem 0;
white-space: pre-wrap;
}
</style>
<div class="section-wrapper">
<div class="error">
<h1 class="status">{{.Error.Status}}</h1>
<p class="message">{{.Error.Message}}</p>
{{if ne .Error.LongMessage ""}}
<p class="long-message muted">{{.Error.LongMessage}}</p>
{{end}}
<hr />
<p class="muted">
If you think this is a bug,
<a href="https://git.gay/gitgay/pages/issues/new?title=Error%3A%20{{.Error.Message}}">make an issue</a> to
report it.
</p>
</div>
<footer>
<a href="{{.BASE_URL}}">{{.PAGES_DOMAIN}}</a> ·
<a href="https://git.gay/gitgay/pages-server">source code</a>
</footer>
</div>
{{template "footer.tmpl"}}