diff --git a/templates/default/assets/css/global.css b/templates/default/assets/css/global.css index 691de99..9206f26 100644 --- a/templates/default/assets/css/global.css +++ b/templates/default/assets/css/global.css @@ -97,6 +97,14 @@ a:hover { color: var(--secondary-text-color); } +.special-footer { + width: 100%; + padding-top: 2rem; + padding-bottom: 2rem; + text-align: center; + color: var(--secondary-text-color); +} + .icp-text { color: var(--secondary-text-color); } diff --git a/templates/default/assets/js/global.js b/templates/default/assets/js/global.js index ba3d114..b297579 100644 --- a/templates/default/assets/js/global.js +++ b/templates/default/assets/js/global.js @@ -9,6 +9,12 @@ if (localStorage.getItem("theme") === null) { replaceCssFile(); setTheme(); +window.addEventListener('resize', function() { + setFooter() +}); + +setFooter() + function changeTheme() { if (theme === "dark") { theme = "light"; @@ -55,4 +61,29 @@ function replaceCssFile() { break; } } +} + +function checkSpecialHeight() { + let element = document.querySelector('.body-container') + if (!element) { + return false; + } + let elementHeight = element.offsetHeight; + let viewportHeight = window.innerHeight; + + return elementHeight >= viewportHeight * 0.7; +} + +function setFooter() { + try { + if (checkSpecialHeight()) { + document.querySelector('.footer').style.display = 'none'; + document.querySelector('.special-footer').style.display = 'block'; + } else { + document.querySelector('.footer').style.display = 'block'; + document.querySelector('.special-footer').style.display = 'none'; + } + } catch (e) { + + } } \ No newline at end of file diff --git a/templates/default/html/archive.html b/templates/default/html/archive.html index a04a701..5c5d43d 100644 --- a/templates/default/html/archive.html +++ b/templates/default/html/archive.html @@ -39,7 +39,7 @@ -