Amélioration header
This commit is contained in:
parent
39ba48de00
commit
d51c41e2bc
2 changed files with 9 additions and 8 deletions
|
@ -3,7 +3,6 @@
|
|||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
padding-top: 125%; /* Aspect ratio: 540:675 (height/width = 1.25) */
|
||||
}
|
||||
.responsive-iframe-container iframe {
|
||||
position: absolute;
|
||||
|
@ -20,11 +19,13 @@
|
|||
</div>
|
||||
|
||||
<script>
|
||||
window.addEventListener('message', function(e) {
|
||||
if (e.data.type === 'setHeight') {
|
||||
var container = document.querySelector('.responsive-iframe-container');
|
||||
var aspectRatio = e.data.height / e.data.width;
|
||||
container.style.paddingTop = (aspectRatio * 100) + '%';
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var footer = document.querySelector('footer');
|
||||
var contentArea = document.querySelector('.content-area');
|
||||
if (footer && footer.parentNode && contentArea) {
|
||||
var footerHeight = footer.offsetHeight;
|
||||
footer.parentNode.removeChild(footer);
|
||||
contentArea.style.minHeight = 'calc(100vh - ' + footerHeight + 'px)';
|
||||
}
|
||||
}, false);
|
||||
});
|
||||
</script>
|
|
@ -191,7 +191,7 @@ pauseButton.addEventListener('click', togglePause);
|
|||
function updateThemeHeader(theme) {
|
||||
const themeHeader = document.getElementById('themeHeader');
|
||||
if (themeHeader) {
|
||||
themeHeader.textContent = `Theme: ${theme}`;
|
||||
themeHeader.textContent = `DéconstruIT - Le jeu ! Thème: ${theme}`;
|
||||
themeHeader.style.position = 'absolute';
|
||||
themeHeader.style.top = '10px';
|
||||
themeHeader.style.left = '0';
|
||||
|
|
Loading…
Reference in a new issue