From 2040bd00739bccf0243b3c7c9e90c9ec0e7cbbf8 Mon Sep 17 00:00:00 2001 From: Carlos <53526597+carlosgauci@users.noreply.github.com> Date: Mon, 17 Oct 2022 15:34:00 +0200 Subject: [PATCH] community hero, events (#10) * community hero, events * community meetup section, add header/footer color options to frontmatter * top community members * fetch github stats on build, delete serverless function & script * layout changes * reduce social logo size, change discord btn, increase orbit members * fix toc highlighting * fix nav button color * updated margins etc (#16) * making logos smaller again Co-authored-by: Tuana Celik --- api/github.js | 52 ---- archetypes/overview.md | 2 + archetypes/tutorials.md | 2 + config.toml | 4 + content/_index.md | 2 + content/overview/_index.md | 5 + content/overview/demo.md | 2 + content/overview/intro.md | 2 + content/overview/quick-start.md | 2 + content/overview/roadmap.md | 2 + content/overview/use-cases.md | 2 + content/pages/community.md | 90 +++++- content/pages/nlp-resources.md | 2 + content/tutorials/01_Basic_QA_Pipeline.md | 2 + .../02_Finetune_a_model_on_your_data.md | 2 + ...Basic_QA_Pipeline_without_Elasticsearch.md | 2 + content/tutorials/04_FAQ_style_QA.md | 2 + content/tutorials/05_Evaluation.md | 2 + ...etter_Retrieval_via_Embedding_Retrieval.md | 2 + content/tutorials/07_RAG_Generator.md | 2 + content/tutorials/08_Preprocessing.md | 2 + content/tutorials/09_DPR_training.md | 2 + content/tutorials/10_Knowledge_Graph.md | 2 + content/tutorials/11_Pipelines.md | 2 + content/tutorials/12_LFQA.md | 2 + content/tutorials/13_Question_generation.md | 2 + content/tutorials/14_Query_Classifier.md | 2 + content/tutorials/15_TableQA.md | 2 + .../16_Document_Classifier_at_Index_Time.md | 2 + content/tutorials/17_Audio.md | 2 + content/tutorials/18_GPL.md | 2 + content/tutorials/_index.md | 2 + static/images/icons/github.svg | 2 +- static/images/icons/hugging-face.png | Bin 0 -> 2382 bytes static/images/icons/linkedin.svg | 12 + static/images/icons/twitter.svg | 15 + static/images/icons/youtube.svg | 9 + static/images/user-placeholder.jpg | Bin 0 -> 1005 bytes themes/haystack/assets/js/github-stats.js | 61 ---- themes/haystack/assets/js/script.js | 2 - .../haystack/assets/js/table-of-contents.js | 7 +- .../assets/sass/components/_buttons.scss | 28 ++ .../assets/sass/components/_footer.scss | 40 ++- .../assets/sass/components/_forms.scss | 3 +- .../assets/sass/components/_header.scss | 4 + .../assets/sass/components/_navigation.scss | 44 ++- themes/haystack/assets/sass/main.scss | 2 +- .../assets/sass/pages/_community.scss | 263 ++++++++++++++++++ .../haystack/layouts/_default/community.html | 5 + .../haystack/layouts/_default/tutorial.html | 12 +- .../layouts/partials/arrow-button.html | 4 +- .../layouts/partials/community-events.html | 30 ++ .../layouts/partials/community-hero.html | 68 +++++ .../layouts/partials/community-meetup.html | 22 ++ .../layouts/partials/discord-card.html | 13 + themes/haystack/layouts/partials/footer.html | 186 ++++++++----- ...ub-stars.html => github-stars-button.html} | 18 +- .../layouts/partials/github-stats.html | 57 ++++ .../partials/github-top-contributors.html | 24 ++ themes/haystack/layouts/partials/header.html | 3 +- .../layouts/partials/index-community.html | 33 +-- .../layouts/partials/index-github.html | 19 +- .../haystack/layouts/partials/index-hero.html | 2 +- .../layouts/partials/navigation-mobile.html | 2 +- .../haystack/layouts/partials/navigation.html | 2 +- .../layouts/partials/newsletter-card.html | 24 ++ .../partials/orbit-community-members.html | 24 ++ .../haystack/layouts/partials/site-logo.html | 10 +- 68 files changed, 997 insertions(+), 260 deletions(-) delete mode 100644 api/github.js create mode 100644 content/overview/_index.md create mode 100644 static/images/icons/hugging-face.png create mode 100644 static/images/icons/linkedin.svg create mode 100644 static/images/icons/twitter.svg create mode 100644 static/images/icons/youtube.svg create mode 100644 static/images/user-placeholder.jpg delete mode 100644 themes/haystack/assets/js/github-stats.js create mode 100644 themes/haystack/assets/sass/pages/_community.scss create mode 100644 themes/haystack/layouts/_default/community.html create mode 100644 themes/haystack/layouts/partials/community-events.html create mode 100644 themes/haystack/layouts/partials/community-hero.html create mode 100644 themes/haystack/layouts/partials/community-meetup.html create mode 100644 themes/haystack/layouts/partials/discord-card.html rename themes/haystack/layouts/partials/{github-stars.html => github-stars-button.html} (59%) create mode 100644 themes/haystack/layouts/partials/github-stats.html create mode 100644 themes/haystack/layouts/partials/github-top-contributors.html create mode 100644 themes/haystack/layouts/partials/newsletter-card.html create mode 100644 themes/haystack/layouts/partials/orbit-community-members.html diff --git a/api/github.js b/api/github.js deleted file mode 100644 index f37e5682..00000000 --- a/api/github.js +++ /dev/null @@ -1,52 +0,0 @@ -// Fetches star count, contributor count and top contributors from the Github API -import axios from "axios"; -import parse from "parse-link-header"; - -const options = { - headers: { Authorization: `Bearer ${process.env.GITHUB_ACCESS_TOKEN}` }, -}; - -export default async function handler(request, response) { - try { - // Fetch the data - const [starsData, totalContributorsData, topContributorsData] = - await Promise.all([ - // Stars - axios.get("https://api.github.com/repos/deepset-ai/haystack", options), - - // Total contributors - axios.get( - "https://api.github.com/repos/deepset-ai/haystack/contributors?per_page=1", - options - ), - - // Top 10 contributors - axios.get( - "https://api.github.com/repos/deepset-ai/haystack/contributors?per_page=10", - options - ), - ]); - - const stars = starsData.data.stargazers_count; - const parsed = parse(totalContributorsData.headers.link); // parse link header to get total pages - const contributors = parsed.last.page; - const topContributors = topContributorsData.data.map((contrib) => ({ - name: contrib.login, - image: contrib.avatar_url, - contributions: contrib.contributions, - })); - - response.setHeader( - "Cache-Control", - "s-maxage=1800, stale-while-revalidate=1800" - ); - - return response.status(200).json({ - stars, - contributors, - top_contributors: topContributors, - }); - } catch (e) { - return response.status(500).json({ message: e.message }); - } -} diff --git a/archetypes/overview.md b/archetypes/overview.md index 4f1ef9e6..6a293f02 100644 --- a/archetypes/overview.md +++ b/archetypes/overview.md @@ -1,5 +1,7 @@ --- layout: overview +header: light +footer: dark title: "{{ replace .Name "-" " " | title }}" toc: true weight: diff --git a/archetypes/tutorials.md b/archetypes/tutorials.md index e592241f..64446ab5 100644 --- a/archetypes/tutorials.md +++ b/archetypes/tutorials.md @@ -1,5 +1,7 @@ --- layout: tutorial +header: light +footer: dark title: "{{ replace .Name "-" " " | title }}" toc: true date: {{ dateFormat "2006-01-02" .Date }} diff --git a/config.toml b/config.toml index 53f5f687..2eb3115e 100644 --- a/config.toml +++ b/config.toml @@ -14,6 +14,10 @@ theme = "haystack" overview = "/:filename" pages = "/:filename" +[security] + [security.funcs] + getenv = ["^HUGO_", "ORBIT_API_KEY", "GITHUB_ACCESS_TOKEN"] + [markup] # Code blocks [markup.highlight] diff --git a/content/_index.md b/content/_index.md index 15034d81..25320a4e 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,5 +1,7 @@ --- layout: index +header: light +footer: light title: Haystack description: Meta description here diff --git a/content/overview/_index.md b/content/overview/_index.md new file mode 100644 index 00000000..a4521783 --- /dev/null +++ b/content/overview/_index.md @@ -0,0 +1,5 @@ +--- +_build: + list: false + render: false +--- \ No newline at end of file diff --git a/content/overview/demo.md b/content/overview/demo.md index 99718e9c..501d8859 100644 --- a/content/overview/demo.md +++ b/content/overview/demo.md @@ -1,5 +1,7 @@ --- layout: overview +header: light +footer: dark title: Demo description: Lorem ipsum dolor sit amet, consectetur adipisicing elit, nisi quisquam et eveniet nesciunt repellendus. weight: 3 diff --git a/content/overview/intro.md b/content/overview/intro.md index 33b2da4b..0c249a45 100644 --- a/content/overview/intro.md +++ b/content/overview/intro.md @@ -1,5 +1,7 @@ --- layout: overview +header: light +footer: dark title: What is Haystack? description: Lorem ipsum dolor sit amet, consectetur adipisicing elit, nisi quisquam et eveniet nesciunt repellendus. weight: 1 diff --git a/content/overview/quick-start.md b/content/overview/quick-start.md index 9d8d6c63..6cfd7c77 100644 --- a/content/overview/quick-start.md +++ b/content/overview/quick-start.md @@ -1,5 +1,7 @@ --- layout: overview +header: light +footer: dark title: Quick Start description: Lorem ipsum dolor sit amet, consectetur adipisicing elit, nisi quisquam et eveniet nesciunt repellendus. weight: 2 diff --git a/content/overview/roadmap.md b/content/overview/roadmap.md index 8df8a80b..12aafc92 100644 --- a/content/overview/roadmap.md +++ b/content/overview/roadmap.md @@ -1,5 +1,7 @@ --- layout: overview +header: light +footer: dark title: Roadmap description: Lorem ipsum dolor sit amet, consectetur adipisicing elit, nisi quisquam et eveniet nesciunt repellendus. weight: 4 diff --git a/content/overview/use-cases.md b/content/overview/use-cases.md index c5003bba..4b3905e1 100644 --- a/content/overview/use-cases.md +++ b/content/overview/use-cases.md @@ -1,5 +1,7 @@ --- layout: overview +header: light +footer: dark title: Use Cases description: Lorem ipsum dolor sit amet, consectetur adipisicing elit, nisi quisquam et eveniet nesciunt repellendus. weight: 5 diff --git a/content/pages/community.md b/content/pages/community.md index d6b32706..6be812f9 100644 --- a/content/pages/community.md +++ b/content/pages/community.md @@ -1,5 +1,91 @@ --- +layout: community title: Community ---- +header: dark +footer: dark + +# Hero +hero: + headline: Join the Haystack Community + text: Haystack is fully open source. Our community is made up of NLP researchers, enthusiasts, engineers and people who are interested in semantic search. Join us! + + # Discord / newsletter + community: + discord: + title: Join our community + icon: /images/icons/discord.svg + buttons: + - buttonText: Join Discord + url: https://discord.com/invite/VBpFzsgRVF + newsletter: + title: Sign up to future newsletters + icon: /images/icons/email.svg + inputPlaceholder: Email address.. + buttonText: Submit + + # Social links + socials: + + - title: Hugging Face + url: https://huggingface.co/deepset + icon: /images/icons/hugging-face.png + + - title: Twitter + url: https://twitter.com/deepset_ai + icon: /images/icons/twitter.svg + + - title: LinkedIn + url: https://www.linkedin.com/company/deepset-ai + icon: /images/icons/linkedin.svg + + - title: Youtube + url: https://www.youtube.com/channel/UC5dfn9m310oyt-cbeegfvZw + icon: /images/icons/youtube.svg + + # Most active / new contributors + communityText: Active Community Members + contributorsText: New Contributors on GitHub + + # Github section enabled/disabled + github: + title: Start exploring Haystack! + buttons: + - buttonText: Check on Github + url: https://github.com/deepset-ai/haystack + icon: /images/icons/github.svg + contributors: + title: Most active contributors + +# Upcoming events +eventsSection: + title: Upcoming Events + events: + - title: Test Event 1 + description: Lorem ipsum dolor sit amet consectetur, adipisicing elit. Minima quidem accusamus facilis, nobis officiis accusantium! + date: 4th Dec 2022 + time: "14:00 GMT" + location: Online + image: /images/card-placeholder.jpg + url: / + buttonText: Join Event + - title: Test Event 2 + description: Lorem ipsum dolor sit amet consectetur, adipisicing elit. Minima quidem accusamus facilis, nobis officiis accusantium! + date: 6th Dec 2022 + time: "13:00 GMT" + location: Online + image: /images/card-placeholder-2.jpg + url: / + buttonText: Join Event + +# Open NLP Meetup section +meetupSection: + title: The Open NLP Meetup + text: Every 3 months, we organize the Open NLP Meetup. We have guest speakers from..... + buttonText: Join Meetup + url: / + videos: + - rO88zjicRWI + - r3oeEWUYZ5A + - 7Qix5oFbwDM -Lorem ipsum dolor, sit amet consectetur adipisicing elit. Sequi ducimus molestiae a quod, eum eveniet aut numquam iusto architecto maxime distinctio commodi expedita modi dolores! +--- \ No newline at end of file diff --git a/content/pages/nlp-resources.md b/content/pages/nlp-resources.md index f655032c..2bb6f651 100644 --- a/content/pages/nlp-resources.md +++ b/content/pages/nlp-resources.md @@ -1,5 +1,7 @@ --- title: NLP Resources +header: light +footer: dark toc: true layout: single --- diff --git a/content/tutorials/01_Basic_QA_Pipeline.md b/content/tutorials/01_Basic_QA_Pipeline.md index e4c1d83a..f1732891 100644 --- a/content/tutorials/01_Basic_QA_Pipeline.md +++ b/content/tutorials/01_Basic_QA_Pipeline.md @@ -1,5 +1,7 @@ --- layout: tutorial +header: light +footer: dark colab: https://colab.research.google.com/github/deepset-ai/haystack-tutorials/blob/main/tutorials/01_Basic_QA_Pipeline.ipynb # download: https://colab.research.google.com/github/deepset-ai/haystack-tutorials/blob/main/tutorials/01_Basic_QA_Pipeline.ipynb toc: True diff --git a/content/tutorials/02_Finetune_a_model_on_your_data.md b/content/tutorials/02_Finetune_a_model_on_your_data.md index 7666414e..393e539e 100644 --- a/content/tutorials/02_Finetune_a_model_on_your_data.md +++ b/content/tutorials/02_Finetune_a_model_on_your_data.md @@ -1,5 +1,7 @@ --- layout: tutorial +header: light +footer: dark colab: https://colab.research.google.com/github/deepset-ai/haystack-tutorials/blob/main/tutorials/02_Finetune_a_model_on_your_data.ipynb toc: True title: "Fine-Tuning a Model on Your Own Data" diff --git a/content/tutorials/03_Basic_QA_Pipeline_without_Elasticsearch.md b/content/tutorials/03_Basic_QA_Pipeline_without_Elasticsearch.md index 1a12b144..ab5e0b2e 100644 --- a/content/tutorials/03_Basic_QA_Pipeline_without_Elasticsearch.md +++ b/content/tutorials/03_Basic_QA_Pipeline_without_Elasticsearch.md @@ -1,5 +1,7 @@ --- layout: tutorial +header: light +footer: dark colab: https://colab.research.google.com/github/deepset-ai/haystack-tutorials/blob/main/tutorials/03_Basic_QA_Pipeline_without_Elasticsearch.ipynb toc: True title: "Build a QA System Without Elasticsearch" diff --git a/content/tutorials/04_FAQ_style_QA.md b/content/tutorials/04_FAQ_style_QA.md index 795a3732..65a04485 100644 --- a/content/tutorials/04_FAQ_style_QA.md +++ b/content/tutorials/04_FAQ_style_QA.md @@ -1,5 +1,7 @@ --- layout: tutorial +header: light +footer: dark colab: https://colab.research.google.com/github/deepset-ai/haystack-tutorials/blob/main/tutorials/04_FAQ_style_QA.ipynb toc: True title: "FAQ Style Question Answering" diff --git a/content/tutorials/05_Evaluation.md b/content/tutorials/05_Evaluation.md index 8f9af5a6..feda6d05 100644 --- a/content/tutorials/05_Evaluation.md +++ b/content/tutorials/05_Evaluation.md @@ -1,5 +1,7 @@ --- layout: tutorial +header: light +footer: dark colab: https://colab.research.google.com/github/deepset-ai/haystack-tutorials/blob/main/tutorials/05_Evaluation.ipynb toc: True title: "Evaluation" diff --git a/content/tutorials/06_Better_Retrieval_via_Embedding_Retrieval.md b/content/tutorials/06_Better_Retrieval_via_Embedding_Retrieval.md index 71acb6e3..1723a2e9 100644 --- a/content/tutorials/06_Better_Retrieval_via_Embedding_Retrieval.md +++ b/content/tutorials/06_Better_Retrieval_via_Embedding_Retrieval.md @@ -1,5 +1,7 @@ --- layout: tutorial +header: light +footer: dark colab: https://colab.research.google.com/github/deepset-ai/haystack-tutorials/blob/main/tutorials/06_Better_Retrieval_via_Embedding_Retrieval.ipynb toc: True title: "Embedding Retrieval" diff --git a/content/tutorials/07_RAG_Generator.md b/content/tutorials/07_RAG_Generator.md index 6406e5cd..6f960f81 100644 --- a/content/tutorials/07_RAG_Generator.md +++ b/content/tutorials/07_RAG_Generator.md @@ -1,5 +1,7 @@ --- layout: tutorial +header: light +footer: dark colab: https://colab.research.google.com/github/deepset-ai/haystack-tutorials/blob/main/tutorials/07_RAG_Generator.ipynb toc: True title: "Generative QA with Retrieval-Augmented Generation" diff --git a/content/tutorials/08_Preprocessing.md b/content/tutorials/08_Preprocessing.md index 1b57ab59..b9564ef4 100644 --- a/content/tutorials/08_Preprocessing.md +++ b/content/tutorials/08_Preprocessing.md @@ -1,5 +1,7 @@ --- layout: tutorial +header: light +footer: dark colab: https://colab.research.google.com/github/deepset-ai/haystack-tutorials/blob/main/tutorials/08_Preprocessing.ipynb toc: True title: "Preprocessing" diff --git a/content/tutorials/09_DPR_training.md b/content/tutorials/09_DPR_training.md index 5eb84105..51f54c60 100644 --- a/content/tutorials/09_DPR_training.md +++ b/content/tutorials/09_DPR_training.md @@ -1,5 +1,7 @@ --- layout: tutorial +header: light +footer: dark colab: https://colab.research.google.com/github/deepset-ai/haystack-tutorials/blob/main/tutorials/09_DPR_training.ipynb toc: True title: "Training Your Own Dense Passage Retriever Model" diff --git a/content/tutorials/10_Knowledge_Graph.md b/content/tutorials/10_Knowledge_Graph.md index bc2b0817..a51dedeb 100644 --- a/content/tutorials/10_Knowledge_Graph.md +++ b/content/tutorials/10_Knowledge_Graph.md @@ -1,5 +1,7 @@ --- layout: tutorial +header: light +footer: dark colab: https://colab.research.google.com/github/deepset-ai/haystack-tutorials/blob/main/tutorials/10_Knowledge_Graph.ipynb toc: True title: "Question Answering on a Knowledge Graph" diff --git a/content/tutorials/11_Pipelines.md b/content/tutorials/11_Pipelines.md index f8a60852..f6b742c8 100644 --- a/content/tutorials/11_Pipelines.md +++ b/content/tutorials/11_Pipelines.md @@ -1,5 +1,7 @@ --- layout: tutorial +header: light +footer: dark colab: https://colab.research.google.com/github/deepset-ai/haystack-tutorials/blob/main/tutorials/11_Pipelines.ipynb toc: True title: "Pipelines" diff --git a/content/tutorials/12_LFQA.md b/content/tutorials/12_LFQA.md index d19ef921..d710e8c4 100644 --- a/content/tutorials/12_LFQA.md +++ b/content/tutorials/12_LFQA.md @@ -1,5 +1,7 @@ --- layout: tutorial +header: light +footer: dark colab: https://colab.research.google.com/github/deepset-ai/haystack-tutorials/blob/main/tutorials/12_LFQA.ipynb toc: True title: "Long Form Question Answering" diff --git a/content/tutorials/13_Question_generation.md b/content/tutorials/13_Question_generation.md index 7252d480..b0f89567 100644 --- a/content/tutorials/13_Question_generation.md +++ b/content/tutorials/13_Question_generation.md @@ -1,5 +1,7 @@ --- layout: tutorial +header: light +footer: dark colab: https://colab.research.google.com/github/deepset-ai/haystack-tutorials/blob/main/tutorials/13_Question_generation.ipynb toc: True title: "Question Generation" diff --git a/content/tutorials/14_Query_Classifier.md b/content/tutorials/14_Query_Classifier.md index db82a254..83a04b97 100644 --- a/content/tutorials/14_Query_Classifier.md +++ b/content/tutorials/14_Query_Classifier.md @@ -1,5 +1,7 @@ --- layout: tutorial +header: light +footer: dark colab: https://colab.research.google.com/github/deepset-ai/haystack-tutorials/blob/main/tutorials/14_Query_Classifier.ipynb toc: True title: "Query Classifier" diff --git a/content/tutorials/15_TableQA.md b/content/tutorials/15_TableQA.md index 88c7ffb9..3f832ee2 100644 --- a/content/tutorials/15_TableQA.md +++ b/content/tutorials/15_TableQA.md @@ -1,5 +1,7 @@ --- layout: tutorial +header: light +footer: dark colab: https://colab.research.google.com/github/deepset-ai/haystack-tutorials/blob/main/tutorials/15_TableQA.ipynb toc: True title: "Table QA" diff --git a/content/tutorials/16_Document_Classifier_at_Index_Time.md b/content/tutorials/16_Document_Classifier_at_Index_Time.md index 19b597a5..76c3f9c3 100644 --- a/content/tutorials/16_Document_Classifier_at_Index_Time.md +++ b/content/tutorials/16_Document_Classifier_at_Index_Time.md @@ -1,5 +1,7 @@ --- layout: tutorial +header: light +footer: dark colab: https://colab.research.google.com/github/deepset-ai/haystack-tutorials/blob/main/tutorials/16_Document_Classifier_at_Index_Time.ipynb toc: True title: "Document Classifier at Index Time" diff --git a/content/tutorials/17_Audio.md b/content/tutorials/17_Audio.md index 0946d760..98be322e 100644 --- a/content/tutorials/17_Audio.md +++ b/content/tutorials/17_Audio.md @@ -1,5 +1,7 @@ --- layout: tutorial +header: light +footer: dark colab: https://colab.research.google.com/github/deepset-ai/haystack-tutorials/blob/main/tutorials/17_Audio.ipynb toc: True title: "Make Your QA Pipelines Talk!" diff --git a/content/tutorials/18_GPL.md b/content/tutorials/18_GPL.md index 90356d78..f9cbe2f2 100644 --- a/content/tutorials/18_GPL.md +++ b/content/tutorials/18_GPL.md @@ -1,5 +1,7 @@ --- layout: tutorial +header: light +footer: dark colab: https://colab.research.google.com/github/deepset-ai/haystack-tutorials/blob/main/tutorials/18_GPL.ipynb toc: True title: "Generative Pseudo Labeling" diff --git a/content/tutorials/_index.md b/content/tutorials/_index.md index 2a47e354..5a09eda3 100644 --- a/content/tutorials/_index.md +++ b/content/tutorials/_index.md @@ -1,5 +1,7 @@ --- layout: tutorials +header: dark +footer: dark title: Tutorials subtitle: We maintain these tutorials in an open source repository on GitHub. **Want to contribute?**
Go to the repository to submit your edits or suggest a new tutorial. diff --git a/static/images/icons/github.svg b/static/images/icons/github.svg index b3eb17e6..d738e557 100644 --- a/static/images/icons/github.svg +++ b/static/images/icons/github.svg @@ -1,5 +1,5 @@ + fill="#2b2f55" fill-rule="evenodd" clip-rule="evenodd" /> diff --git a/static/images/icons/hugging-face.png b/static/images/icons/hugging-face.png new file mode 100644 index 0000000000000000000000000000000000000000..0ee79fd39829d3e5b67ae7b38fb4306f8a03657e GIT binary patch literal 2382 zcmV-U39}eIGh1Kq|2P6Us9FRZ>Ctim*f}DAX z122b!V?YW>fH*-Cgv2R!ct{}**boAVV#i~9JP*%I7ys8))m=TAN81kYNj=k#>c9S1 z{f}xvHvsajY?f-ZL2~3hd^JEq43eZQKg#MMc@i{9Qcm*u7`e_V@krq$-2ez$0puH* zA#&XPOlF7zW~076$v-D)(LE#{El<)iu`B^R#$)mzYkA1O8D~554o*tw)onWmGcsIcC<_v4wp%r0{Ei$>FtfV*^NDW(qmp$q4_K&W4{mc0IZ9-FeeG{ zaH8Gt*1q6Y4|)ss_hjAxLJXwUIfrUF(sQ8I(575@5hq5Y-o+-4G<`|>L+~RTg z<;m&V)XbHdTOdv^c>iGhk76F!n9{DqZtO1ZZ#LvQ3xuN1_FUVD^U^!(=%X)IQ>Ld* zci%Zjd+(m2P8k2Gn+_lA=l>+_*jl7#AGl06udTLzVX8tjQNUSKD_qZ=Blmd!(0m)_ zM?UDIbQfQ*rP1>#YKLEV+*7Y^@R$cM{_xxVZQt?uQ0p&C^~#>>*lqI4 zgZ_(+sJQ;===q-O9-ls&rgj*=nDm6T0U@A-W^?#h->v=~=ibIgApzu@y=nj?Zp^e_ z&k}t(L-ft8cL}#Kxb07s(0?oRYge(y!F@6*&Gb1v$JrTGFBuqRA|jz4vk(u>Al$!u z|BcL}UMcCK3)zy71NU8}3zxd-Z`i9`&ws~E*XZ}@&@{?LrraKAKZVn$w zZDA?fxRCUuYo2uxkrD~|P0?-+BLIm3`*w53O~hy^Fkvw&=6SvRGJRvp@i?szXE+Q# z{=zL@gxSZ5Y&R#gRsiG2KUqV^Kh1F@D$^@ZT%?tvQ2=DQEG^b8leLElr-<)|-@chf zKJ262cg)hxttCHfBG#Wio1xG6ST^jiYN0U-<-P3?gsWbP1cXK`W)nss$PpIe$cOFU zyK8%amIOb+dAk`t!fKXsObxE9hI@QY9aCj$2WWh$=qLbk&-Vq@++hBqj#$`Vve4)! zN&u9w6I{yXtLnfxN?Y$)No7oAWG&eLIT_g@^}miwZ^UcVFQj+i{GU$neD|HRzI*xf z&RL2=fBY?9Pghhz!~7=63HPMUaM*=-$Bc`)z~4*?M@0ys=4wGk1}2b|>(qa1n)dFV zqL<%YM~}to^dHUab9|nG5Pbe5&iViIT%8yDbik57*8R$X-#^)4F@7GUQc zb0oROm*YL;ew89wa!B;BHP+N9wrzp3TdcKYXd&wxdT=3FADZ8wtKIpAUcpna9F!yJ z)nebm6G91)mcAyS@hcT2xk>M+OF$TYUt@-LuF(_fW&`8U{6y`WK^s1gqRnnu&sC8O#M2-6xHvz2+^UBf?$S^Oo2f)RkK-?eq!*5e4m&8vyfBxV5t&;SI3>wp-D zqT#UJ#_S&0F4qi*#P>sI&Dv7qrmtv*{-Ok86PuSqC6HlV%pP=r*jgDpx&uNjQZ zB^13Mivjapj!J0IIxL*gJl3^hh0F%3O2HqQxjtf~Q_4hTl~lk0%m#*WAQQud45O`J z7C8Xoc5@Dz(|UbuO1Iw}HgjN|VQw&Pn1}Vk$?s@j0c@MkvH35TR45W-ff(uJ4V7$i`J|I48EybSz{54F5;y2 z&Vt=f*uHC;_9%ds5imAe-y~oS6NX8gRGIildepChFj-$h39?jtUkLlU4MZ0(1WRvT zMq>lUe=b^8DUFG}3p>;r5M8@?AO0Yp9Z+8pt14 z8=aK!rc<=x5(pOQSg;=ifL=+J=?zSS#(Ufk92I-Zr_9af-v>}1xz&4_nLRvWh@yd+ zc8A5orI*?bk|QZrkQk<@fI`T9k7CJV&AtzG{>bNj8!m6>v^~fg9P%|Q_>i7f#=N7& z1TAR7(nEZ9k4I1FPqz~7B6?n?=kUSJODCGY0)^A;94K^!E&u=k07*qoM6N<$f*|U7 AM*si- literal 0 HcmV?d00001 diff --git a/static/images/icons/linkedin.svg b/static/images/icons/linkedin.svg new file mode 100644 index 00000000..7fd9174b --- /dev/null +++ b/static/images/icons/linkedin.svg @@ -0,0 +1,12 @@ + + + diff --git a/static/images/icons/twitter.svg b/static/images/icons/twitter.svg new file mode 100644 index 00000000..5c1a06b1 --- /dev/null +++ b/static/images/icons/twitter.svg @@ -0,0 +1,15 @@ + + + diff --git a/static/images/icons/youtube.svg b/static/images/icons/youtube.svg new file mode 100644 index 00000000..6a7aec76 --- /dev/null +++ b/static/images/icons/youtube.svg @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/static/images/user-placeholder.jpg b/static/images/user-placeholder.jpg new file mode 100644 index 0000000000000000000000000000000000000000..447cb76a01b43b177d56fd9a7701d3413a707feb GIT binary patch literal 1005 zcmex=``2_j6xdp@o1cgOJMMZh|#U;coyG6VInuyV4pa*FVB^NNrR z{vTivT?B0kw$%4Ma8(sFew1nV2Ak zIHTbITMRtRj6fGL3o_U<{L@fC`GtT6gyhXvT zBSr6MZ|~8=g(53Azr5}!KCwEWH#mL$p`YJfeis@TNqwF7X!F$-M^{;krP-XE<0RB* znQWUZtj4}Fa>bRXj-#<2sfi~#H$KkapMN|$=4bhq!?KpL7Jt+9j%D4};mUd1k#F}t zexk~mMWMF@rTUksajrZXl^r$ta^WfqE%$)*fX41;g{1~RrLJvd{4k%p#{0xEm6xV} z7vDTxyI>o4@Q2sSKfP)^QYE)2tulAUiAOPA+unRRJ~hg@(*O2z4HsbxUEAE!%g*aP z{xisKp2@Si(d+J1{<&VwrSA8iGOjb157(~ux;4T2T*dsBVtdVX!LHjD`gQRNifHva zSa_UaJ9ptg^n~SmcN9Ke<$j?=$Z7GflZ$8dFKEdReaLiC>dB{RH@cJKUM*PG-0GNQO98v=Go5|w%hbNdegBsd=Dvkz>aD4Z z@7`MZ+$Zbav#^_s^gcFS?tjbm>2A|KrMtn;4j+2_#pq%3^zEmkyRKbjUT;t#YPTr) z-7R;Cp0hcoudXlgj6XMLM#;?P$Q8eeT9Vzq>g%q&zU=muR~iY42KH~26>>M4X(5PHRz6db`AN_BDZq=Is*ATNIgIZrI5jc4+TLt6BPc_BHOm MVfUd$<>LRF0KnLUi~s-t literal 0 HcmV?d00001 diff --git a/themes/haystack/assets/js/github-stats.js b/themes/haystack/assets/js/github-stats.js deleted file mode 100644 index 196128a7..00000000 --- a/themes/haystack/assets/js/github-stats.js +++ /dev/null @@ -1,61 +0,0 @@ -import { kFormatter } from "./utils"; - -// Fetches github data from api and populates html with stars and contributors -export const githubStats = async () => { - const starContainers = document.querySelectorAll(".github-stars-js"); - const contributorsContainers = document.querySelectorAll( - ".github-contributors-js" - ); - const topContributorsContainer = document.querySelector( - ".top-contributors-container-js" - ); - - if ( - [...starContainers, ...contributorsContainers].length > 0 || - topContributorsContainer - ) { - const response = await fetch("/api/github", { - method: "GET", - headers: { - "Content-Type": "application/json", - }, - }); - - if (response.ok) { - const data = await response.json(); - - // Populate stars - if (starContainers.length > 0) { - starContainers.forEach((container) => { - container.innerHTML = kFormatter(data.stars); - }); - } - - // Populate contributors - if (contributorsContainers.length > 0) { - contributorsContainers.forEach((container) => { - container.innerHTML = data.contributors; - }); - } - - // Populate top contributors - if (topContributorsContainer) { - topContributorsContainer.innerHTML = ""; - data.top_contributors.forEach((contributor) => { - const card = document.createElement("li"); - const image = document.createElement("img"); - const userName = document.createElement("span"); - const contributions = document.createElement("span"); - - image.src = contributor.image; - image.alt = contributor.name; - userName.innerHTML = contributor.name; - contributions.innerHTML = `${contributor.contributions} contributions`; - - card.append(image, userName, contributions); - topContributorsContainer.append(card); - }); - } - } - } -}; diff --git a/themes/haystack/assets/js/script.js b/themes/haystack/assets/js/script.js index 6e0c3db4..0717b554 100644 --- a/themes/haystack/assets/js/script.js +++ b/themes/haystack/assets/js/script.js @@ -2,7 +2,6 @@ import { navigation } from "./navigation"; import { accordions } from "./accordions"; import { newsletters } from "./newsletters"; -import { githubStats } from "./github-stats"; const ready = (fn) => { if (document.readyState != "loading") { @@ -15,4 +14,3 @@ const ready = (fn) => { ready(navigation); ready(accordions); ready(newsletters); -ready(githubStats); diff --git a/themes/haystack/assets/js/table-of-contents.js b/themes/haystack/assets/js/table-of-contents.js index dc8fcbb5..adcd5246 100644 --- a/themes/haystack/assets/js/table-of-contents.js +++ b/themes/haystack/assets/js/table-of-contents.js @@ -1,15 +1,16 @@ // Add active class to table of contents links on scroll window.addEventListener("DOMContentLoaded", () => { - const tocLinks = document.querySelectorAll(`#TableOfContents > ul > li > a`); - const observer = new IntersectionObserver((entries) => { entries.forEach((entry) => { const id = entry.target.getAttribute("id"); if (entry.intersectionRatio > 0) { - tocLinks.forEach((i) => i.classList.remove("active")); document .querySelector(`#TableOfContents > ul > li > a[href*="${id}"]`) .classList.add("active"); + } else { + document + .querySelector(`#TableOfContents > ul > li > a[href*="${id}"]`) + .classList.remove("active"); } }); }); diff --git a/themes/haystack/assets/sass/components/_buttons.scss b/themes/haystack/assets/sass/components/_buttons.scss index 64fee68d..00390c46 100644 --- a/themes/haystack/assets/sass/components/_buttons.scss +++ b/themes/haystack/assets/sass/components/_buttons.scss @@ -40,6 +40,19 @@ button.nav-toggle-close { } } +.header-dark button.nav-toggle-open { + svg path { + stroke: var(--color-white); + transition: stroke var(--transition-fast) var(--ease); + } + + &:hover { + svg path { + stroke: var(--color-light-grey); + } + } +} + // Base button .btn { display: flex; @@ -99,6 +112,21 @@ button.nav-toggle-close { ); } } + + + &.btn-grey { + background-color: rgba($color: #{var(--color-dark-grey-rgb)}, $alpha: 1); + color: var(--color-white); + + svg { + fill: var(--color-white); + } + + &:hover { + background-color: rgba($color: #{var(--color-dark-grey-rgb)}, $alpha: 0.9); + } + + } } // Arrow buttons diff --git a/themes/haystack/assets/sass/components/_footer.scss b/themes/haystack/assets/sass/components/_footer.scss index 6999cbb9..99380b36 100644 --- a/themes/haystack/assets/sass/components/_footer.scss +++ b/themes/haystack/assets/sass/components/_footer.scss @@ -43,6 +43,29 @@ text-transform: uppercase; } } + +} + +.footer .newsletter-card { + display: flex; + flex-direction: column; + gap: 1rem; + align-items: flex-start; + border-radius: var(--border-radius-md); + margin-top: 2rem; + + + h3, small, span.success-message, input { + color: var(--color-medium-grey); + } + + .mail-icon { + width: 3.5rem; + } + + .arrow-button { + background-color: var(--color-green); + } } // Secondary links @@ -114,7 +137,7 @@ } } -.footer-alt { +.footer-dark { background-color: var(--color-bg-dark-blue); a.footer-deepset-logo svg { @@ -140,4 +163,17 @@ color: var(--color-medium-grey); } } -} + + + .newsletter-card { + h3, small, span.success-message, input { + color: var(--color-light-grey); + } + + .mail-icon { + fill: var(--color-light-grey); + } + + + } +} \ No newline at end of file diff --git a/themes/haystack/assets/sass/components/_forms.scss b/themes/haystack/assets/sass/components/_forms.scss index 0a8cd74d..3dcbd652 100644 --- a/themes/haystack/assets/sass/components/_forms.scss +++ b/themes/haystack/assets/sass/components/_forms.scss @@ -75,7 +75,8 @@ .js-newsletter-form.success { > input, - > button { + > button, + > small { display: none; } diff --git a/themes/haystack/assets/sass/components/_header.scss b/themes/haystack/assets/sass/components/_header.scss index 0338b380..6706cdcd 100644 --- a/themes/haystack/assets/sass/components/_header.scss +++ b/themes/haystack/assets/sass/components/_header.scss @@ -17,3 +17,7 @@ } } } + +.site-header.header-dark { + background-color: var(--color-bg-dark-blue); +} \ No newline at end of file diff --git a/themes/haystack/assets/sass/components/_navigation.scss b/themes/haystack/assets/sass/components/_navigation.scss index 2bb5f2a6..b22abf00 100644 --- a/themes/haystack/assets/sass/components/_navigation.scss +++ b/themes/haystack/assets/sass/components/_navigation.scss @@ -23,15 +23,7 @@ margin: 0; } - .btn.arrow-button { - background-color: rgba($color: #{var(--color-dark-grey-rgb)}, $alpha: 1); - color: var(--color-white); - - &:hover { - background-color: rgba($color: #{var(--color-dark-grey-rgb)}, $alpha: 0.9); - } - - } + } /** @@ -83,6 +75,7 @@ pointer-events: auto; } + /** * Desktop nav */ @@ -175,3 +168,36 @@ // } } } + +// Dark +.header-dark .desktop-nav { + + li > a { + color: var(--color-light-grey); + + &:hover { + color: var(--color-white); + } + } + + li.active > a { + color: var(--color-yellow); + } + + .btn.arrow-button { + background-color: rgba($color: #{var(--color-green-rgb)}, $alpha: 1); + + &:hover { + background-color: rgba($color: #{var(--color-green-rgb)}, $alpha: 0.9); + } + + } + + li.dropdown-menu { + &:hover { + > a { + color: var(--color-white); + } + } + } +} \ No newline at end of file diff --git a/themes/haystack/assets/sass/main.scss b/themes/haystack/assets/sass/main.scss index db28212e..62bba771 100644 --- a/themes/haystack/assets/sass/main.scss +++ b/themes/haystack/assets/sass/main.scss @@ -20,4 +20,4 @@ /** * Pages */ -@import "pages/index", "pages/tutorials"; +@import "pages/index", "pages/tutorials", "pages/community"; diff --git a/themes/haystack/assets/sass/pages/_community.scss b/themes/haystack/assets/sass/pages/_community.scss new file mode 100644 index 00000000..ed962464 --- /dev/null +++ b/themes/haystack/assets/sass/pages/_community.scss @@ -0,0 +1,263 @@ +// Community page + +// Hero +.community-hero { + .community-hero-top { + display: flex; + flex-direction: column; + gap: 2rem; + + @include md { + gap: 3rem; + } + + h1 { + margin-bottom: 2rem; + } + + p.narrow-text { + @include md { + max-width: 55rem; + } + } + + // Newsletter / Discord CTA + .community-cards { + display: flex; + flex-direction: column; + gap: 2rem; + + @include sm { + flex-direction: row; + flex-wrap: wrap; + } + + @include md { + gap: 3rem; + } + + + .discord-card { + display: flex; + flex-direction: column; + gap: 1rem; + align-items: flex-start; + border-radius: var(--border-radius-md); + + img { + width: 3.5rem; + } + + } + } + + // Social Links / Icons + .social-links { + display: flex; + flex-wrap: wrap; + gap: 1rem; + + @include md { + gap: 1.5rem; + } + + li img { + width: 2.25rem; + } + } + + // Orbit section + .orbit { + .orbit-stats-js { + margin-top: 2.5rem; + + ul { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 0.5rem; + justify-items: start; + + @include sm { + grid-template-columns: repeat(4, 1fr); + } + + @include lg { + grid-template-columns: repeat(6, 1fr); + } + } + + li { + display: flex; + flex-direction: column; + align-items: center; + flex-shrink: 0; + gap: 0.5rem; + width: 100%; + max-width: 7.5rem; + overflow: hidden; + + img { + width: 4rem; + height: 4rem; + // border: 0.125rem solid var(--color-light-grey); + border-radius: 100%; + object-fit: cover; + overflow: hidden; + flex-shrink: 0; + + @include md { + width: 5rem; + height: 5rem; + } + + } + + p { + text-align: center; + font-size: var(--text-base); + } + } + } + } + } + + // Github section + .community-github { + .stats-boxes { + display: flex; + flex-wrap: wrap; + gap: 1rem; + + li { + padding: 1.5rem; + border: 0.125rem solid var(--color-light-grey); + display: flex; + flex-direction: column; + align-items: center; + flex-grow: 1; + + > span:first-of-type { + font-size: var(--text-large); + + @include md { + font-size: var(--text-large); + } + } + + > span:nth-of-type(2) { + font-size: var(--text-small); + } + } + } + } +} + +// Upcoming Events section +.community-events { + background-color: var(--color-bg-dark-blue); + + h2 { + font-size: var(--h1-size); + margin-bottom: 2rem; + color: var(--color-white); + + + } + + .events-container { + display: grid; + grid-template-columns: 1fr; + gap: 2rem; + + @include md { + grid-template-columns: 1fr 1fr; + } + + .events-card { + display: flex; + flex-direction: column; + border-radius: var(--border-radius-md); + overflow: hidden; + align-self: flex-start; + + > img { + height: 14rem; + object-fit: cover; + + @include lg { + height: 16rem; + } + } + + .content-section { + display: flex; + flex-direction: column; + gap: 0.25rem; + padding: 1rem; + background-color: var(--color-bg-light-grey); + + @include md { + padding: 2rem; + } + + h3 { + margin-bottom: 0.25rem; + } + + .details { + font-size: var(--text-base); + font-weight: var(--font-weight-heading); + color: var(--color-dark-blue); + display: flex; + gap: 0.25rem; + flex-wrap: wrap; + + > span:not(:first-of-type)::before { + content: "-"; + margin-right: 0.25rem; + } + } + + .btn { + margin-top: 1rem; + } + } + } + } +} + +// Open NLP Meetup section +.community-meetup { + background-color: var(--color-bg-light-grey); + h2 { + font-size: var(--h1-size); + margin-bottom: 1rem; + } + + a.btn { + margin-top: 1rem; + } + + .video-grid { + margin-top: 2rem; + + display: grid; + gap: 2rem; + grid-template-columns: 1fr; + + .video { + min-height: 18rem; + iframe { + min-height: inherit; + } + } + + @include md { + grid-template-columns: 1fr 1fr; + + .video:first-of-type { + grid-row: 1/3; + } + } + } +} diff --git a/themes/haystack/layouts/_default/community.html b/themes/haystack/layouts/_default/community.html new file mode 100644 index 00000000..6eaa71b1 --- /dev/null +++ b/themes/haystack/layouts/_default/community.html @@ -0,0 +1,5 @@ +{{ define "main" }} + {{ partial "community-hero" . }} + {{ partial "community-events" . }} + {{ partial "community-meetup" . }} +{{ end }} diff --git a/themes/haystack/layouts/_default/tutorial.html b/themes/haystack/layouts/_default/tutorial.html index 6e645611..17c41bbd 100644 --- a/themes/haystack/layouts/_default/tutorial.html +++ b/themes/haystack/layouts/_default/tutorial.html @@ -90,10 +90,12 @@ - + {{ with .Params.last_updated }} + + {{ end }} {{/* Article content */}} {{ .Content }} @@ -108,7 +110,7 @@ {{/* Stars/contribute sidebar */}}