Fix
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
20869b0b3b
commit
21c5ddd2c9
|
@ -11,32 +11,72 @@ title: Meshtastic
|
||||||
window.scrollTo({ top: y, behavior: 'smooth' });
|
window.scrollTo({ top: y, behavior: 'smooth' });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Göm knappen vid scroll
|
window.addEventListener('scroll', () => {
|
||||||
window.addEventListener('scroll', () => {
|
const button = document.getElementById('scrollButton');
|
||||||
const button = document.getElementById('scrollButton');
|
if (window.scrollY > 10) {
|
||||||
if (window.scrollY > 10) {
|
button.style.opacity = '0';
|
||||||
button.style.display = 'none';
|
button.style.pointerEvents = 'none';
|
||||||
|
} else {
|
||||||
|
button.style.opacity = '1';
|
||||||
|
button.style.pointerEvents = 'auto';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
window.addEventListener("scroll", () => {
|
||||||
|
const content = document.getElementById("main-content");
|
||||||
|
const header = document.querySelector(".md-header");
|
||||||
|
const sidebar = document.querySelector(".md-sidebar");
|
||||||
|
|
||||||
|
const contentY = content.getBoundingClientRect().top;
|
||||||
|
const windowHeight = window.innerHeight;
|
||||||
|
|
||||||
|
// Hur många pixlar innan "main-content" som menyn ska börja synas
|
||||||
|
const fadeStart = windowHeight * 0.2;
|
||||||
|
const fadeEnd = windowHeight * 0.8;
|
||||||
|
|
||||||
|
// Beräkna scrollbaserad opacitet (0 till 1)
|
||||||
|
let opacity = 1 - (contentY - fadeStart) / (fadeEnd - fadeStart);
|
||||||
|
opacity = Math.max(0, Math.min(1, opacity)); // begränsa mellan 0 och 1
|
||||||
|
|
||||||
|
// Tillämpa opacitet
|
||||||
|
//header.style.opacity = opacity;
|
||||||
|
sidebar.style.opacity = opacity;
|
||||||
|
|
||||||
|
// Hantera klickbarhet så man inte klickar på osynlig meny
|
||||||
|
if (opacity < 0.05) {
|
||||||
|
// header.style.pointerEvents = "none";
|
||||||
|
sidebar.style.pointerEvents = "none";
|
||||||
|
} else {
|
||||||
|
// header.style.pointerEvents = "auto";
|
||||||
|
sidebar.style.pointerEvents = "auto";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
window.addEventListener("load", () => {
|
||||||
|
// Initiera rätt opacitet direkt vid sidladdning
|
||||||
|
window.dispatchEvent(new Event("scroll"));
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<video autoplay loop muted playsinline
|
<video autoplay loop muted playsinline
|
||||||
style="position: absolute; left: 0;
|
style="position: absolute; left: 0;
|
||||||
height: 77vh; width: 100%;
|
height: 82vh; width: 100%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
filter: blur(10px) brightness(0.7);
|
filter: blur(10px) brightness(0.7);
|
||||||
transform: scale(1.2); /* lite zoom för att dölja kanter */
|
transform: scale(1.2); /* lite zoom för att dölja kanter */
|
||||||
z-index: -2;">
|
z-index: -2;">
|
||||||
<source src="../assets/Felix_i_Jannes_mast_2.webm" type="video/webm">
|
<source src="assets/Felix_i_Jannes_mast_2.webm" type="video/webm">
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
|
|
||||||
<video autoplay loop muted playsinline
|
<video autoplay loop muted playsinline
|
||||||
style="position: absolute; left: 50%;
|
style="position: absolute; left: 50%;
|
||||||
transform: translate(-50%, -50px);
|
transform: translate(-50%, -50px);
|
||||||
height: 90vh;
|
height: 95vh;
|
||||||
object-fit: cover; z-index: -1;">
|
object-fit: cover; z-index: -1;">
|
||||||
<source src="../assets/Felix_i_Jannes_mast_2.webm" type="video/webm">
|
<source src="assets/Felix_i_Jannes_mast_2.webm" type="video/webm">
|
||||||
Din webbläsare stödjer inte video.
|
Din webbläsare stödjer inte video.
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
|
@ -48,9 +88,8 @@ title: Meshtastic
|
||||||
↓
|
↓
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
||||||
<!-- Mellanrum -->
|
<!-- Mellanrum -->
|
||||||
<div style="height: 90vh;"></div>
|
<div style="height: 100vh;"></div>
|
||||||
|
|
||||||
<div id="main-content" class="ascii-wrapper">
|
<div id="main-content" class="ascii-wrapper">
|
||||||
<pre><code><div align="center">
|
<pre><code><div align="center">
|
||||||
|
|
Loading…
Reference in New Issue