mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-22 04:13:17 -06:00
Remove back to top button
It's kind of ugly and weird, and probably not necessary. I might add it back in the future if it's actually needed again.
This commit is contained in:
parent
9ca15a198f
commit
c980ced2fb
@ -361,23 +361,6 @@ h1 svg.icon {
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* Back to top {{{ */
|
||||
#top {
|
||||
font-size: 0;
|
||||
}
|
||||
#back-to-top {
|
||||
position: fixed;
|
||||
float: right;
|
||||
bottom: 25px;
|
||||
right: 25px;
|
||||
background-color: var(--background-1);
|
||||
color: var(--text-1);
|
||||
border-radius: 100%;
|
||||
padding: 12px;
|
||||
display: none;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* Skip to main content {{{ */
|
||||
#skip-to-main {
|
||||
position: absolute;
|
||||
@ -989,10 +972,6 @@ aside.quote {
|
||||
.table-of-contents.print {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#back-to-top {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
@ -1,13 +1,3 @@
|
||||
// back to top
|
||||
const backToTop = document.getElementById("back-to-top");
|
||||
window.onscroll = function() {
|
||||
if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
|
||||
backToTop.style.display = "block";
|
||||
} else {
|
||||
backToTop.style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
// code block copy to clipboard
|
||||
window.onload = () => {
|
||||
document.querySelectorAll(".code-block").forEach(codeBlock => {
|
||||
|
@ -4,20 +4,8 @@
|
||||
{{ partial "head.html" . }}
|
||||
|
||||
<body>
|
||||
<a id="top" aria-hidden="true"></a>
|
||||
<a id="skip-to-main" href="#main-content">Skip to main content</a>
|
||||
|
||||
<a id="back-to-top" href="#top" aria-label="{{ i18n "aria_back_to_top_button" }}">
|
||||
{{ partial "icon.html" "chevron-up" }}
|
||||
</a>
|
||||
<noscript>
|
||||
<style>
|
||||
#back-to-top {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
</noscript>
|
||||
|
||||
{{ partial "top.html" . }}
|
||||
|
||||
<div class="main-container">
|
||||
|
Loading…
Reference in New Issue
Block a user