Fix
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
a698b7cc43
commit
a0720bbc23
|
@ -11,6 +11,20 @@ title: Start
|
|||
window.scrollTo({ top: y, behavior: 'smooth' });
|
||||
}
|
||||
|
||||
<script>
|
||||
window.addEventListener('scroll', () => {
|
||||
const header = document.querySelector('.md-header');
|
||||
const tabs = document.querySelector('.md-tabs');
|
||||
if (window.scrollY > window.innerHeight * 0.8) {
|
||||
header.style.transform = "translateY(0)";
|
||||
if (tabs) tabs.style.transform = "translateY(0)";
|
||||
} else {
|
||||
header.style.transform = "translateY(-100%)";
|
||||
if (tabs) tabs.style.transform = "translateY(-100%)";
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
// Göm knappen vid scroll
|
||||
window.addEventListener('scroll', () => {
|
||||
const button = document.getElementById('scrollButton');
|
||||
|
|
|
@ -29,3 +29,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.md-header,
|
||||
.md-tabs {
|
||||
transition: transform 0.3s ease;
|
||||
}
|
Loading…
Reference in New Issue