Skip to content

Commit

Permalink
Merge pull request #136 from Janaka-Steph/modal-grant
Browse files Browse the repository at this point in the history
Replace email modal with grant application
  • Loading branch information
filopedraz authored Feb 1, 2024
2 parents f60cc67 + 59f1e08 commit df09038
Show file tree
Hide file tree
Showing 9 changed files with 181 additions and 730 deletions.
54 changes: 31 additions & 23 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ html:
favicon: assets/favicon.ico
use_edit_page_button: true
use_repository_button: true
announcement: >
<a href="https://www.premai.io/home">Prem App</a> |
<a href="https://dev.premai.io">Developer Portal</a> |
<a href="https://registry.premai.io">Registry</a>
announcement: |
<a target="_blank" href="https://blog.premai.io/announcing-our-startup-grants-program/">
We Launched a Generative AI Startup Grant Program, Apply Now!
</a>
comments:
utterances:
issue-term: pathname
Expand Down Expand Up @@ -58,27 +58,35 @@ parse:
{{ '```{committers} ' + env.docname + '.md\n```' }}
<div id="email-modal" class="modal">
<iframe name="ghost-result" style="display: none;"></iframe>
<form class="modal-content" method="post" action="https://state-of-open-source-ai.vercel.app/api/add-member" target="ghost-result" novalidate="">
<img src="https://static.premai.io/book/book-cover.jpg" alt="book cover" />
<div id="grant-modal" class="modal">
<div class="modal-content">
<div class="header">
<h1>Apply for our a Generative AI Startup Program</h1>
<button class="close" onclick="modalButtonClose()">
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.85632 5.64645L6.50277 6L6.85632 6.35355L11.3815 10.8787C11.4448 10.9455 11.4798 11.0343 11.479 11.1264C11.4781 11.2197 11.4407 11.3089
11.3748 11.3748C11.3089 11.4407 11.2197 11.4781 11.1264 11.479C11.0343 11.4798 10.9455 11.4448 10.8787 11.3815L6.35355 6.85632L6 6.50277L5.64645 6.85632L1.11754
11.3852L1.11749 11.3852L1.11145 11.3914C1.07864 11.4254 1.0394 11.4525 0.996011 11.4711C0.952617 11.4898 0.905949 11.4996 0.858732 11.5C0.81151 11.5004 0.764679
11.4914 0.720971 11.4735C0.677266 11.4556 0.637558 11.4292 0.604165 11.3958C0.570773 11.3624 0.544365 11.3227 0.526484 11.279C0.508601 11.2353 0.499603 11.1885
0.500013 11.1413C0.500424 11.094 0.510235 11.0474 0.528873 11.004C0.547512 10.9606 0.574606 10.9214 0.608573 10.8886L0.608625 10.8886L0.614771 10.8825L5.14368 6.35355L5.49723
6L5.14368 5.64645L0.618506 1.12127C0.55521 1.05447 0.520241 0.96569 0.521042 0.873579C0.521852 0.780331 0.559254 0.691132 0.625193 0.625193C0.691132 0.559254 0.780331 0.521852
0.873579 0.521042C0.96569 0.520241 1.05447 0.55521 1.12127 0.618506L5.64645 5.14368L6 5.49723L6.35355 5.14368L10.8825 0.614771L10.8825 0.614824L10.8886 0.608573C10.9214 0.574606
10.9606 0.547512 11.004 0.528874C11.0474 0.510235 11.094 0.500424 11.1413 0.500013C11.1885 0.499603 11.2353 0.508601 11.279 0.526483C11.3227 0.544365 11.3624 0.570773 11.3958
0.604165C11.4292 0.637558 11.4556 0.677266 11.4735 0.720971C11.4914 0.764679 11.5004 0.81151 11.5 0.858732C11.4996 0.905949 11.4898 0.952617 11.4711 0.996008C11.4525 1.0394 11.4254
1.07864 11.3914 1.11145L11.3914 1.11139L11.3852 1.11754L6.85632 5.64645Z" fill="#878787" stroke="#878787"/>
</svg>
</button>
</div>
<img src="https://static.premai.io/book/grant.png" alt="grant cover" />
<div class="modal-text">
<h1>Enter your email to access this book for free</h1>
<p>
We&rsquo;ll send you updates whenever we make major changes<br />
(no spam nor giving your email to anyone else).
</p>
<div class="input-container">
<input type="email" id="email-input" name="email" placeholder="Enter your email..." />
<button type="submit" id="email-submit" class="button" onclick="emailButtonClick()">Subscribe</button>
</div>
<p>
This book is open source; you can also read &amp; contribute at<br />
<a href="https://github.com/premAI-io/state-of-open-source-ai" target="_blank"><i class="fa-brands fa-github"></i>&nbsp;premAI-io/state-of-open-source-ai</a>.
</p>
<span class="email-error"></span>
<ul>
<li>Free usage of OpenAl, Anthropic, Cohere, Llama2, and Mistral APIs for 6 months.</li>
<li>Free Fine-tuning jobs for both closed and open-source models.</li>
<li>Free Models Deployment Made Effortless.</li>
</ul>
<a class="btn-apply" href="https://blog.premai.io/announcing-our-startup-grants-program/" target="_blank">Apply Here</a>
</div>
</form>
</div>
</div>
myst_enable_extensions: # https://myst-parser.readthedocs.io/en/latest/using/syntax-optional.html
# needs myst-parser>=0.19 <- https://github.com/executablebooks/MyST-NB/issues/530
Expand Down
136 changes: 0 additions & 136 deletions _static/emails.css

This file was deleted.

53 changes: 0 additions & 53 deletions _static/emails.js

This file was deleted.

115 changes: 115 additions & 0 deletions _static/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
/* Grant modal */

.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;
}


/* Announcement Banner */

.bd-header-announcement__content a {
background-color: #f58e8e;
color: white;
font-weight: bold;
width: 100%;
height: 100%;
position: absolute;
top: 0;
right: 0;
display: flex;
justify-content: center;
align-items: center;
text-decoration: none;
}

.bd-header-announcement__content a:hover {
color: rgba(255, 255, 255, 0.90);
}
Loading

0 comments on commit df09038

Please sign in to comment.