Skip to content

Commit

Permalink
Merge pull request #138 from Janaka-Steph/center-modal
Browse files Browse the repository at this point in the history
Center modal
  • Loading branch information
filopedraz authored Feb 2, 2024
2 parents df09038 + d83c728 commit e8f8556
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ parse:
</svg>
</button>
</div>
<img src="https://static.premai.io/book/grant.png" alt="grant cover" />
<img src="https://static.premai.io/book/grant.jpg" alt="grant cover" />
<div class="modal-text">
<ul>
<li>Free usage of OpenAl, Anthropic, Cohere, Llama2, and Mistral APIs for 6 months.</li>
Expand Down
8 changes: 3 additions & 5 deletions _static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@

.modal {
display: none;
position: fixed;
left: 0;
top: 0;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
display: flex;
flex-direction: column;
margin: 15% auto;
margin: 0 auto;
width: 42vw;
padding: 80px 40px;
background-color: rgba(20, 20, 20, 1);
Expand Down
2 changes: 1 addition & 1 deletion _static/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ 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';
modal.style.display = 'flex';
}
});

0 comments on commit e8f8556

Please sign in to comment.