Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Anais05 committed Jan 6, 2021
1 parent 74e7ea1 commit 0e0ff5b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 12 deletions.
25 changes: 13 additions & 12 deletions starterOnly/modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ img {
margin: 3.5%;
}
.header-logo {
float: left;
float: left;
}
.main-navbar {
float: right;
float: right;
}
.topnav a {
float: left;
Expand Down Expand Up @@ -69,15 +69,19 @@ img {
}

@media screen and (max-width: 768px) {
.topnav a {display: none;}
.topnav a {
display: none;
}
.topnav a.icon {
float: right;
display: block;
}
}

@media screen and (max-width: 768px) {
.topnav.responsive {position: relative;}
.topnav.responsive {
position: relative;
}
.topnav.responsive .icon {
position: absolute;
right: 0;
Expand All @@ -90,16 +94,16 @@ img {
}
}



@media screen and (max-width: 540px) {
.topnav a {display: none;}
@media screen and (max-width: 540px) {
.topnav a {
display: none;
}
.topnav a.icon {
float: right;
display: block;
margin-top: -15px;
}
}
}

main {
font-size: 130%;
Expand All @@ -111,8 +115,6 @@ main {
margin: 1px 20px 15px;
border-radius: 2rem;
text-align: justify;


}

.modal-btn {
Expand Down Expand Up @@ -526,4 +528,3 @@ footer {
opacity: 1;
}
}

11 changes: 11 additions & 0 deletions starterOnly/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ function editNav() {
const modalbg = document.querySelector(".bground");
const modalBtn = document.querySelectorAll(".modal-btn");
const formData = document.querySelectorAll(".formData");
const modalCloseBtn = document.querySelectorAll(".close");

// launch modal event
modalBtn.forEach((btn) => btn.addEventListener("click", launchModal));
Expand All @@ -20,4 +21,14 @@ function launchModal() {
modalbg.style.display = "block";
}

// close modal event
modalCloseBtn[0].addEventListener("click", closeModal, false);

// close modal form
function closeModal() {
modalbg.style.display = "none";
}




0 comments on commit 0e0ff5b

Please sign in to comment.