2 Commits

Author SHA1 Message Date
98d03cd803 WIP 2023-11-05 17:52:28 -06:00
c980ced2fb 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.
2023-11-05 17:41:59 -06:00
3 changed files with 32 additions and 47 deletions

View File

@ -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 content {{{ */
#skip-to-main { #skip-to-main {
position: absolute; position: absolute;
@ -875,22 +858,22 @@ aside {
} }
aside.note { aside.note {
background-color: var(--background-blue-1); background-color: var(--accent-blue-1);
} }
aside.info { aside.info {
background-color: var(--background-green-1); background-color: var(--accent-green-1);
} }
aside.tip { aside.tip {
background-color: var(--background-teal-1); background-color: var(--accent-teal-1);
} }
aside.warning { aside.warning {
background-color: var(--background-yellow-1); background-color: var(--accent-yellow-1);
} }
aside.example { aside.example {
background-color: var(--background-purple-1); background-color: var(--accent-purple-1);
} }
aside.quote { aside.quote {
background-color: var(--background-1); background-color: var(--accent-1);
} }
/* }}} */ /* }}} */
@ -990,8 +973,32 @@ aside.quote {
display: block; display: block;
} }
#back-to-top { /*
display: none !important; * reduce usage of background colors
*/
aside {
background-color: unset !important;
border: 4px solid;
}
aside.note {
border-color: var(--background-blue-1);
}
aside.info {
border-color: var(--background-green-1);
}
aside.tip {
border-color: var(--background-teal-1);
}
aside.warning {
border-color: var(--background-yellow-1);
}
aside.example {
border-color: var(--background-purple-1);
}
aside.quote {
border-color: var(--background-1);
} }
} }

View File

@ -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 // code block copy to clipboard
window.onload = () => { window.onload = () => {
document.querySelectorAll(".code-block").forEach(codeBlock => { document.querySelectorAll(".code-block").forEach(codeBlock => {

View File

@ -4,20 +4,8 @@
{{ partial "head.html" . }} {{ partial "head.html" . }}
<body> <body>
<a id="top" aria-hidden="true"></a>
<a id="skip-to-main" href="#main-content">Skip to main content</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" . }} {{ partial "top.html" . }}
<div class="main-container"> <div class="main-container">