Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
36 changes: 35 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@ <h4><span>{{ t.get('footer-contact-title','Contact') }}</span></h4>
</div>

<div class="social-links" aria-label="Réseaux sociaux">
<!-- <a href="https://www.linkedin.com/company/python-togo" class="social-link" target="_blank">
<a href="https://www.linkedin.com/company/pythontogo/" class="social-link" target="_blank">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="30" height="30"
fill="currentColor">
<path
d="M4.98 3.5c0 1.381-1.11 2.5-2.48 2.5s-2.48-1.119-2.48-2.5c0-1.38 1.11-2.5 2.48-2.5s2.48 1.12 2.48 2.5zm.02 4.5h-5v16h5v-16zm7.982 0h-4.968v16h4.969v-8.399c0-4.67 6.029-5.052 6.029 0v8.399h4.988v-10.131c0-7.88-8.922-7.593-11.018-3.714v-2.155z" />
</svg>
</a> -->
</a>
<!-- Instagram (inline SVG) -->
<a href="https://www.instagram.com/pycontg/" class="social-link" target="_blank" rel="noopener noreferrer" aria-label="Instagram">
<svg width="30" height="30" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="social-icon" aria-hidden="true">
Expand Down