Skip to content

Commit

Permalink
[CONTENT] Add join route (hedyorg#3312)
Browse files Browse the repository at this point in the history
Adds new /join route with info targeted at new contributors
  • Loading branch information
Felienne authored Sep 23, 2022
1 parent 44ac2d8 commit 957a8ee
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 16 deletions.
5 changes: 5 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,11 @@ def main_page(page):
return render_template('learn-more.html', papers=hedy_content.RESEARCH, page_title=gettext('title_learn-more'),
current_page='learn-more', content=learn_more_translations)

if page == 'join':
join_translations = hedyweb.PageTranslations(page).get_page_translations(g.lang)
return render_template('join.html', page_title=gettext('title_learn-more'),
current_page='join', content=join_translations)

if page == 'privacy':
privacy_translations = hedyweb.PageTranslations(
page).get_page_translations(g.lang)
Expand Down
30 changes: 22 additions & 8 deletions content/pages/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1026,18 +1026,10 @@ learn-more-sections:
- title: "Do you like Hedy?"
text: |
We love to hear from you!
[Click here to send us a message](mailto:[email protected] "About Hedy")
- title: "Found a bug?"
text: |
[Let us know on GitHub](https://github.com/Felienne/hedy/issues/new/choose)
- title: "Want to help?"
text: |
The easiest way is to help with [translating Hedy](https://github.com/Felienne/hedy/blob/main/TRANSLATING.md)
Below the current status, help us complete a language, or add a new one.
<a href="https://hosted.weblate.org/engage/hedy/">
<img src="https://hosted.weblate.org/widgets/hedy/-/multi-auto.svg" alt="Translation status" /></a>
- title: "Code week talk"
text: |
Want to know more about Hedy? Check out this talk Felienne gave at the European Code Week 2020:
Expand Down Expand Up @@ -1096,3 +1088,25 @@ start-sections:
- title: "Do I need to install anything?"
text: |-
No. Hedy works in the browser, which is the program you are using to look at this page. Probably Chrome or Edge or Firefox. Hedy also works on your phone or tablet.
join-sections:
- title: ""
text: |
# There are three ways in which you can support Hedy!
- title: "Improving the language"
text: |
The gradual and multi-lingual nature of Hedy create a lot of interesting technical challenges.
Find those issues on [Github](https://github.com/Felienne/hedy/issues?q=is%3Aopen+is%3Aissue+label%3Alanguage).
- title: "Translating Hedy"
text: |
Not a programmer? No problem! Another way to support Hedy is by [translating keywords, error messages, adventures are other content](https://github.com/Felienne/hedy/blob/main/TRANSLATING.md)
This is the current status, help us complete a language, or add a new one!
<a href="https://hosted.weblate.org/engage/hedy/">
<img src="https://hosted.weblate.org/widgets/hedy/-/multi-auto.svg" alt="Translation status" /></a>
- title: "Help teachers get started"
text: |
Hedy is designed to support teachers in providing programming lessons in class. We have specific teacher features like the option to create a class, customize it and see how your students are doing.
If you like Hedy, you can reach out to schools that you know to help teachers get started! We can help you find schools or teachers via [Discord](https://discord.gg/8yY7dEme9r).
29 changes: 22 additions & 7 deletions content/pages/nl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -725,13 +725,6 @@ learn-more-sections:
- title: "Foutje gevonden?"
text: |
[Geef het door via GitHub](https://github.com/Felienne/hedy/issues/new/choose)
- title: "Wil je helpen?"
text: |
De makkelijkste manier om te helpen is met het [vertalen van Hedy](https://github.com/Felienne/hedy/blob/main/TRANSLATING.md)
Hieronder zie je de huidige status, help ons door een taal compleet te maken of voeg een nieuwe toe.
<a href="https://hosted.weblate.org/engage/hedy/">
<img src="https://hosted.weblate.org/widgets/hedy/-/multi-auto.svg" alt="Translation status" /></a>
- title: "Code week praatje"
text: |
Wil je meer weten? Felienne gaf een praatje op de European Code Week 2020 (in het Engels):
Expand Down Expand Up @@ -790,3 +783,25 @@ start-sections:
- title: "Moet ik iets installeren?"
text: |-
Nee, Hedy werkt in je 'browser', dat is het programma waarmee je nu ook deze site bekijkt, bijv. Chrome, Edge, of Firefox. Hedy doet het ook op je telefoon of je tablet.
join-sections:
- title: ""
text: |
# Je kunt Hedy op drie manieren helpen!
- title: "De Hedy taal verbeteren"
text: |
Omdat Hedy een graduele taal is met commando's in meerdere talen is er nog een hoop te programmeren!
Bekijk de bijbehorende issues op onze [Github](https://github.com/Felienne/hedy/issues?q=is%3Aopen+is%3Aissue+label%3Alanguage).
- title: "Hedy vertalen"
text: |
Ben je geen programmeur? Geen probleem! Je kan ons ook helpen door de commando's, avonturen en foutmeldingen van Hedy [te vertalen](https://github.com/Felienne/hedy/blob/main/TRANSLATING.md).
Hieronder zie je de huidige status, help ons door een taal compleet te maken of voeg een nieuwe toe.
<a href="https://hosted.weblate.org/engage/hedy/">
<img src="https://hosted.weblate.org/widgets/hedy/-/multi-auto.svg" alt="Translation status" /></a>
- title: "Help docenten op weg met Hedy"
text: |
Hedy is gemaakt voor docenten, zodat ze makkelijk programmeerlessen kunnen geven op school. Kan jij al programmeren?
Dan kan je misschien een school in de buurt helpen te beginnen met Hedy. Op onze [Discord](https://discord.gg/8yY7dEme9r) kunnen we je koppelen aan docenten.
2 changes: 1 addition & 1 deletion hedyweb.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def get_translations(self, language):
class PageTranslations:
def __init__(self, page):
self.data = {}
if page in ['start', 'learn-more', 'for-teachers']:
if page in ['start', 'join', 'learn-more', 'for-teachers']:
translations = glob.glob('content/pages/*.yaml')
else:
translations = glob.glob('content/pages/' + page + '/*.yaml')
Expand Down
12 changes: 12 additions & 0 deletions templates/join.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% extends "auth.html" %}

{% block main %}
<div class="w-full mx-auto flex flex-col gap-4">
<div id="learn_more_content" class="text-xl">
{% for section in content['join-sections'] %}
<h2>{{ section['title'] }}</h2>
<p>{{ section['text'] | commonmark }}</p>
{% endfor %}
</div>
</div>
{% endblock %}

0 comments on commit 957a8ee

Please sign in to comment.