mirror of
https://github.com/yv1ing/MollyBlog.git
synced 2025-09-16 14:53:45 +08:00
fix: Remove blog directory menu
This commit is contained in:
@@ -87,17 +87,6 @@ tr, th, td {
|
|||||||
left: 30px;
|
left: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#toc-box-menu {
|
|
||||||
margin-top: 20px;
|
|
||||||
display: none;
|
|
||||||
color: var(--primary-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.toc-box-menu-item {
|
|
||||||
cursor: pointer;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#toc-title {
|
#toc-title {
|
||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
}
|
}
|
||||||
@@ -157,4 +146,14 @@ tr, th, td {
|
|||||||
.image-preview-img {
|
.image-preview-img {
|
||||||
max-width: 90%;
|
max-width: 90%;
|
||||||
max-height: 90%;
|
max-height: 90%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.back-to-top-wrap {
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 60px;
|
||||||
|
z-index: 999;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
@@ -28,25 +28,6 @@ Array.from(tList, v => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
const tocMenu = document.getElementById('toc-box-menu');
|
|
||||||
|
|
||||||
window.addEventListener('scroll', (event) => {
|
|
||||||
const scrollFromTop = window.scrollY || document.documentElement.scrollTop;
|
|
||||||
if (scrollFromTop >= 100) {
|
|
||||||
tocMenu.style.display = 'block';
|
|
||||||
} else {
|
|
||||||
tocMenu.style.display = 'none';
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
function goto(path) {
|
|
||||||
window.location.href = path;
|
|
||||||
}
|
|
||||||
|
|
||||||
function back() {
|
|
||||||
window.history.back();
|
|
||||||
}
|
|
||||||
|
|
||||||
function backToTop() {
|
function backToTop() {
|
||||||
window.scrollTo({
|
window.scrollTo({
|
||||||
top: 0,
|
top: 0,
|
||||||
|
|||||||
@@ -43,20 +43,6 @@
|
|||||||
<hr/>
|
<hr/>
|
||||||
</div>
|
</div>
|
||||||
<div id="toc-box"></div>
|
<div id="toc-box"></div>
|
||||||
<div id="toc-box-menu">
|
|
||||||
<hr/>
|
|
||||||
{{ range $i, $v := .menu.Items }}
|
|
||||||
<span class="toc-box-menu-item">
|
|
||||||
<i class="{{ $v.Icon }} m-icon" onclick="goto('{{ $v.Url }}')"></i>
|
|
||||||
</span>
|
|
||||||
{{ end }}
|
|
||||||
<span class="toc-box-menu-item" onclick="backToTop()">
|
|
||||||
<i class="fa-solid fa-circle-up"></i>
|
|
||||||
</span>
|
|
||||||
<span class="toc-box-menu-item" onclick="back()">
|
|
||||||
<i class="fa-solid fa-right-from-bracket"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- body -->
|
<!-- body -->
|
||||||
@@ -129,6 +115,13 @@
|
|||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
<!-- back to top -->
|
||||||
|
<div class="back-to-top-wrap" onclick="backToTop()">
|
||||||
|
<svg t="1735720590553" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8716" width="36" height="36">
|
||||||
|
<path d="M747.6 788.4c0 130.1-105.5 235.6-235.6 235.6S276.4 918.5 276.4 788.4c0-99 61.1-235.2 147.7-294.6 34.8-23.9 55.9-63 55.9-105.2V32c0-8.8 3.6-16.8 9.4-22.6C495.2 3.6 503.2 0 512 0c17.7 0 32 14.3 32 32v356.5c0 42.2 21.2 81.4 55.9 105.2 86.6 59.5 147.7 195.7 147.7 294.7z" p-id="8717" fill="#6d6faa"></path>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- theme -->
|
<!-- theme -->
|
||||||
<div class="theme-wrap" onclick="changeTheme()">
|
<div class="theme-wrap" onclick="changeTheme()">
|
||||||
<svg t="1735089313984" class="icon theme-btn" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6403" width="36" height="36">
|
<svg t="1735089313984" class="icon theme-btn" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6403" width="36" height="36">
|
||||||
|
|||||||
Reference in New Issue
Block a user