Skip to content

Commit

Permalink
Mention "Site fait avec Sites faciles" en pied de page (#196)
Browse files Browse the repository at this point in the history
* add link to sites faciles in footer

* wip

* Fix translation issues and move style to a proper class

* Fix test

---------

Co-authored-by: Sylvain Boissel <[email protected]>
  • Loading branch information
chaibax and Ash-Crow authored Aug 20, 2024
1 parent b488da2 commit bb59957
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 8 deletions.
4 changes: 2 additions & 2 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,6 @@ def show_toolbar(request):

USE_I18N = True

USE_L10N = True

USE_TZ = True

WAGTAIL_I18N_ENABLED = True
Expand All @@ -200,6 +198,8 @@ def show_toolbar(request):
("fr", "French"),
]

LOCALE_PATHS = ["locale"]

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/5.0/howto/static-files/
STORAGES = {}
Expand Down
5 changes: 3 additions & 2 deletions content_manager/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ def test_footer_brand_block_uses_conf(self):

self.assertInHTML(
"""<div class="fr-footer__brand fr-enlarge-link">
<a id="footer-operator" href="/"
title="Retour à l’accueil du site - Site title - République française">
<a id="footer-operator"
href="/"
title="Retourner à l’accueil - Site title - République française">
<p class="fr-logo">
République<br />française
</p>
Expand Down
Binary file modified locale/fr/LC_MESSAGES/django.mo
Binary file not shown.
12 changes: 10 additions & 2 deletions locale/fr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-07-17 17:54+0200\n"
"PO-Revision-Date: 2024-06-26 17:57+0200\n"
"POT-Creation-Date: 2024-08-20 11:23+0200\n"
"PO-Revision-Date: 2024-08-20 11:25+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
Expand Down Expand Up @@ -45,6 +45,14 @@ msgstr "Retourner à l’accueil"
msgid "Display settings"
msgstr "Paramètres d’affichage"

#: templates/blocks/footer.html:56
msgid "Opens a new window"
msgstr "Ouvre une nouvelle fenêtre"

#: templates/blocks/footer.html:58
msgid "This website is made with"
msgstr "Ce site est fait avec"

#: templates/blocks/header.html:5 templates/blocks/header.html:13
msgid "Home page"
msgstr "Accueil"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ extend-exclude = '''

[tool.djlint]
max_blank_lines = 1
ignore = "H030,H031,H006"
ignore = "H030,H031,H006,D018"
indent = 2

[tool.pyright]
Expand Down
2 changes: 1 addition & 1 deletion static/css/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions static/css/style.sass
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@
height: 4.5rem !important
margin: 1.5rem
width: 4.5rem

.cmsfr-footer__bottom-extra
border-left: 1px solid var(--border-default-grey)
padding-left: 1em
margin-left: 1em
10 changes: 10 additions & 0 deletions templates/blocks/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,13 @@
</li>
{% endif %}
{% endblock footer_links %}

{% block footer_bottom_extra %}
{% translate "Opens a new window" as new_window %}
<span class="cmsfr-footer__bottom-extra">
{% translate "This website is made with" %} <a href="https://sites-faciles.beta.numerique.gouv.fr/?mtm_campaign=footer-link"
target="_blank"
rel="noopener external"
title="Sites faciles - {{ new_window }}">Sites faciles</a>
</span>
{% endblock footer_bottom_extra %}

0 comments on commit bb59957

Please sign in to comment.