Skip to content

Commit

Permalink
Fix: dir=rtl (FreshRSS#6221)
Browse files Browse the repository at this point in the history
* Update layout.phtml

* Update simple.phtml

* Update contentSelectorPreview.phtml
  • Loading branch information
math-GH authored Mar 21, 2024
1 parent b5445e1 commit 1c0b8a7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
5 changes: 3 additions & 2 deletions app/layout/layout.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
/** @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') {
$class .= 'darkMode_' . FreshRSS_Context::userConf()->darkMode;
}
?>
<!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" />
Expand Down
5 changes: 3 additions & 2 deletions app/layout/simple.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
/** @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') {
$class .= 'darkMode_' . FreshRSS_Context::userConf()->darkMode;
}
?>
<!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" />
Expand Down
11 changes: 10 additions & 1 deletion app/views/feed/contentSelectorPreview.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 1c0b8a7

Please sign in to comment.