Skip to content

Commit

Permalink
Better email modal + pretendard font + fix link utf8 char
Browse files Browse the repository at this point in the history
  • Loading branch information
Janaka-Steph committed Oct 10, 2023
1 parent 5bd0dd9 commit 65912c3
Show file tree
Hide file tree
Showing 6 changed files with 270 additions and 85 deletions.
80 changes: 80 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,83 @@ __pycache__/
# jupyter-book
/_build/
/conf.py

### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

114 changes: 61 additions & 53 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repository:
url: https://github.com/premAI-io/state-of-open-source-ai
branch: main
only_build_toc_files: true
exclude_patterns: [.github/*]
exclude_patterns: [ .github/* ]
html:
baseurl: http://localhost:8000
favicon: assets/favicon.ico
Expand Down Expand Up @@ -59,66 +59,74 @@ parse:
<div id="email-modal" class="modal">
<div class="modal-content">
<!--<div class="header"><span class="close">&times;</span></div>-->
<label for="name">To access this book for free, please enter your email. We won't spam you!</label>
<input type="email" id="email" name="email" />
<button id="email-submit" onclick="emailButtonClick()">Submit</button>
<span class="email-error"></span>
<img src="https://static.premai.io/book/book-cover.jpg" alt="book cover" />
<div class="modal-text">
<h1>Enter your email to access</h1>
<p>
Enter your email to access the book and we’ll also keep you in the loop as we make updates.
The book is open source, you can also read and contribute on <a href="https://github.com/premAI-io/state-of-open-source-ai" target="_blank">Github</a>.
</p>
<div class="input-container">
<input type="email" id="email-input" name="email" placeholder="Enter your email..." />
<button id="email-submit" onclick="emailButtonClick()">Subscribe</button>
</div>
<span class="email-error"></span>
</div>
</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
#- attrs_block
#- attrs_inline
- deflist
- dollarmath
- html_admonition
- linkify
- replacements
- smartquotes
- substitution
- tasklist
# needs myst-parser>=0.19 <- https://github.com/executablebooks/MyST-NB/issues/530
#- attrs_block
#- attrs_inline
- deflist
- dollarmath
- html_admonition
- linkify
- replacements
- smartquotes
- substitution
- tasklist
sphinx:
extra_extensions:
- sphinx_last_updated_by_git
- sphinx_subfigure
# custom (local *.py files)
- badges
- committers
- bibliography
- sphinx_last_updated_by_git
- sphinx_subfigure
# custom (local *.py files)
- badges
- committers
- bibliography
config:
myst_heading_anchors: 4
html_js_files:
- [https://analytics.prem.ninja/js/script.js, {defer: defer, data-domain: book.premai.io}]
- [ https://analytics.prem.ninja/js/script.js, { defer: defer, data-domain: book.premai.io } ]
linkcheck_ignore:
- http://localhost:8000
- https://github.com/premAI-io/state-of-open-source-ai/edit/main/.*.md
# GitHub anchors
- https://github.com/\w+/\w+/blob/\w+/.*#L\d+(-L\d+)?
- https://github.com/premAI-io/prem-app#.*
- https://github.com/BlinkDL/RWKV-LM#.*
- https://github.com/CompVis/stable-diffusion/blob/main/Stable_Diffusion_v1_Model_Card.md#.*
- https://github.com/ggerganov/ggml#.*
- https://github.com/huggingface/optimum#.*
- https://github.com/imaurer/awesome-decentralized-llm#.*
- https://github.com/kingoflolz/mesh-transformer-jax#.*
- https://github.com/lm-sys/FastChat.*#.*
- https://github.com/mistralai/mistral-src#.*
- https://github.com/onnx/onnx-tensorrt/blob/main/docs/operators.md#.*
- https://github.com/onnx/onnx-tensorrt#.*
- https://github.com/onnx/tutorials#.*
- https://gist.github.com/veekaybee/be375ab33085102f9027853128dc5f0e#.*
# misc
- https://www.nytimes.com/2016/04/19/technology/google-books-case.html
- https://doi.org/10.2307/2214413
- https://direct.mit.edu/daed/article/151/2/127/110621/Human-Language-Understanding-amp-Reasoning
- https://numfocus.org
- https://chat.openai.com
- https://falconllm.tii.ae
- https://www.midjourney.com
- https://accent.gmu.edu
- https://www.crcv.ucf.edu/data/UCF101.php
- https://www.pinecone.io/learn/series/faiss/locality-sensitive-hashing
- http://localhost:8000
- https://github.com/premAI-io/state-of-open-source-ai/edit/main/.*.md
# GitHub anchors
- https://github.com/\w+/\w+/blob/\w+/.*#L\d+(-L\d+)?
- https://github.com/premAI-io/prem-app#.*
- https://github.com/BlinkDL/RWKV-LM#.*
- https://github.com/CompVis/stable-diffusion/blob/main/Stable_Diffusion_v1_Model_Card.md#.*
- https://github.com/ggerganov/ggml#.*
- https://github.com/huggingface/optimum#.*
- https://github.com/imaurer/awesome-decentralized-llm#.*
- https://github.com/kingoflolz/mesh-transformer-jax#.*
- https://github.com/lm-sys/FastChat.*#.*
- https://github.com/mistralai/mistral-src#.*
- https://github.com/onnx/onnx-tensorrt/blob/main/docs/operators.md#.*
- https://github.com/onnx/onnx-tensorrt#.*
- https://github.com/onnx/tutorials#.*
- https://gist.github.com/veekaybee/be375ab33085102f9027853128dc5f0e#.*
# misc
- https://www.nytimes.com/2016/04/19/technology/google-books-case.html
- https://doi.org/10.2307/2214413
- https://direct.mit.edu/daed/article/151/2/127/110621/Human-Language-Understanding-amp-Reasoning
- https://numfocus.org
- https://chat.openai.com
- https://falconllm.tii.ae
- https://www.midjourney.com
- https://accent.gmu.edu
- https://www.crcv.ucf.edu/data/UCF101.php
- https://www.pinecone.io/learn/series/faiss/locality-sensitive-hashing
linkcheck_allowed_redirects:
https://doi.org/.*/.*: https://.*
https://codespaces.new/.*: https://github.com/login.*
Expand All @@ -141,7 +149,7 @@ sphinx:
preamble: |
\usepackage{etoolbox}
\AtBeginEnvironment{figure}{\pretocmd{\hyperlink}{\protect}{}{}}
bibtex_bibfiles: [references.bib] # citations
bibtex_bibfiles: [ references.bib ] # citations
latex: # for PDF builds
latex_documents:
targetname: book.tex
Expand Down
124 changes: 97 additions & 27 deletions _static/emails.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,62 +5,132 @@
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.4);
background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
display: flex;
flex-direction: row;
margin: 15% auto;
width: 50vw;
padding: 30px;
width: 60vw;
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;
}
.modal-content input {
font-size: 0.9rem !important;
}
.modal-content button {
padding: 10px !important;
}
.modal-content img {
width: 50vw !important;
}
}

@media only screen and (min-width: 481px) and (max-width: 1022px) {
.modal-content {
width: 70vw !important;
flex-direction: column !important;
}
.modal-content input {
font-size: 0.95rem !important;
}
.modal-content img {
width: 30vw !important;
}
}

.modal-content img {
width: 20vw;
}

.modal-content .header {
display: flex;
justify-content: flex-end;
}

.modal-content label {
font-size: 1.2em;
}

.modal-content input {
border: 1px solid #F58E8E;
border-radius: 3px;
border: none;
background-color: transparent;
margin: 10px 0;
flex: 1;
color: rgba(255, 255, 255, 0.70);
font-size: 1rem;
font-style: normal;
font-weight: 400;
line-height: normal;
width: 100%;
}

.modal-content input:focus {
outline: none !important;
box-shadow: 0 0 10px #F58E8E;
}

.modal-content button {
color: black;
background-color: #F58E8E;
color: white;
border: none;
border-radius: 3px;
font-size: 1.3em;
text-align: center;
font-size: 0.8rem;
font-style: normal;
font-weight: 700;
line-height: 24px;
border-radius: 6px;
background: linear-gradient(90deg, #F58E8E 0%, #F1B370 100%);
padding: 10px 24px;
}

/*
.close {
color: black;
font-size: 28px;
.modal-content .email-error {
display: flex;
color: red;
font-size: 0.9em;
margin-top: 4px;
}

.modal-content .input-container {
display: flex;
padding: 18px 16px;
align-items: center;
align-self: stretch;
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.20);
}

.modal-content h1 {
color: #FFF;
font-size: 1.3rem;
font-style: normal;
font-weight: bold;
line-height: normal;
}

.close:hover,
.close:focus {
color: #F58E8E;
.modal-content p {
color: #FFF;
font-size: 1rem;
font-style: normal;
font-weight: 400;
line-height: 26px;
}

.modal-content .modal-text {
flex: 1;
overflow: auto;
}

.modal-content a {
text-decoration: none;
cursor: pointer;
color: #F58E8E;
}
*/

.modal-content .email-error {
color: red;
font-size: 0.9em;
margin-top: 4px;
.modal-content a:hover {
text-decoration: none;
color: #F1B370;
}
Loading

0 comments on commit 65912c3

Please sign in to comment.