This commit is contained in:
Jakub 2024-02-08 06:08:24 -05:00
parent 32836308d2
commit 23e658e768
3 changed files with 20 additions and 3 deletions

View File

@ -1,12 +1,10 @@
{{ partial "header.html" . }}
<div class="content">
<h1>Error 404: </h1>
<h2>Page Not Found</h2>
<p>The url you entered is invalid or has been deleted.</p>
<p><a class="button" href="/">Click here to return home.</a></p>
</div>
{{ partial "footer.html" . }}

View File

@ -3,6 +3,19 @@
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a><br/>
<a href="/contact">[ Contact ]</a> <a href="/donate">[ Donate ]</a> <a href="/donate">[ RSS ]</a> <br/>
</footer>
<script>
// JavaScript to check if content is shorter than the screen
// and add fixed class to footer if needed
window.addEventListener('DOMContentLoaded', function() {
var content = document.querySelector('.content');
var footer = document.querySelector('footer');
if (content.offsetHeight < window.innerHeight) {
footer.classList.add('fixed');
}
});
</script>
</div>
</body>
</html>

View File

@ -30,6 +30,13 @@ footer {
padding-bottom: 20px;
}
footer.fixed {
margin: 0;
position: fixed;
bottom: 0;
left: 0;
}
/* Header and Navigation Menu */
.header {
@ -171,7 +178,6 @@ footer {
.content {
margin-left: calc(15%);
margin-right: 0;
margin-top: auto;
padding: 20px;