From d36c3fffe39244523b5f990b88998ad53d5522c2 Mon Sep 17 00:00:00 2001 From: WassCodeur Date: Tue, 9 Dec 2025 13:33:54 +0000 Subject: [PATCH] Update French navigation label and add social media redirections --- .pre-commit-config.yaml | 2 +- main.py | 36 +++++++++++++++++++++++++++++++++++- templates/base.html | 4 ++-- 3 files changed, 38 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c488896..5ff93bf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: - id: detect-private-key - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.7 + rev: v0.14.8 hooks: - id: ruff args: [--fix] diff --git a/main.py b/main.py index 7d4dc98..b527736 100644 --- a/main.py +++ b/main.py @@ -168,7 +168,7 @@ TRANSLATIONS = { "fr": { "site-title": "Python Togo", - "nav-home": "The Python Software Community Togo", + "nav-home": "Accueil", "nav-about": "À propos", "nav-code": "Code de conduite", "nav-events": "Événements", @@ -1630,6 +1630,40 @@ async def privacy(request: Request): ) +# redirections + +app.get("/favicon.ico")(lambda: RedirectResponse(url="/static/images/Py.png")) +app.get("/discord")( + lambda: RedirectResponse(url="https://discord.gg/RP76qhwrNY", status_code=301) +) +app.get("/linkedin")( + lambda: RedirectResponse( + url="https://www.linkedin.com/company/pythontogo/", status_code=301 + ) +) +app.get("/twitter")( + lambda: RedirectResponse(url="https://x.com/pytogo_org", status_code=301) +) +app.get("/x")(lambda: RedirectResponse(url="https://x.com/pytogo_org", status_code=301)) +app.get("/instagram")( + lambda: RedirectResponse(url="https://www.instagram.com/pycontg/", status_code=301) +) +app.get("/x")(lambda: RedirectResponse(url="https://x.com/pytogo_org", status_code=301)) +app.get("/facebook")( + lambda: RedirectResponse( + url="https://www.facebook.com/share/1DA5jFdhbp/", status_code=301 + ) +) +app.get("/mastodon")( + lambda: RedirectResponse(url="https://techhub.social/@pytogo_org", status_code=301) +) +app.get("/meet")( + lambda: RedirectResponse( + url="https://meet.google.com/mnt-zerh-oqw", status_code=301 + ) +) + + if __name__ == "__main__": import uvicorn diff --git a/templates/base.html b/templates/base.html index 08d7636..9f1ca42 100644 --- a/templates/base.html +++ b/templates/base.html @@ -153,13 +153,13 @@

{{ t.get('footer-contact-title','Contact') }}