Skip to content

Commit

Permalink
Improve modal styles (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
Janaka-Steph committed Mar 25, 2024
1 parent 9565747 commit c89350d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 13 deletions.
42 changes: 29 additions & 13 deletions _static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,41 +21,57 @@
.modal-content {
width: 90vw !important;
flex-direction: column !important;
align-items: center;
padding: 25px;
align-items: center !important;
padding: 25px !important;
}
.modal-content h1 {
font-size: 1.3rem !important;
margin-bottom: 5vh;
font-size: 1.2rem !important;
margin-bottom: 5vh !important;
}
.modal-content p {
font-size: 0.9rem !important;
}
.modal-content .input-container {
padding: 6px !important;
}
.modal-content input {
font-size: 0.9rem !important;
}
.modal-content input.button {
padding: 10px !important;
.modal-content .input-container .button {
padding: 6px 18px !important;
}
.modal-content img {
width: 50vw !important;
min-width: 35vw !important;
max-width: 40vw !important;
}
}

@media only screen and (min-width: 481px) and (max-width: 1022px) {
.modal-content {
width: 70vw !important;
flex-direction: column !important;
align-items: center;
padding: 35px;
align-items: center !important;
padding: 35px !important;
}
.modal-content h1 {
font-size: 1.5rem !important;
margin-bottom: 5vh !important;
}
.modal-content .input-container {
padding: 8px 12px !important;
}
.modal-content input {
font-size: 0.95rem !important;
}
.modal-content img {
width: 30vw !important;
min-width: 20vw !important;
max-width: 25vw !important;
}
}

.modal-content img {
width: 20vw;
min-width: 10vw;
max-width: 15vw;
height: 100%;
}

Expand Down Expand Up @@ -102,7 +118,7 @@

.modal-content .input-container {
display: flex;
padding: 12px 16px;
padding: 10px 14px;
align-items: center;
align-self: stretch;
border-radius: 12px;
Expand All @@ -115,7 +131,7 @@
font-style: normal;
font-weight: bold;
line-height: normal;
margin-bottom: 10vh;
margin-bottom: 8vh;
}

.modal-content p {
Expand Down
2 changes: 2 additions & 0 deletions _static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ document.addEventListener('DOMContentLoaded', function() {
let modal = document.getElementById('email-modal');
let emailCookie = getCookie("email");
let emailInput = document.getElementById("email-input");
let body = document.body
if (emailCookie === false || emailCookie === "" || emailCookie === null) {
modal.style.display = 'flex';
emailInput.value = "";
body.style.overflow = "hidden";
}
emailInput.focus()

Expand Down

0 comments on commit c89350d

Please sign in to comment.