diff --git a/src/config/contributors.json b/src/config/contributors.json index a20f6594c19..7017025ef48 100644 --- a/src/config/contributors.json +++ b/src/config/contributors.json @@ -4208,6 +4208,21 @@ "twitter": "Scott_Helme", "website": "https://scotthelme.co.uk" }, + "krlslman": { + "avatar_url": "68502548", + "github": "krlslman", + "name": "Selman Koral", + "teams": { + "2024": [ + "developers", + "translators" + ], + "2025": [ + "developers", + "translators" + ] + } + }, "sergeychernyshev": { "avatar_url": "38076", "github": "sergeychernyshev", diff --git a/src/server/__init__.py b/src/server/__init__.py index e4884056518..f758ea36dd4 100644 --- a/src/server/__init__.py +++ b/src/server/__init__.py @@ -12,6 +12,7 @@ accentless_sort, get_versioned_filename, ) +from datetime import datetime from .config import TEMPLATES_DIR, STATIC_DIR from . import csp, feature_policy import logging @@ -72,6 +73,7 @@ def add_header(response): app.jinja_env.globals["year_live"] = year_live app.jinja_env.globals["get_versioned_filename"] = get_versioned_filename app.jinja_env.filters["accentless_sort"] = accentless_sort +app.jinja_env.globals['now'] = datetime.now talisman = Talisman( app, diff --git a/src/static/css/almanac.css b/src/static/css/almanac.css index a55feabe298..5a61f648770 100644 --- a/src/static/css/almanac.css +++ b/src/static/css/almanac.css @@ -347,6 +347,16 @@ aside.banner p { margin: 0; } +aside, +.note { + font-style: italic; +} + +aside em, +.note em { + font-style: normal; +} + /* Main title, subtitle and modifiers */ .title, .subtitle { diff --git a/src/static/css/page.css b/src/static/css/page.css index adb5a55944e..9ae9f2e362b 100644 --- a/src/static/css/page.css +++ b/src/static/css/page.css @@ -454,16 +454,6 @@ right: -1.5rem; } -aside, -.note { - font-style: italic; -} - -aside em, -.note em { - font-style: normal; -} - table, figure { max-width: 100%; diff --git a/src/templates/base/base.html b/src/templates/base/base.html index 62829737523..2a75038212a 100644 --- a/src/templates/base/base.html +++ b/src/templates/base/base.html @@ -106,6 +106,8 @@ {% endblock %} +{% block call_for_contributors_link %}https://github.com/HTTPArchive/almanac.httparchive.org/discussions/4062{% endblock %} + {% block contributors %}{{ config.contributors.keys() | length }}{% endblock %} {% block non_chapter_nav_links %} diff --git a/src/templates/en/base.html b/src/templates/en/base.html index ee1c0382933..3e3050ae1ad 100644 --- a/src/templates/en/base.html +++ b/src/templates/en/base.html @@ -20,10 +20,15 @@ {% block announcement_text -%} {%- if year < DEFAULT_YEAR -%} -

+

You’re viewing a previous edition of the Web Almanac. Check out the {{ DEFAULT_YEAR }} edition!

+{%- elif self.call_for_contributors_link() | trim | length > 0 -%} +

+ 📣 Call for Contributors: +Help create the {{ now().year }} Web Almanac— be part of the team shaping this year’s edition! +

{%- endif -%} {% endblock %} diff --git a/src/templates/es/base.html b/src/templates/es/base.html index 7da14064ba8..7acec27403b 100644 --- a/src/templates/es/base.html +++ b/src/templates/es/base.html @@ -20,10 +20,15 @@ {% block announcement_text -%} {%- if year < DEFAULT_YEAR -%} -

+

Estás viendo una edición anterior del Web Almanac. ¡Consulta a edición de {{ DEFAULT_YEAR }}!

+{%- elif self.call_for_contributors_link() | trim | length > 0 -%} +

+ 📣 Convocatoria para colaboradores: +Ayuda a crear el Web Almanac {{ now().year }}— ¡sé parte del equipo que da forma a la edición de este año! +

{%- endif -%} {% endblock %} diff --git a/src/templates/fr/base.html b/src/templates/fr/base.html index 67174b0011a..9a38c50a32b 100644 --- a/src/templates/fr/base.html +++ b/src/templates/fr/base.html @@ -20,10 +20,15 @@ {% block announcement_text -%} {%- if year < DEFAULT_YEAR -%} -

+

Vous consultez une édition précédente du Web Almanac. Découvrez l’édition {{ DEFAULT_YEAR }}!

+{%- elif self.call_for_contributors_link() | trim | length > 0 -%} +

+ 📣 Appel à contributions: +Aidez à créer le Web Almanac {{ now().year }} — faites partie de l'équipe qui façonne l'édition de cette année ! +

{%- endif -%} {% endblock %} diff --git a/src/templates/hi/base.html b/src/templates/hi/base.html index b7927cfd840..dd941cafda2 100644 --- a/src/templates/hi/base.html +++ b/src/templates/hi/base.html @@ -20,10 +20,15 @@ {% block announcement_text -%} {%- if year < DEFAULT_YEAR -%} -

+

आप वेब पंचांग का पिछला संस्करण देख रहे हैं। {{ DEFAULT_YEAR }} संस्करण देखें!

+{%- elif self.call_for_contributors_link() | trim | length > 0 -%} +

+ 📣 योगदानकर्ताओं के लिए आह्वान: +{{ now().year }} Web Almanac बनाने में मदद करें— इस वर्ष की संस्करण को आकार देने वाली टीम का हिस्सा बनें! +

{%- endif -%} {% endblock %} diff --git a/src/templates/it/base.html b/src/templates/it/base.html index bbdda23d3d6..0ed301d1d14 100644 --- a/src/templates/it/base.html +++ b/src/templates/it/base.html @@ -20,10 +20,15 @@ {% block announcement_text -%} {%- if year < DEFAULT_YEAR -%} -

+

Stai visualizzando un’edizione precedente del Web Almanac. Dai un’occhiata all’edizione del {{ DEFAULT_YEAR }}!

+{%- elif self.call_for_contributors_link() | trim | length > 0 -%} +

+ 📣 Chiamata per i contributori: + Aiuta a creare il Web Almanac {{ now().year }}— entra a far parte del team che darà forma all’edizione di quest’anno! +

{%- endif -%} {% endblock %} diff --git a/src/templates/ja/base.html b/src/templates/ja/base.html index 9b80cf40c10..25c39518d01 100644 --- a/src/templates/ja/base.html +++ b/src/templates/ja/base.html @@ -20,10 +20,15 @@ {% block announcement_text -%} {%- if year < DEFAULT_YEAR -%} -

+

ご覧になっているのは、Web Almanac の以前の版です。 {{ DEFAULT_YEAR }} 年版をご覧ください。

+{%- elif self.call_for_contributors_link() | trim | length > 0 -%} +

+ 📣 コントリビューター募集中: +{{ now().year }} Web Almanac の作成にご協力ください— 今年のエディションを形作るチームの一員になりましょう! +

{%- endif -%} {% endblock %} diff --git a/src/templates/nl/base.html b/src/templates/nl/base.html index 3568242976e..7d73ff93056 100644 --- a/src/templates/nl/base.html +++ b/src/templates/nl/base.html @@ -20,10 +20,15 @@ {% block announcement_text -%} {%- if year < DEFAULT_YEAR -%} -

+

U bekijkt een eerdere editie van de Web Almanac. Bekijk de editie van {{ DEFAULT_YEAR }}!

+{%- elif self.call_for_contributors_link() | trim | length > 0 -%} +

+ 📣 Oproep aan bijdragers: +Help mee de Web Almanac {{ now().year }} te maken— en word onderdeel van het team dat deze editie vormgeeft! +

{%- endif -%} {% endblock %} diff --git a/src/templates/pt/base.html b/src/templates/pt/base.html index 377306e775d..3879441f939 100644 --- a/src/templates/pt/base.html +++ b/src/templates/pt/base.html @@ -20,10 +20,15 @@ {% block announcement_text -%} {%- if year < DEFAULT_YEAR -%} -

+

Você está visualizando uma edição anterior do Web Almanac. Confira a edição de {{ DEFAULT_YEAR }}!

+{%- elif self.call_for_contributors_link() | trim | length > 0 -%} +

+ 📣 Chamada para Contribuidores: +Ajude a criar o Web Almanac de {{ now().year }} — faça parte da equipe que está moldando a edição deste ano! +

{%- endif -%} {% endblock %} diff --git a/src/templates/ru/base.html b/src/templates/ru/base.html index 7c3b356def5..3fc0513dfd7 100644 --- a/src/templates/ru/base.html +++ b/src/templates/ru/base.html @@ -20,10 +20,15 @@ {% block announcement_text -%} {%- if year < DEFAULT_YEAR -%} -

+

Вы просматриваете предыдущий выпуск Веб-альманаха. Ознакомьтесь с выпуском {{ DEFAULT_YEAR }} года!

+{%- elif self.call_for_contributors_link() | trim | length > 0 -%} +

+ 📣 Призыв к участию: +Помогите создать Web Almanac {{ now().year }} — станьте частью команды, формирующей выпуск этого года! +

{%- endif -%} {% endblock %} diff --git a/src/templates/tr/base.html b/src/templates/tr/base.html index b7683353de2..8fd7a865cdf 100644 --- a/src/templates/tr/base.html +++ b/src/templates/tr/base.html @@ -20,10 +20,15 @@ {% block announcement_text -%} {%- if year < DEFAULT_YEAR -%} -

+

Web Almanac'ın önceki bir baskısını görüntülüyorsunuz. {{ DEFAULT_YEAR }} baskısına göz atın!.

+{%- elif self.call_for_contributors_link() | trim | length > 0 -%} +

+ 📣 Katkı sağlamak ister misiniz? + {{ now().year }} Web Almanac'ı oluşturmaya yardım edin— bu yılki baskıyı şekillendiren ekibin bir parçası olun! +

{%- endif -%} {% endblock %} diff --git a/src/templates/uk/base.html b/src/templates/uk/base.html index 2dc8eba0d53..3173748a863 100644 --- a/src/templates/uk/base.html +++ b/src/templates/uk/base.html @@ -20,10 +20,15 @@ {% block announcement_text -%} {%- if year < DEFAULT_YEAR -%} -

+

Ви переглядаєте попереднє видання веб-альманаху. Перегляньте випуск {{ DEFAULT_YEAR }} року!

+{%- elif self.call_for_contributors_link() | trim | length > 0 -%} +

+ 📣 Заклик до учасників: +Допоможіть створити Web Almanac {{ now().year }} — станьте частиною команди, яка формує цьогорічний випуск! +

{%- endif -%} {% endblock %} diff --git a/src/templates/zh-CN/base.html b/src/templates/zh-CN/base.html index 02fc9409a1b..41b8e8c6168 100644 --- a/src/templates/zh-CN/base.html +++ b/src/templates/zh-CN/base.html @@ -20,10 +20,15 @@ {% block announcement_text -%} {%- if year < DEFAULT_YEAR -%} -

+

您正在查看 Web 年鉴的上一版。 查看 {{ DEFAULT_YEAR }} 年版!.

+{%- elif self.call_for_contributors_link() | trim | length > 0 -%} +

+ 📣 贡献者招募: +帮助创建 {{ now().year }} 年的 Web Almanac —— 成为塑造今年版本的团队一员! +

{%- endif -%} {% endblock %} diff --git a/src/templates/zh-TW/base.html b/src/templates/zh-TW/base.html index 44e76648031..ee703048c64 100644 --- a/src/templates/zh-TW/base.html +++ b/src/templates/zh-TW/base.html @@ -20,10 +20,15 @@ {% block announcement_text -%} {%- if year < DEFAULT_YEAR -%} -

+

您正在查看舊版網路年鑑。 查看 {{ DEFAULT_YEAR }} 年版!.

+{%- elif self.call_for_contributors_link() | trim | length > 0 -%} +

+ 📣 徵求貢獻者: +協助打造 {{ now().year }} 年的 Web Almanac —— 成為今年版本製作團隊的一員! +

{%- endif -%} {% endblock %}