Skip to content

Commit d9a6439

Browse files
authored
Merge pull request #5 from WassCodeur/main
Update French navigation label and add social media redirections
2 parents 1072b43 + d36c3ff commit d9a6439

3 files changed

Lines changed: 38 additions & 4 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ repos:
2424
- id: detect-private-key
2525

2626
- repo: https://github.com/astral-sh/ruff-pre-commit
27-
rev: v0.14.7
27+
rev: v0.14.8
2828
hooks:
2929
- id: ruff
3030
args: [--fix]

main.py

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
TRANSLATIONS = {
169169
"fr": {
170170
"site-title": "Python Togo",
171-
"nav-home": "The Python Software Community Togo",
171+
"nav-home": "Accueil",
172172
"nav-about": "À propos",
173173
"nav-code": "Code de conduite",
174174
"nav-events": "Événements",
@@ -1630,6 +1630,40 @@ async def privacy(request: Request):
16301630
)
16311631

16321632

1633+
# redirections
1634+
1635+
app.get("/favicon.ico")(lambda: RedirectResponse(url="/static/images/Py.png"))
1636+
app.get("/discord")(
1637+
lambda: RedirectResponse(url="https://discord.gg/RP76qhwrNY", status_code=301)
1638+
)
1639+
app.get("/linkedin")(
1640+
lambda: RedirectResponse(
1641+
url="https://www.linkedin.com/company/pythontogo/", status_code=301
1642+
)
1643+
)
1644+
app.get("/twitter")(
1645+
lambda: RedirectResponse(url="https://x.com/pytogo_org", status_code=301)
1646+
)
1647+
app.get("/x")(lambda: RedirectResponse(url="https://x.com/pytogo_org", status_code=301))
1648+
app.get("/instagram")(
1649+
lambda: RedirectResponse(url="https://www.instagram.com/pycontg/", status_code=301)
1650+
)
1651+
app.get("/x")(lambda: RedirectResponse(url="https://x.com/pytogo_org", status_code=301))
1652+
app.get("/facebook")(
1653+
lambda: RedirectResponse(
1654+
url="https://www.facebook.com/share/1DA5jFdhbp/", status_code=301
1655+
)
1656+
)
1657+
app.get("/mastodon")(
1658+
lambda: RedirectResponse(url="https://techhub.social/@pytogo_org", status_code=301)
1659+
)
1660+
app.get("/meet")(
1661+
lambda: RedirectResponse(
1662+
url="https://meet.google.com/mnt-zerh-oqw", status_code=301
1663+
)
1664+
)
1665+
1666+
16331667
if __name__ == "__main__":
16341668
import uvicorn
16351669

templates/base.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,13 @@ <h4><span>{{ t.get('footer-contact-title','Contact') }}</span></h4>
153153
</div>
154154

155155
<div class="social-links" aria-label="Réseaux sociaux">
156-
<!-- <a href="https://www.linkedin.com/company/python-togo" class="social-link" target="_blank">
156+
<a href="https://www.linkedin.com/company/pythontogo/" class="social-link" target="_blank">
157157
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="30" height="30"
158158
fill="currentColor">
159159
<path
160160
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" />
161161
</svg>
162-
</a> -->
162+
</a>
163163
<!-- Instagram (inline SVG) -->
164164
<a href="https://www.instagram.com/pycontg/" class="social-link" target="_blank" rel="noopener noreferrer" aria-label="Instagram">
165165
<svg width="30" height="30" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="social-icon" aria-hidden="true">

0 commit comments

Comments
 (0)