hugo-theme/layouts/partials/footer.html

21 lines
624 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>
</body>
</html>