aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2020-10-24 20:50:08 +0200
committerfilip <filip.komar@gmail.com>2020-10-24 20:50:08 +0200
commitf1de6a90e16de4b0756e890b9dc4b119d97d6778 (patch)
tree318fc4950dac0a8fd7c136b88d428344bc5a88d1
parent0a858d2e4153328faa5b6cd8830914d55fedd449 (diff)
downloadnav-f1de6a90e16de4b0756e890b9dc4b119d97d6778.tar
nav-f1de6a90e16de4b0756e890b9dc4b119d97d6778.tar.gz
nav-f1de6a90e16de4b0756e890b9dc4b119d97d6778.tar.bz2
nav-f1de6a90e16de4b0756e890b9dc4b119d97d6778.tar.xz
nav-f1de6a90e16de4b0756e890b9dc4b119d97d6778.zip
nav RTL collapse fix
-rw-r--r--lib.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib.php b/lib.php
index 8d3ae5b..a70a697 100644
--- a/lib.php
+++ b/lib.php
@@ -340,6 +340,7 @@ function _mgnav_html($wrap = false, $lang = 'en', $inject = null, $vhost = 'www.
$s = implode($s);
$links_direction = is_locale_rtl($lang) ? ' dir="rtl"' : '';
$links_position = is_locale_rtl($lang) ? 'ml-auto' : 'mr-auto';
+ $navbar_collapse_position = is_locale_rtl($lang) ? 'style="text-align: right;"' : 'style="text-align: left;"';
$h = sprintf('<!--googleoff: all-->
<div' . $links_direction . ' class="mganav">
<nav id="mgnav" class="container navbar navbar-expand-lg navbar-light">
@@ -347,7 +348,7 @@ function _mgnav_html($wrap = false, $lang = 'en', $inject = null, $vhost = 'www.
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
- <div class="collapse navbar-collapse" id="navbarNav">
+ <div class="collapse navbar-collapse" ' . $navbar_collapse_position . ' id="navbarNav">
<ul class="navbar-nav ' . $links_position . '">%s</ul>
</div>
</nav>