reforma da interface da página de projetos
Deploy / Deploy (push) Successful in 1m39s
Details
Deploy / Deploy (push) Successful in 1m39s
Details
This commit is contained in:
parent
1bc140b2aa
commit
f442d2ed34
|
|
@ -20,7 +20,7 @@ permalink: /projetos/
|
||||||
<div style="width: 60px; height: 4px; background-color: #3273dc; margin: 1rem auto; border-radius: 2px;"></div>
|
<div style="width: 60px; height: 4px; background-color: #3273dc; margin: 1rem auto; border-radius: 2px;"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="box has-background-white-ter mb-6 p-0" style="border: 1px solid #dbdbdb; overflow: hidden;">
|
<div class="box has-background-white-ter mb-6 p-0" style="border: 1px solid #dbdbdb; overflow: hidden; height: auto;">
|
||||||
|
|
||||||
<div class="p-3 is-clickable" id="filter-toggle-btn" style="cursor: pointer; display: flex; align-items: center; justify-content: space-between; background-color: #f5f5f5;">
|
<div class="p-3 is-clickable" id="filter-toggle-btn" style="cursor: pointer; display: flex; align-items: center; justify-content: space-between; background-color: #f5f5f5;">
|
||||||
<div class="icon-text has-text-weight-bold has-text-grey-dark">
|
<div class="icon-text has-text-weight-bold has-text-grey-dark">
|
||||||
|
|
@ -315,25 +315,30 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||||
const filterBtn = document.getElementById('filter-toggle-btn');
|
const filterBtn = document.getElementById('filter-toggle-btn');
|
||||||
const filterContent = document.getElementById('filter-content');
|
const filterContent = document.getElementById('filter-content');
|
||||||
const filterChevron = document.getElementById('filter-chevron');
|
const filterChevron = document.getElementById('filter-chevron');
|
||||||
let isFilterOpen = false;
|
|
||||||
|
// Define estado inicial baseado na largura da tela
|
||||||
|
let isFilterOpen = window.innerWidth > 1024;
|
||||||
|
|
||||||
// Abre o menu automaticamente se a tela for grande (Desktop), fecha em Mobile
|
// Função para aplicar o estado visual
|
||||||
if(window.innerWidth > 1024) {
|
function updateFilterState() {
|
||||||
isFilterOpen = true;
|
if(isFilterOpen) {
|
||||||
filterContent.style.display = 'block';
|
filterContent.style.display = 'block';
|
||||||
filterChevron.style.transform = 'rotate(180deg)';
|
filterChevron.style.transform = 'rotate(180deg)';
|
||||||
|
} else {
|
||||||
|
filterContent.style.display = 'none';
|
||||||
|
filterChevron.style.transform = 'rotate(0deg)';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Aplica estado inicial ao carregar
|
||||||
|
if (filterContent && filterChevron) {
|
||||||
|
updateFilterState();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(filterBtn && filterContent) {
|
if(filterBtn && filterContent) {
|
||||||
filterBtn.addEventListener('click', () => {
|
filterBtn.addEventListener('click', () => {
|
||||||
isFilterOpen = !isFilterOpen;
|
isFilterOpen = !isFilterOpen; // Inverte o estado
|
||||||
if(isFilterOpen) {
|
updateFilterState(); // Aplica a mudança
|
||||||
filterContent.style.display = 'block';
|
|
||||||
filterChevron.style.transform = 'rotate(180deg)';
|
|
||||||
} else {
|
|
||||||
filterContent.style.display = 'none';
|
|
||||||
filterChevron.style.transform = 'rotate(0deg)';
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue