Skip to content

Commit

Permalink
fix: modal search bar
Browse files Browse the repository at this point in the history
  • Loading branch information
tangivelPM committed Oct 30, 2023
1 parent e284254 commit 052ac59
Show file tree
Hide file tree
Showing 10 changed files with 168 additions and 32 deletions.
25 changes: 22 additions & 3 deletions exercicio/corrigido/tabela.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ <h2>Agenda do Evento</h2>
</section>
</main>
<div class="spacer mt-5"></div>
<section class="footer-supporters">
<footer class="footer-supporters">
<h2 class="footer-supporters__title">Apoios</h2>
<div class="apoios-logos">
<img class="img-fluid" src="../img/republicaportuguesa_black.png" alt="Logo 1"
Expand All @@ -110,10 +110,29 @@ <h2 class="footer-supporters__title">Apoios</h2>
<a href="/contactos">Contactos</a>
</div>
</div>
</section>

</footer>

<!-- Modal - Search -->
<div class="modal" style="display: none;" id="searchModal">
<div class="modal-content">
<img src="../img/close.svg" id="closeModalButton" class="close-button">
<h2>Pesquisar</h2>
<div class="search-form">
<input type="text" id="searchInput" placeholder="Pesquisar">
<button id="searchButton">Pesquisar</button>
</div>
</div>
</div>
</body>

<script>
document.getElementById("openModalButton").addEventListener("click", function () {
document.getElementById("searchModal").style.display = "flex";
});

document.getElementById("closeModalButton").addEventListener("click", function () {
document.getElementById("searchModal").style.display = "none";
});
</script>

</html>
22 changes: 22 additions & 0 deletions exercicio/original/evento.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,27 @@ <h3>Apoios</h3>
</div>
</div>
</footer>

<!-- Modal - Search -->
<div class="modal" style="display: none;" id="searchModal">
<div class="modal-content">
<img src="../img/close.svg" id="closeModalButton" class="close-button">
<h2>Pesquisar</h2>
<div class="search-form">
<input type="text" id="searchInput" placeholder="Pesquisar">
<button id="searchButton">Pesquisar</button>
</div>
</div>
</div>
</body>

<script>
document.getElementById("openModalButton").addEventListener("click", function () {
document.getElementById("searchModal").style.display = "flex";
});

document.getElementById("closeModalButton").addEventListener("click", function () {
document.getElementById("searchModal").style.display = "none";
});
</script>
</html>
22 changes: 22 additions & 0 deletions exercicio/original/home-chart - cópia.html
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,28 @@ <h1>Participação no Evento Anteriores</h1>
}
});
</script>

<!-- Modal - Search -->
<div class="modal" style="display: none;" id="searchModal">
<div class="modal-content">
<img src="../img/close.svg" id="closeModalButton" class="close-button">
<h2>Pesquisar</h2>
<div class="search-form">
<input type="text" id="searchInput" placeholder="Pesquisar">
<button id="searchButton">Pesquisar</button>
</div>
</div>
</div>
</body>

<script>
document.getElementById("openModalButton").addEventListener("click", function () {
document.getElementById("searchModal").style.display = "flex";
});

document.getElementById("closeModalButton").addEventListener("click", function () {
document.getElementById("searchModal").style.display = "none";
});
</script>

</html>
22 changes: 22 additions & 0 deletions exercicio/original/home-chart.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,28 @@ <h1>Participação no Evento Anteriores</h1>
});

</script>

<!-- Modal - Search -->
<div class="modal" style="display: none;" id="searchModal">
<div class="modal-content">
<img src="../img/close.svg" id="closeModalButton" class="close-button">
<h2>Pesquisar</h2>
<div class="search-form">
<input type="text" id="searchInput" placeholder="Pesquisar">
<button id="searchButton">Pesquisar</button>
</div>
</div>
</div>
</body>

<script>
document.getElementById("openModalButton").addEventListener("click", function () {
document.getElementById("searchModal").style.display = "flex";
});

document.getElementById("closeModalButton").addEventListener("click", function () {
document.getElementById("searchModal").style.display = "none";
});
</script>

</html>
25 changes: 10 additions & 15 deletions exercicio/original/index-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@ <h3>Apoios</h3>
</div>
</div>



<div class="modal" id="searchModal">
<!-- Modal - Search -->
<div class="modal" style="display: none;" id="searchModal">
<div class="modal-content">
<img src="../img/close.svg" id="closeModalButton" class="close-button">
<h2>Pesquisar</h2>
Expand All @@ -109,20 +108,16 @@ <h2>Pesquisar</h2>
</div>
</div>
</div>




</body>

<script>
document.getElementById("openModalButton").addEventListener("click", function () {
document.getElementById("searchModal").style.display = "block";
});
<script>
document.getElementById("openModalButton").addEventListener("click", function () {
document.getElementById("searchModal").style.display = "flex";
});

document.getElementById("closeModalButton").addEventListener("click", function () {
document.getElementById("searchModal").style.display = "none";
});
</script>
document.getElementById("closeModalButton").addEventListener("click", function () {
document.getElementById("searchModal").style.display = "none";
});
</script>

</html>
22 changes: 22 additions & 0 deletions exercicio/original/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,28 @@ <h3>Apoios</h3>
});

</script>

<!-- Modal - Search -->
<div class="modal" style="display: none;" id="searchModal">
<div class="modal-content">
<img src="../img/close.svg" id="closeModalButton" class="close-button">
<h2>Pesquisar</h2>
<div class="search-form">
<input type="text" id="searchInput" placeholder="Pesquisar">
<button id="searchButton">Pesquisar</button>
</div>
</div>
</div>
</body>

<script>
document.getElementById("openModalButton").addEventListener("click", function () {
document.getElementById("searchModal").style.display = "flex";
});

document.getElementById("closeModalButton").addEventListener("click", function () {
document.getElementById("searchModal").style.display = "none";
});
</script>

</html>
10 changes: 5 additions & 5 deletions exercicio/original/inscricao.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ <h2>Formulário de Inscrição</h2>



<div class="footer-supporters">
<footer class="footer-supporters">
<h3>Apoios</h3>
<div class="apoios-logos">
<img src="../img/republicaportuguesa_black.png" alt="Logo 1"
Expand All @@ -122,11 +122,11 @@ <h3>Apoios</h3>
<a href="/contactos">Contactos</a>
</div>
</div>
</div>

</footer>


<div class="modal" id="searchModal">
<!-- Modal - Search -->
<div class="modal" style="display: none;" id="searchModal">
<div class="modal-content">
<img src="../img/close.svg" id="closeModalButton" class="close-button">
<h2>Pesquisar</h2>
Expand All @@ -144,7 +144,7 @@ <h2>Pesquisar</h2>

<script>
document.getElementById("openModalButton").addEventListener("click", function () {
document.getElementById("searchModal").style.display = "block";
document.getElementById("searchModal").style.display = "flex";
});

document.getElementById("closeModalButton").addEventListener("click", function () {
Expand Down
21 changes: 20 additions & 1 deletion exercicio/original/tabela.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,27 @@ <h3>Apoios</h3>
</div>
</div>


<!-- Modal - Search -->
<div class="modal" style="display: none;" id="searchModal">
<div class="modal-content">
<img src="../img/close.svg" id="closeModalButton" class="close-button">
<h2>Pesquisar</h2>
<div class="search-form">
<input type="text" id="searchInput" placeholder="Pesquisar">
<button id="searchButton">Pesquisar</button>
</div>
</div>
</div>
</body>

<script>
document.getElementById("openModalButton").addEventListener("click", function () {
document.getElementById("searchModal").style.display = "flex";
});

document.getElementById("closeModalButton").addEventListener("click", function () {
document.getElementById("searchModal").style.display = "none";
});
</script>

</html>
25 changes: 20 additions & 5 deletions exercicio/original/videos.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,27 @@ <h3 class="margin-bottom-xxlarge">Videos anteriores</h3>
<hr>
</div>

<!-- Modal - Search -->
<div class="modal" style="display: none;" id="searchModal">
<div class="modal-content">
<img src="../img/close.svg" id="closeModalButton" class="close-button">
<h2>Pesquisar</h2>
<div class="search-form">
<input type="text" id="searchInput" placeholder="Pesquisar">
<button id="searchButton">Pesquisar</button>
</div>
</div>
</div>
</body>

<script>
document.getElementById("openModalButton").addEventListener("click", function () {
document.getElementById("searchModal").style.display = "flex";
});





</body>
document.getElementById("closeModalButton").addEventListener("click", function () {
document.getElementById("searchModal").style.display = "none";
});
</script>

</html>
6 changes: 3 additions & 3 deletions exercicio/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,10 @@ button {
}

.modal-content {
display: block;
display: block !important;
background-color: #fff;
padding: 20px;
width: 60%;
width: 60% !important;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
}

Expand Down Expand Up @@ -314,7 +314,7 @@ border: 0;

.image-section {
width: 100%;
height: 50vw;
min-height: 50vw;
background-image: url('img/Banner- site-900x450px (1).png');
background-size: cover;
background-position: center center;
Expand Down

0 comments on commit 052ac59

Please sign in to comment.