jakubb-hugo/layouts/partials/footer.html
2024-02-08 06:08:24 -05:00

22 lines
629 B
HTML

<footer>
<hr/>
<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>