Skip to content

Commit de7e8e0

Browse files
krlslmantunetheweb
andauthored
Call for contributors (#4094)
* feat(i18n): add contributor call-to-action for current edition in (en) * feat(i18n): add contributor call-to-action for current edition in (es) * feat(i18n): add contributor call-to-action for current edition in (fr) * feat(i18n): add contributor call-to-action for current edition in (hi) * feat(i18n): add contributor call-to-action for current edition in (it) * feat(i18n): add contributor call-to-action for current edition in (ja) * feat(i18n): add contributor call-to-action for current edition in (nl) * feat(i18n): add contributor call-to-action for current edition in (pt) * feat(i18n): add contributor call-to-action for current edition in (ru) * feat(i18n): add contributor call-to-action for current edition in (tr) * feat(i18n): add contributor call-to-action for current edition in (uk) * feat(i18n): add contributor call-to-action for current edition in (zh-CN) * feat(i18n): add contributor call-to-action for current edition in (zh-TW) * new contributor added * first name order * fix for year in call_for_contributors * Tweaks * Linting --------- Co-authored-by: Barry Pollard <barrypollard@google.com>
1 parent 0fe70c2 commit de7e8e0

File tree

18 files changed

+107
-23
lines changed

18 files changed

+107
-23
lines changed

src/config/contributors.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4208,6 +4208,21 @@
42084208
"twitter": "Scott_Helme",
42094209
"website": "https://scotthelme.co.uk"
42104210
},
4211+
"krlslman": {
4212+
"avatar_url": "68502548",
4213+
"github": "krlslman",
4214+
"name": "Selman Koral",
4215+
"teams": {
4216+
"2024": [
4217+
"developers",
4218+
"translators"
4219+
],
4220+
"2025": [
4221+
"developers",
4222+
"translators"
4223+
]
4224+
}
4225+
},
42114226
"sergeychernyshev": {
42124227
"avatar_url": "38076",
42134228
"github": "sergeychernyshev",

src/server/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
accentless_sort,
1313
get_versioned_filename,
1414
)
15+
from datetime import datetime
1516
from .config import TEMPLATES_DIR, STATIC_DIR
1617
from . import csp, feature_policy
1718
import logging
@@ -72,6 +73,7 @@ def add_header(response):
7273
app.jinja_env.globals["year_live"] = year_live
7374
app.jinja_env.globals["get_versioned_filename"] = get_versioned_filename
7475
app.jinja_env.filters["accentless_sort"] = accentless_sort
76+
app.jinja_env.globals['now'] = datetime.now
7577

7678
talisman = Talisman(
7779
app,

src/static/css/almanac.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,16 @@ aside.banner p {
347347
margin: 0;
348348
}
349349

350+
aside,
351+
.note {
352+
font-style: italic;
353+
}
354+
355+
aside em,
356+
.note em {
357+
font-style: normal;
358+
}
359+
350360
/* Main title, subtitle and modifiers */
351361
.title,
352362
.subtitle {

src/static/css/page.css

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -454,16 +454,6 @@
454454
right: -1.5rem;
455455
}
456456

457-
aside,
458-
.note {
459-
font-style: italic;
460-
}
461-
462-
aside em,
463-
.note em {
464-
font-style: normal;
465-
}
466-
467457
table,
468458
figure {
469459
max-width: 100%;

src/templates/base/base.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@
106106

107107
{% endblock %}
108108

109+
{% block call_for_contributors_link %}https://github.com/HTTPArchive/almanac.httparchive.org/discussions/4062{% endblock %}
110+
109111
{% block contributors %}{{ config.contributors.keys() | length }}{% endblock %}
110112

111113
{% block non_chapter_nav_links %}

src/templates/en/base.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,15 @@
2020

2121
{% block announcement_text -%}
2222
{%- if year < DEFAULT_YEAR -%}
23-
<p lang="en">
23+
<p>
2424
You’re viewing a previous edition of the Web Almanac.
2525
Check out the <a href="/{{ lang }}/{{ DEFAULT_YEAR }}/{% if chapter_lang_exists(lang, DEFAULT_YEAR, slug) or page_lang_exists(lang, DEFAULT_YEAR, slug) %}{{ slug }}{% endif %}">{{ DEFAULT_YEAR }} edition!</a>
2626
</p>
27+
{%- elif self.call_for_contributors_link() | trim | length > 0 -%}
28+
<p>
29+
📣 <a hreflang="en" href="{{ self.call_for_contributors_link() }}"><b>Call for Contributors</b></a>:
30+
Help create the {{ now().year }} Web Almanac— be part of the team shaping this year’s edition!
31+
</p>
2732
{%- endif -%}
2833
{% endblock %}
2934

src/templates/es/base.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,15 @@
2020

2121
{% block announcement_text -%}
2222
{%- if year < DEFAULT_YEAR -%}
23-
<p lang="en">
23+
<p>
2424
Estás viendo una edición anterior del Web Almanac.
2525
¡Consulta <a href="/{{ lang }}/{{ DEFAULT_YEAR }}/{% if chapter_lang_exists(lang, DEFAULT_YEAR, slug) or page_lang_exists(lang, DEFAULT_YEAR, slug) %}{{ slug }}{% endif %}">a edición de {{ DEFAULT_YEAR }}!</a>
2626
</p>
27+
{%- elif self.call_for_contributors_link() | trim | length > 0 -%}
28+
<p>
29+
📣 <a hreflang="en" href="{{ self.call_for_contributors_link() }}"><b>Convocatoria para colaboradores</b></a>:
30+
Ayuda a crear el Web Almanac {{ now().year }}— ¡sé parte del equipo que da forma a la edición de este año!
31+
</p>
2732
{%- endif -%}
2833
{% endblock %}
2934

src/templates/fr/base.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,15 @@
2020

2121
{% block announcement_text -%}
2222
{%- if year < DEFAULT_YEAR -%}
23-
<p lang="en">
23+
<p>
2424
Vous consultez une édition précédente du Web Almanac.
2525
Découvrez <a href="/{{ lang }}/{{ DEFAULT_YEAR }}/{% if chapter_lang_exists(lang, DEFAULT_YEAR, slug) or page_lang_exists(lang, DEFAULT_YEAR, slug) %}{{ slug }}{% endif %}">l’édition {{ DEFAULT_YEAR }}!</a>
2626
</p>
27+
{%- elif self.call_for_contributors_link() | trim | length > 0 -%}
28+
<p>
29+
📣 <a hreflang="en" href="{{ self.call_for_contributors_link() }}"><b>Appel à contributions</b></a>:
30+
Aidez à créer le Web Almanac {{ now().year }} — faites partie de l'équipe qui façonne l'édition de cette année !
31+
</p>
2732
{%- endif -%}
2833
{% endblock %}
2934

src/templates/hi/base.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,15 @@
2020

2121
{% block announcement_text -%}
2222
{%- if year < DEFAULT_YEAR -%}
23-
<p lang="en">
23+
<p>
2424
आप वेब पंचांग का पिछला संस्करण देख रहे हैं।
2525
<a href="/{{ lang }}/{{ DEFAULT_YEAR }}/{% if chapter_lang_exists(lang, DEFAULT_YEAR, slug) or page_lang_exists(lang, DEFAULT_YEAR, slug) %}{{ slug }}{% endif %}">{{ DEFAULT_YEAR }} संस्करण</a> देखें!
2626
</p>
27+
{%- elif self.call_for_contributors_link() | trim | length > 0 -%}
28+
<p>
29+
📣 <a hreflang="en" href="{{ self.call_for_contributors_link() }}"><b>योगदानकर्ताओं के लिए आह्वान</b></a>:
30+
{{ now().year }} Web Almanac बनाने में मदद करें— इस वर्ष की संस्करण को आकार देने वाली टीम का हिस्सा बनें!
31+
</p>
2732
{%- endif -%}
2833
{% endblock %}
2934

src/templates/it/base.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,15 @@
2020

2121
{% block announcement_text -%}
2222
{%- if year < DEFAULT_YEAR -%}
23-
<p lang="en">
23+
<p>
2424
Stai visualizzando un’edizione precedente del Web Almanac.
2525
Dai un’occhiata all’<a href="/{{ lang }}/{{ DEFAULT_YEAR }}/{% if chapter_lang_exists(lang, DEFAULT_YEAR, slug) or page_lang_exists(lang, DEFAULT_YEAR, slug) %}{{ slug }}{% endif %}">edizione del {{ DEFAULT_YEAR }}!</a>
2626
</p>
27+
{%- elif self.call_for_contributors_link() | trim | length > 0 -%}
28+
<p>
29+
📣 <a hreflang="en" href="{{ self.call_for_contributors_link() }}"><b>Chiamata per i contributori</b></a>:
30+
Aiuta a creare il Web Almanac {{ now().year }}— entra a far parte del team che darà forma all’edizione di quest’anno!
31+
</p>
2732
{%- endif -%}
2833
{% endblock %}
2934

0 commit comments

Comments
 (0)