diff --git a/gallery/static/js/main.js b/gallery/static/js/main.js index cd03b31..e223086 100644 --- a/gallery/static/js/main.js +++ b/gallery/static/js/main.js @@ -88,16 +88,19 @@ window.onload = function () { // Info button let infoButton = document.querySelector('.info-button'); - if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 20) { - infoButton.classList.remove('show'); - } else { - infoButton.classList.add('show'); - } - infoButton.onclick = function () { - popUpShow('OnlyLegs on Flask', - 'Using Phosphoricons and Manrope
' + - 'Made by Fluffy and others with ❤️
' + - 'V23.03.26'); + + if (infoButton) { + if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 20) { + infoButton.classList.remove('show'); + } else { + infoButton.classList.add('show'); + } + infoButton.onclick = function () { + popUpShow('OnlyLegs on Flask', + 'Using Phosphoricons and Manrope
' + + 'Made by Fluffy and others with ❤️
' + + 'V23.03.26'); + } } }; window.onscroll = function () { @@ -113,10 +116,13 @@ window.onscroll = function () { // Info button let infoButton = document.querySelector('.info-button'); - if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 20) { - infoButton.classList.remove('show'); - } else { - infoButton.classList.add('show'); + + if (infoButton) { + if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 20) { + infoButton.classList.remove('show'); + } else { + infoButton.classList.add('show'); + } } }; window.onresize = function () { diff --git a/gallery/templates/image.html b/gallery/templates/image.html index c1a7ef6..87d4cf3 100644 --- a/gallery/templates/image.html +++ b/gallery/templates/image.html @@ -4,7 +4,7 @@ - -{% endblock %} {% block content %}