From 5d9e1b6d477afbed2fcba2eacf41e6114bfcbe04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Wed, 8 Feb 2023 21:59:28 +0100 Subject: [PATCH] piratify: fix expand and tabs for Pirates RTL #469 --- layouts/partials/shortcodes/expand.html | 5 ++--- layouts/partials/shortcodes/tabs.html | 5 ++--- static/css/ie.css | 2 +- static/css/tabs.css | 2 +- static/css/theme.css | 4 ++-- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/layouts/partials/shortcodes/expand.html b/layouts/partials/shortcodes/expand.html index 8cb46d2c10..ecd727202f 100644 --- a/layouts/partials/shortcodes/expand.html +++ b/layouts/partials/shortcodes/expand.html @@ -6,15 +6,14 @@ {{- if eq (printf "%T" $expanded) "string" }} {{- $expanded = (eq $expanded "true") }} {{- end }} -{{- $direction := T "Reading-direction" | default "ltr" }} {{- with $context }} {{- $id := partial "make-random-md5.hugo" }}
diff --git a/layouts/partials/shortcodes/tabs.html b/layouts/partials/shortcodes/tabs.html index 4f8440febc..1068c6097f 100644 --- a/layouts/partials/shortcodes/tabs.html +++ b/layouts/partials/shortcodes/tabs.html @@ -1,14 +1,13 @@ {{- $context := .context }} {{- $tabs := .tabs | default slice }} {{- $groupid := .groupid | default "default" }} -{{- $direction := T "Reading-direction" | default "ltr" }} {{- with $context }}
{{- range $idx, $tab := $tabs }} @@ -18,7 +17,7 @@ {{- range $idx, $tab := $tabs }}
{{ .content | safeHTML }}
diff --git a/static/css/ie.css b/static/css/ie.css index b8df6663df..a8d4b40ea7 100644 --- a/static/css/ie.css +++ b/static/css/ie.css @@ -44,7 +44,7 @@ #body .tab-nav-button { margin-left: 4px; } - #body .tab-nav-button.direction-rtl { + html[dir="rtl"] #body .tab-nav-button { float: left; } #body .tab-nav-button:first-child { diff --git a/static/css/tabs.css b/static/css/tabs.css index d58bf479b9..5bb0ca0592 100644 --- a/static/css/tabs.css +++ b/static/css/tabs.css @@ -20,7 +20,7 @@ padding: 6px 12px; position: relative; } -#body .tab-nav-button.direction-rtl{ +html[dir="rtl"] #body .tab-nav-button{ float: right; } diff --git a/static/css/theme.css b/static/css/theme.css index 7ec93d78a7..6a3659fb4d 100644 --- a/static/css/theme.css +++ b/static/css/theme.css @@ -1118,8 +1118,8 @@ option { } /* turn off unsuitable expander for this reading direction */ -.expand > .expand-label > .expand-rtl.direction-ltr, -.expand > .expand-label > .expand-ltr.direction-rtl { +html[dir="ltr"] .expand > .expand-label > .expand-rtl, +html[dir="rtl"] .expand > .expand-label > .expand-ltr { display: none; }