mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-04-20 19:11:52 +02:00
🐛 Move to top gap between content and icon
This commit is contained in:
parent
a246ba2451
commit
16600ee159
4 changed files with 13 additions and 5 deletions
|
@ -1403,8 +1403,8 @@ select {
|
|||
top: 5rem;
|
||||
}
|
||||
|
||||
.top-\[100vh\] {
|
||||
top: 100vh;
|
||||
.top-\[110vh\] {
|
||||
top: 110vh;
|
||||
}
|
||||
|
||||
.top-\[11px\] {
|
||||
|
|
|
@ -64,4 +64,12 @@ var updateMeta = () => {
|
|||
elem = document.querySelector('body');
|
||||
style = getComputedStyle(elem);
|
||||
document.querySelector('meta[name="theme-color"]').setAttribute('content', style.backgroundColor);
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener("DOMContentLoaded", (event) => {
|
||||
const scroller = document.getElementById("top-scroller");
|
||||
const footer = document.getElementById("site-footer");
|
||||
if(scroller.getBoundingClientRect().top > footer.getBoundingClientRect().top) {
|
||||
scroller.hidden = true;
|
||||
}
|
||||
});
|
|
@ -1,4 +1,4 @@
|
|||
<footer class="py-10 print:hidden">
|
||||
<footer id="site-footer" class="py-10 print:hidden">
|
||||
{{/* Footer menu */}}
|
||||
{{ if .Site.Params.footer.showMenu | default true }}
|
||||
{{ if .Site.Menus.footer }}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="pointer-events-none absolute top-[100vh] bottom-0 w-12 ltr:right-0 rtl:left-0">
|
||||
<div id="top-scroller" class="pointer-events-none absolute top-[110vh] bottom-0 w-12 ltr:right-0 rtl:left-0">
|
||||
<a href="#the-top"
|
||||
class="pointer-events-auto sticky top-[calc(100vh-5.5rem)] flex h-12 w-12 mb-16 items-center justify-center rounded-full bg-neutral/50 text-xl text-neutral-700 backdrop-blur hover:text-primary-600 dark:bg-neutral-800/50 dark:text-neutral dark:hover:text-primary-400"
|
||||
aria-label="{{ i18n "nav.scroll_to_top_title" }}" title="{{ i18n "nav.scroll_to_top_title" }}">
|
||||
|
|
Loading…
Add table
Reference in a new issue