diff options
| author | 2024-03-21 10:25:58 +0100 | |
|---|---|---|
| committer | 2024-03-21 10:25:58 +0100 | |
| commit | 1c0b8a7dcd933e23fca15bcce2de6bda16c84900 (patch) | |
| tree | 2d36a402db7d7f38a526376c4307b9f5e611692a | |
| parent | b5445e1e56497f8bdc1de35a8325418c44b96d37 (diff) | |
Fix: dir=rtl (#6221)
* Update layout.phtml
* Update simple.phtml
* Update contentSelectorPreview.phtml
| -rw-r--r-- | app/layout/layout.phtml | 5 | ||||
| -rw-r--r-- | app/layout/simple.phtml | 5 | ||||
| -rw-r--r-- | 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 @@ } ?> <!DOCTYPE html> -<html lang="<?= FreshRSS_Context::userConf()->language ?>" xml:lang="<?= FreshRSS_Context::userConf()->language ?>" class="<?= $class ?>"> +<html lang="<?= FreshRSS_Context::userConf()->language ?>"<?= $dir ?> xml:lang="<?= FreshRSS_Context::userConf()->language ?>" class="<?= $class ?>"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" /> 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 @@ } ?> <!DOCTYPE html> -<html lang="<?= FreshRSS_Context::userConf()->language ?>" xml:lang="<?= FreshRSS_Context::userConf()->language ?>" class="<?= $class ?>"> +<html lang="<?= FreshRSS_Context::userConf()->language ?>"<?= $dir ?> xml:lang="<?= FreshRSS_Context::userConf()->language ?>" class="<?= $class ?>"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" /> 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; + } ?> <!DOCTYPE html> -<html class="preview_background" lang="<?= FreshRSS_Context::userConf()->language ?>" xml:lang="<?= FreshRSS_Context::userConf()->language ?>"> +<html class="preview_background" lang="<?= FreshRSS_Context::userConf()->language ?>"<?= $dir ?> xml:lang="<?= FreshRSS_Context::userConf()->language ?>" class="<?= $class ?>"> <head> <?= FreshRSS_View::headStyle() ?> <script src="<?= Minz_Url::display('/scripts/preview.js?' . @filemtime(PUBLIC_PATH . '/scripts/preview.js')) ?>"></script> |
