forked from jakub/jakubb-hugo
20 lines
526 B
HTML
20 lines
526 B
HTML
<footer>
|
|
<hr/>
|
|
<a href="/{{ .Language.LanguageCode }}">{{ .Site.Title }}</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>
|