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 @@ -
+

# {{ .history_post.title }}

@@ -100,6 +100,11 @@
+ + +
diff --git a/templates/default/html/category.html b/templates/default/html/category.html index 2f2b3e4..79feaa4 100644 --- a/templates/default/html/category.html +++ b/templates/default/html/category.html @@ -37,7 +37,7 @@ -
+

# {{ .categorized_post.title }}

@@ -91,6 +91,11 @@
+ + +
diff --git a/templates/default/html/friend.html b/templates/default/html/friend.html index 3b010c0..63985dc 100644 --- a/templates/default/html/friend.html +++ b/templates/default/html/friend.html @@ -40,7 +40,7 @@
-
+

# {{ .friend.title }}

@@ -67,6 +67,11 @@
+ + +
diff --git a/templates/default/html/search.html b/templates/default/html/search.html index fda219a..63abf9d 100644 --- a/templates/default/html/search.html +++ b/templates/default/html/search.html @@ -37,7 +37,7 @@ -
+

# {{ .search_post.title }}

@@ -98,6 +98,11 @@
+ + +
diff --git a/templates/default/html/tag.html b/templates/default/html/tag.html index f6a78da..951cad7 100644 --- a/templates/default/html/tag.html +++ b/templates/default/html/tag.html @@ -37,7 +37,7 @@
-
+

# {{ .tagged_post.title }}

@@ -77,6 +77,11 @@
+ + +