From 1c0b8a7dcd933e23fca15bcce2de6bda16c84900 Mon Sep 17 00:00:00 2001 From: maTh <1645099+math-GH@users.noreply.github.com> Date: Thu, 21 Mar 2024 10:25:58 +0100 Subject: Fix: dir=rtl (#6221) * Update layout.phtml * Update simple.phtml * Update contentSelectorPreview.phtml --- app/layout/layout.phtml | 5 +++-- app/layout/simple.phtml | 5 +++-- app/views/feed/contentSelectorPreview.phtml | 11 ++++++++++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml index b6ed99724..e581850bd 100644 --- a/app/layout/layout.phtml +++ b/app/layout/layout.phtml @@ -3,8 +3,9 @@ /** @var FreshRSS_View $this */ FreshRSS::preLayout(); $class = ''; + $dir = ''; if (_t('gen.dir') === 'rtl') { - echo ' dir="rtl"'; + $dir = ' dir="rtl"'; $class = 'rtl '; } if (FreshRSS_Context::userConf()->darkMode !== 'no') { @@ -12,7 +13,7 @@ } ?> - + xml:lang="language ?>" class=""> diff --git a/app/layout/simple.phtml b/app/layout/simple.phtml index e460e283b..a79d102af 100644 --- a/app/layout/simple.phtml +++ b/app/layout/simple.phtml @@ -3,8 +3,9 @@ /** @var FreshRSS_View $this */ FreshRSS::preLayout(); $class = ''; + $dir = ''; if (_t('gen.dir') === 'rtl') { - echo ' dir="rtl"'; + $dir = ' dir="rtl"'; $class = 'rtl '; } if (FreshRSS_Context::userConf()->darkMode !== 'no') { @@ -12,7 +13,7 @@ } ?> - + xml:lang="language ?>" class=""> diff --git a/app/views/feed/contentSelectorPreview.phtml b/app/views/feed/contentSelectorPreview.phtml index a93e88783..c8c24419b 100644 --- a/app/views/feed/contentSelectorPreview.phtml +++ b/app/views/feed/contentSelectorPreview.phtml @@ -2,9 +2,18 @@ declare(strict_types=1); /** @var FreshRSS_View $this */ FreshRSS::preLayout(); + $class = ''; + $dir = ''; + if (_t('gen.dir') === 'rtl') { + $dir = ' dir="rtl"'; + $class = 'rtl '; + } + if (FreshRSS_Context::userConf()->darkMode !== 'no') { + $class .= 'darkMode_' . FreshRSS_Context::userConf()->darkMode; + } ?> - + xml:lang="language ?>" class=""> -- cgit v1.2.3