mirror of
https://github.com/yv1ing/MollyBlog.git
synced 2025-09-16 14:53:45 +08:00
fix: Fixed some bugs
This commit is contained in:
@@ -97,6 +97,14 @@ a:hover {
|
|||||||
color: var(--secondary-text-color);
|
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 {
|
.icp-text {
|
||||||
color: var(--secondary-text-color);
|
color: var(--secondary-text-color);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,12 @@ if (localStorage.getItem("theme") === null) {
|
|||||||
replaceCssFile();
|
replaceCssFile();
|
||||||
setTheme();
|
setTheme();
|
||||||
|
|
||||||
|
window.addEventListener('resize', function() {
|
||||||
|
setFooter()
|
||||||
|
});
|
||||||
|
|
||||||
|
setFooter()
|
||||||
|
|
||||||
function changeTheme() {
|
function changeTheme() {
|
||||||
if (theme === "dark") {
|
if (theme === "dark") {
|
||||||
theme = "light";
|
theme = "light";
|
||||||
@@ -56,3 +62,28 @@ function replaceCssFile() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- body -->
|
<!-- body -->
|
||||||
<div class="container p-3">
|
<div class="container p-3 body-container">
|
||||||
<div class="row pt-lg-3">
|
<div class="row pt-lg-3">
|
||||||
<h3 class="history-post-title"># {{ .history_post.title }}</h3>
|
<h3 class="history-post-title"># {{ .history_post.title }}</h3>
|
||||||
<div class="row pt-4">
|
<div class="row pt-4">
|
||||||
@@ -100,6 +100,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- footer -->
|
||||||
|
<div class="special-footer">
|
||||||
|
{{ .site_info.copyright }}
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- footer -->
|
<!-- footer -->
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- body -->
|
<!-- body -->
|
||||||
<div class="container p-3">
|
<div class="container p-3 body-container">
|
||||||
<div class="row pt-lg-3">
|
<div class="row pt-lg-3">
|
||||||
<h3 class="categorized-post-title"># {{ .categorized_post.title }}</h3>
|
<h3 class="categorized-post-title"># {{ .categorized_post.title }}</h3>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -91,6 +91,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- footer -->
|
||||||
|
<div class="special-footer">
|
||||||
|
{{ .site_info.copyright }}
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- footer -->
|
<!-- footer -->
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- body -->
|
<!-- body -->
|
||||||
<div class="container p-3">
|
<div class="container p-3 body-container">
|
||||||
<div class="row pt-lg-3">
|
<div class="row pt-lg-3">
|
||||||
<div class="col mx-auto">
|
<div class="col mx-auto">
|
||||||
<h3 class="friend-title"># {{ .friend.title }}</h3>
|
<h3 class="friend-title"># {{ .friend.title }}</h3>
|
||||||
@@ -67,6 +67,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- footer -->
|
||||||
|
<div class="special-footer">
|
||||||
|
{{ .site_info.copyright }}
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- footer -->
|
<!-- footer -->
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- body -->
|
<!-- body -->
|
||||||
<div class="container p-3">
|
<div class="container p-3 body-container">
|
||||||
<div class="row pt-lg-3">
|
<div class="row pt-lg-3">
|
||||||
<h3 class="search-post-title"># {{ .search_post.title }}</h3>
|
<h3 class="search-post-title"># {{ .search_post.title }}</h3>
|
||||||
<div class="row pt-4">
|
<div class="row pt-4">
|
||||||
@@ -98,6 +98,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- footer -->
|
||||||
|
<div class="special-footer">
|
||||||
|
{{ .site_info.copyright }}
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- footer -->
|
<!-- footer -->
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- body -->
|
<!-- body -->
|
||||||
<div class="container p-3">
|
<div class="container p-3 body-container">
|
||||||
<div class="row pt-lg-3">
|
<div class="row pt-lg-3">
|
||||||
<h3 class="tagged-post-title"># {{ .tagged_post.title }}</h3>
|
<h3 class="tagged-post-title"># {{ .tagged_post.title }}</h3>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -77,6 +77,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- footer -->
|
||||||
|
<div class="special-footer">
|
||||||
|
{{ .site_info.copyright }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- tag word cloud -->
|
<!-- tag word cloud -->
|
||||||
|
|||||||
Reference in New Issue
Block a user