paysage
This commit is contained in:
14
index.html
14
index.html
@@ -14,12 +14,16 @@
|
|||||||
<meta property="og:locale" content="fr_FR" />
|
<meta property="og:locale" content="fr_FR" />
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
|
--vph: "100dvh";
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100dvh;
|
min-height: var(--vph);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-height: 600px) {
|
@media (min-height: 600px) {
|
||||||
|
body {
|
||||||
|
height: var(--vph);
|
||||||
|
}
|
||||||
body > header {
|
body > header {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -28,6 +32,11 @@ body {
|
|||||||
background: linear-gradient(var(--pico-background-color) 60%, transparent);
|
background: linear-gradient(var(--pico-background-color) 60%, transparent);
|
||||||
text-shadow: 0 0 10px var(--pico-background-color);
|
text-shadow: 0 0 10px var(--pico-background-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body > main {
|
||||||
|
margin: -5rem;
|
||||||
|
padding: 5rem;
|
||||||
|
}
|
||||||
|
|
||||||
body > footer {
|
body > footer {
|
||||||
position: sticky;
|
position: sticky;
|
||||||
@@ -209,7 +218,8 @@ body > main {
|
|||||||
})
|
})
|
||||||
|
|
||||||
function onResize() {
|
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.visualViewport?.addEventListener('resize', onResize);
|
||||||
window.addEventListener('resize', onResize);
|
window.addEventListener('resize', onResize);
|
||||||
|
|||||||
Reference in New Issue
Block a user