Skip to content

Commit 107bd50

Browse files
Fix RTL arrow direction and blog card text direction
- Flip navigational arrows for RTL using semantic characters (← vs →) - Flip SVG chevron path for RTL in hero grid items - Add dir="auto" to blog card titles, excerpts, and links so untranslated English content renders LTR within RTL pages Ref: #2195
1 parent 50c1661 commit 107bd50

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

i18n/he.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ other = "דרגת זהב"
359359
other = "דרגת כסף"
360360

361361
[common_read_more_arrow]
362-
other = " "
362+
other = " "
363363

364364
[newsletter_iframe_title]
365365
other = "טופס הרשמה לרשימת הדיוור"

themes/le-2025/layouts/partials/components/accordion-item.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{{ end }}
1818
{{ if and .link_url .link_text }}
1919
<a href="{{ .link_url }}" class="text-link hover:text-link-hover active:text-link-active underline">
20-
{{ .link_text }}
20+
{{ .link_text }} {{ if eq (or site.Language.LanguageDirection "ltr") "rtl" }}←{{ else }}→{{ end }}
2121
</a>
2222
{{ end }}
2323
</div>

themes/le-2025/layouts/partials/components/blog-grid-item.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{{ $currentLang := .currentLang }}
22
{{ if ne $currentLang "en" }}
3-
<a href="{{ .page.RelPermalink }}" class="blog-grid-item group" hreflang="en" target="_blank">
3+
<a href="{{ .page.RelPermalink }}" class="blog-grid-item group" hreflang="en" target="_blank" dir="auto">
44
{{ else }}
5-
<a href="{{ .page.RelPermalink }}" class="blog-grid-item group" hreflang="en">
5+
<a href="{{ .page.RelPermalink }}" class="blog-grid-item group" hreflang="en" dir="auto">
66
{{ end }}
77
<time class="text-gray-500 text-sm">{{ .page.Date | time.Format ":date_long" }}</time>
8-
<h3 class="text-xl font-bold mt-2 mb-3 text-gray-900">{{ .page.Title }}</h3>
9-
<div class="text-gray-600">
8+
<h3 class="text-xl font-bold mt-2 mb-3 text-gray-900" dir="auto">{{ .page.Title }}</h3>
9+
<div class="text-gray-600" dir="auto">
1010
{{ with .page.Params.excerpt }}
1111
{{ . | markdownify }}
1212
{{ else }}

themes/le-2025/layouts/partials/components/hero-grid-item.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ <h3 class="text-xl font-semibold mb-4">{{ $title }}</h3>
1313
<a href="{{ $link_url }}" class="font-medium inline-flex items-center">
1414
{{ $link_text }}
1515
<svg class="w-4 h-4 ms-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
16-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path>
16+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="{{ if eq (or site.Language.LanguageDirection "ltr") "rtl" }}M15 5l-7 7 7 7{{ else }}M9 5l7 7-7 7{{ end }}"></path>
1717
</svg>
1818
</a>
1919
{{ end }}

themes/le-2025/layouts/partials/sections/home-hero.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ <h2 class="text-base font-bold mb-2">{{ T "home_hero_annual_report_title" }}</h2
3939
</div>
4040
<div class="md:col-span-4 md:text-end">
4141
<a href="https://www.abetterinternet.org/annual-reports" class="text-sm btn btn-primary">
42-
{{ T "home_hero_annual_report_button" }}
42+
{{ T "home_hero_annual_report_button" }} {{ if eq (or site.Language.LanguageDirection "ltr") "rtl" }}←{{ else }}→{{ end }}
4343
</a>
4444
</div>
4545
</div>

0 commit comments

Comments
 (0)