Skip to content

Commit

Permalink
Fix wrong capitalization of article title in subnav for non-english l…
Browse files Browse the repository at this point in the history
…anguages.

Conditioning the `tw-capitalize` to only be added to pages with `LANGUAGE_CODE` set to `en`.
  • Loading branch information
ramram-mf committed Jun 10, 2024
1 parent b00338b commit 1b62d08
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{% load i18n wagtailimages_tags wagtailcore_tags static %}
{% get_current_language as LANGUAGE_CODE %}

<div class="article-navbar-container position-relative" aria-hidden="true">
<div class="article-navbar">
<div class="tw-container">
<div class="tw-row tw-items-end">
<div class="article-navbar-title tw-body-large tw-capitalize tw-pl-8 tw-hidden medium:tw-block tw-w-[280px] large:tw-w-auto tw-truncate">
<div class="article-navbar-title tw-body-large {% if LANGUAGE_CODE == 'en' %}tw-capitalize{% endif %} tw-pl-8 tw-hidden medium:tw-block tw-w-[280px] large:tw-w-auto tw-truncate">
{% if get_titles %}
{{ page.title|truncatechars:60 }}
{% else %}
Expand Down

0 comments on commit 1b62d08

Please sign in to comment.