Mudanças entre as edições de "Widget:Teste"
Ir para navegação
Ir para pesquisar
| Linha 1: | Linha 1: | ||
<style> | <style> | ||
@media (max-width: 1530px) { | |||
.homepage-content { | .homepage-content { | ||
flex-direction: column !important; | |||
} | |||
} | |||
.menu-col, | |||
.side-col { | |||
min-width: 100% !important; | |||
width: 100% !important; | |||
flex: 1 1 100% !important; | |||
} | |||
} | |||
@supports (container-type: inline-size) { | |||
.homepage-content { | |||
container-type: inline-size; | |||
container-name: mainpage; | |||
} | |||
} | |||
@container mainpage (max-width: 1530px) { | |||
. | .homepage-content { | ||
flex-direction: column !important; | |||
} | |||
.menu-col, | |||
.side-col { | |||
} | width: 100% !important; | ||
min-width: 100% !important; | |||
flex: 1 1 100% !important; | |||
} | |||
} | |||
} | |||
</style> | </style> | ||
<script> | |||
(function () { | |||
function checkCollapseLayout() { | |||
const content = document.querySelector('.homepage-content'); | |||
const menuCol = document.querySelector('.menu-col'); | |||
const sideCol = document.querySelector('.side-col'); | |||
if (!content || !menuCol || !sideCol) return; | |||
const contentWidth = content.offsetWidth; | |||
if (contentWidth <= 1530) { | |||
content.style.flexDirection = 'column'; | |||
menuCol.style.minWidth = '100%'; | |||
menuCol.style.width = '100%'; | |||
sideCol.style.minWidth = '100%'; | |||
sideCol.style.width = '100%'; | |||
sideCol.style.flex = '1 1 100%'; | |||
} else { | |||
content.style.flexDirection = ''; | |||
menuCol.style.minWidth = ''; | |||
menuCol.style.width = ''; | |||
sideCol.style.minWidth = ''; | |||
sideCol.style.width = ''; | |||
sideCol.style.flex = ''; | |||
} | |||
} | |||
window.addEventListener('resize', checkCollapseLayout); | |||
document.addEventListener('DOMContentLoaded', checkCollapseLayout); | |||
})(); | |||
</script> | |||
Edição das 01h53min de 2 de junho de 2025
<style>
@media (max-width: 1530px) {
.homepage-content {
flex-direction: column !important;
}
.menu-col,
.side-col {
min-width: 100% !important;
width: 100% !important;
flex: 1 1 100% !important;
}
}
@supports (container-type: inline-size) {
.homepage-content {
container-type: inline-size;
container-name: mainpage;
}
@container mainpage (max-width: 1530px) {
.homepage-content {
flex-direction: column !important;
}
.menu-col,
.side-col {
width: 100% !important;
min-width: 100% !important;
flex: 1 1 100% !important;
}
}
}
</style>
<script>
(function () {
function checkCollapseLayout() {
const content = document.querySelector('.homepage-content');
const menuCol = document.querySelector('.menu-col');
const sideCol = document.querySelector('.side-col');
if (!content || !menuCol || !sideCol) return;
const contentWidth = content.offsetWidth;
if (contentWidth <= 1530) {
content.style.flexDirection = 'column';
menuCol.style.minWidth = '100%';
menuCol.style.width = '100%';
sideCol.style.minWidth = '100%';
sideCol.style.width = '100%';
sideCol.style.flex = '1 1 100%';
} else {
content.style.flexDirection = ;
menuCol.style.minWidth = ;
menuCol.style.width = ;
sideCol.style.minWidth = ;
sideCol.style.width = ;
sideCol.style.flex = ;
}
}
window.addEventListener('resize', checkCollapseLayout);
document.addEventListener('DOMContentLoaded', checkCollapseLayout);
})();
</script>