Skip to content

Commit

Permalink
If the site title ends with .fr, make that part italic
Browse files Browse the repository at this point in the history
  • Loading branch information
Ash-Crow committed Jan 17, 2024
1 parent 72b904e commit b93bc70
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
3 changes: 3 additions & 0 deletions static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@

.cmsfr-hero-dark h1, .cmsfr-hero-dark p {
color: white; }

.fr-header__service-title em {
font-weight: lighter; }
3 changes: 3 additions & 0 deletions static/css/style.sass
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@
.cmsfr-hero-dark
& h1, p
color: white

.fr-header__service-title em
font-weight: lighter
17 changes: 13 additions & 4 deletions templates/blocks/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,23 @@
{% load static wagtailcore_tags menu_tags %}

{% block brand %}
<a href="/" title="Accueil — {{ settings.content_manager.CmsDsfrConfig.header_brand }}">
<a href="/"
title="Accueil — {{ settings.content_manager.CmsDsfrConfig.header_brand }}">
<p class="fr-logo">{{ settings.content_manager.CmsDsfrConfig.header_brand_html|safe }}</p>
</a>
{% endblock brand %}

{% block service_title %}
<a href="/" title="Accueil — {{ settings.content_manager.CmsDsfrConfig.site_title }}">
<p class="fr-header__service-title">{{ settings.content_manager.CmsDsfrConfig.site_title }}</p>
<a href="/"
title="Accueil — {{ settings.content_manager.CmsDsfrConfig.site_title }}">

<p class="fr-header__service-title">
{% if settings.content_manager.CmsDsfrConfig.site_title|slice:"-2:" == "fr" %}
{{ settings.content_manager.CmsDsfrConfig.site_title|slice:":-2" }}<em>fr</em>
{% else %}
{{ settings.content_manager.CmsDsfrConfig.site_title }}
{% endif %}
</p>
</a>

{% endblock service_title %}
Expand All @@ -19,7 +28,7 @@
{% endblock service_tagline %}

{% block header_tools %}
{% flat_menu handle="header_tools" template="menus/custom_flat_menu.html" %}
{% flat_menu handle="header_tools" template="menus/custom_flat_menu.html" %}
{% endblock header_tools %}

{# Leave burger_menu and main_menu blocks empty if the main menu is not used #}
Expand Down

0 comments on commit b93bc70

Please sign in to comment.