diff --git a/.gitignore b/.gitignore index db014d1..01de09b 100644 --- a/.gitignore +++ b/.gitignore @@ -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 + diff --git a/_config.yml b/_config.yml index eef358a..eb45ee9 100644 --- a/_config.yml +++ b/_config.yml @@ -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 @@ -59,66 +59,74 @@ parse: 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.* @@ -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 diff --git a/_static/emails.css b/_static/emails.css index d3fcad3..00ed1d5 100644 --- a/_static/emails.css +++ b/_static/emails.css @@ -5,15 +5,52 @@ 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 { @@ -21,46 +58,79 @@ 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; } diff --git a/_static/emails.js b/_static/emails.js index 63d08aa..171ba27 100644 --- a/_static/emails.js +++ b/_static/emails.js @@ -21,7 +21,7 @@ function getCookie(cname) { } async function emailButtonClick() { - let emailInput = document.getElementById("email"); + let emailInput = document.getElementById("email-input"); let emailValue = emailInput.value; let res = await fetch("https://premai.pythonanywhere.com/email?a=" + emailValue); const ok = 200 <= res.status && res.status < 299; @@ -43,11 +43,17 @@ async function emailButtonClick() { document.addEventListener('DOMContentLoaded', function() { let modal = document.getElementById('email-modal'); let email = getCookie("address"); + let emailInput = document.getElementById("email-input"); if (email === "" || email == null) { modal.style.display = 'block'; - let emailInput = document.getElementById("email"); emailInput.value = ""; } - //let closeModalBtn = modal.querySelector('.close'); - //closeModalBtn.addEventListener('click', () => modal.style.display = 'none'); + emailInput.focus() + // When user click Enter, click the submit button + emailInput.addEventListener("keypress", function(event) { + if (event.key === "Enter") { + event.preventDefault(); + document.getElementById("email-submit").click(); + } + }); }); diff --git a/_static/external_target.css b/_static/external_target.css index 5578ce7..5647ba9 100644 --- a/_static/external_target.css +++ b/_static/external_target.css @@ -1,5 +1,5 @@ a.reference.external:after { - content: "\2b77"; + content: "↗"; font-size: .7em; vertical-align: text-top; margin-left: .1em; diff --git a/_static/font.css b/_static/font.css new file mode 100644 index 0000000..e97c7dc --- /dev/null +++ b/_static/font.css @@ -0,0 +1,21 @@ +@font-face { + font-family: "Pretendard"; + src: url("https://static.premai.io/fonts/Pretendard-Regular.woff2") format("woff2"); + font-weight: normal; +} + +@font-face { + font-family: "Pretendard"; + src: url("https://static.premai.io/fonts/Pretendard-SemiBold.woff2") format("woff2"); + font-weight: 600; +} + +@font-face { + font-family: "Pretendard"; + src: url("https://static.premai.io/fonts/Pretendard-Bold.woff2") format("woff2"); + font-weight: bold; +} + +* { + font-family: Pretendard, sans-serif; +}