jakubb-hugo/layouts/partials/footer.html

20 lines
526 B
HTML
Raw Normal View History

2024-01-29 04:53:34 +00:00
<footer>
<hr/>
<a href="/{{ .Language.LanguageCode }}">{{ .Site.Title }}</a><br/>
2024-01-29 04:53:34 +00:00
</footer>
2024-02-08 11:08:24 +00:00
<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>
2024-01-29 04:53:34 +00:00
</body>
</html>