-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace email modal with grant application
- Loading branch information
1 parent
f728184
commit 5464c7f
Showing
9 changed files
with
153 additions
and
726 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
.modal { | ||
display: none; | ||
position: fixed; | ||
left: 0; | ||
top: 0; | ||
width: 100%; | ||
height: 100%; | ||
background-color: rgba(0, 0, 0, 0.8); | ||
} | ||
|
||
.modal-content { | ||
display: flex; | ||
flex-direction: column; | ||
margin: 15% auto; | ||
width: 42vw; | ||
padding: 80px 40px; | ||
background-color: rgba(20, 20, 20, 1); | ||
box-shadow: 0 0 22px 1px black; | ||
gap: 30px; | ||
align-items: center; | ||
} | ||
|
||
@media only screen and (max-width: 480px) { | ||
.modal-content { | ||
width: 90vw !important; | ||
flex-direction: column !important; | ||
} | ||
} | ||
|
||
@media only screen and (min-width: 481px) and (max-width: 1022px) { | ||
.modal-content { | ||
width: 70vw !important; | ||
flex-direction: column !important; | ||
} | ||
} | ||
|
||
.modal-content img { | ||
width: 100%; | ||
} | ||
|
||
.modal-content .header { | ||
width: 100%; | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
|
||
.modal-content .header button.close { | ||
background: transparent; | ||
border: none; | ||
margin-left: 10px; | ||
} | ||
|
||
.modal-content .btn-apply { | ||
float: right; | ||
color: white; | ||
border: none; | ||
text-align: center; | ||
font-size: 0.8rem; | ||
font-style: normal; | ||
font-weight: 600; | ||
line-height: 24px; | ||
border-radius: 6px; | ||
background: #F17B74; | ||
padding: 10px 24px; | ||
text-decoration: none; | ||
} | ||
|
||
.modal-content .btn-apply:hover { | ||
color: rgba(255, 255, 255, 0.85); | ||
} | ||
|
||
.modal-content h1 { | ||
color: #878787; | ||
font-size: 1.3rem; | ||
font-style: normal; | ||
font-weight: bold; | ||
line-height: normal; | ||
margin-bottom: 0; | ||
} | ||
|
||
.modal-content ul { | ||
padding-inline-start: 1rem; | ||
} | ||
|
||
.modal-content li { | ||
color: #878787; | ||
font-size: 1rem; | ||
font-style: normal; | ||
font-weight: 600; | ||
line-height: 26px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/// set/get helpers based on https://www.w3schools.com/js/js_cookies.asp | ||
function setCookie(cname, cvalue, exdays) { | ||
const d = new Date(); | ||
d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); | ||
document.cookie = cname + "=" + cvalue + ";expires=" + d.toUTCString() + ";SameSite=Strict;path=/"; | ||
} | ||
|
||
function getCookie(cname) { | ||
let name = cname + "="; | ||
let ca = document.cookie.split(';'); | ||
for (let i = 0; i < ca.length; i++) { | ||
let c = ca[i]; | ||
while (c.charAt(0) === ' ') { | ||
c = c.substring(1); | ||
} | ||
if (c.indexOf(name) === 0) { | ||
return c.substring(name.length, c.length); | ||
} | ||
} | ||
return ""; | ||
} | ||
|
||
function modalButtonClose() { | ||
let modal = document.getElementById('grant-modal'); | ||
modal.style.display = 'none'; | ||
setCookie("grant-modal", true, 365); // might fail if cookies disabled | ||
} | ||
|
||
document.addEventListener('DOMContentLoaded', function() { | ||
let modal = document.getElementById('grant-modal'); | ||
let grantModal = getCookie("grant-modal"); | ||
if (grantModal === false || grantModal === "" || grantModal === null) { | ||
modal.style.display = 'block'; | ||
} | ||
}); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.