This commit is contained in:
2026-01-18 00:45:59 +01:00
parent 2b33f16a16
commit e2f57ebb65

View File

@@ -14,12 +14,16 @@
<meta property="og:locale" content="fr_FR" />
<style>
body {
--vph: "100dvh";
display: flex;
flex-direction: column;
height: 100dvh;
min-height: var(--vph);
}
@media (min-height: 600px) {
body {
height: var(--vph);
}
body > header {
position: sticky;
top: 0;
@@ -29,6 +33,11 @@ body {
text-shadow: 0 0 10px var(--pico-background-color);
}
body > main {
margin: -5rem;
padding: 5rem;
}
body > footer {
position: sticky;
bottom: 0;
@@ -209,7 +218,8 @@ body > main {
})
function onResize() {
footer.style.setProperty("bottom", `${window.innerHeight - window.visualViewport.height}px`);
document.body.style.setProperty("--vph", `${window.visualViewport.height}px`);
conversation.scrollTop = conversation.scrollHeight;
}
window.visualViewport?.addEventListener('resize', onResize);
window.addEventListener('resize', onResize);