|
@@ -12,6 +12,9 @@
|
|
|
<script>
|
|
<script>
|
|
|
"use strict";
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
+ {{ $languagedir := ($.Param "languagedir" | default "ltr") }}
|
|
|
|
|
+ var languagedir = JSON.parse({{ $languagedir | jsonify }});
|
|
|
|
|
+
|
|
|
window.onload = function() {
|
|
window.onload = function() {
|
|
|
// ===================== navbar collapse ======================
|
|
// ===================== navbar collapse ======================
|
|
|
var navCollapseBtn = document.getElementById('navCollapseBtn');
|
|
var navCollapseBtn = document.getElementById('navCollapseBtn');
|
|
@@ -92,12 +95,22 @@
|
|
|
content.style.maxHeight = null;
|
|
content.style.maxHeight = null;
|
|
|
content.classList.remove('active');
|
|
content.classList.remove('active');
|
|
|
menuTitleIcon.classList.add('right');
|
|
menuTitleIcon.classList.add('right');
|
|
|
- menuTitleIcon.classList.remove('down');
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (languagedir === 'rtl') {
|
|
|
|
|
+ menuTitleIcon.classList.remove('downrtl');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ menuTitleIcon.classList.remove('down');
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
content.style.maxHeight = content.scrollHeight + "px";
|
|
content.style.maxHeight = content.scrollHeight + "px";
|
|
|
content.classList.add('active');
|
|
content.classList.add('active');
|
|
|
menuTitleIcon.classList.remove('right');
|
|
menuTitleIcon.classList.remove('right');
|
|
|
- menuTitleIcon.classList.add('down');
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (languagedir === 'rtl') {
|
|
|
|
|
+ menuTitleIcon.classList.add('downrtl');
|
|
|
|
|
+ } else {
|
|
|
|
|
+ menuTitleIcon.classList.add('down');
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
@@ -111,16 +124,33 @@
|
|
|
var drawerCloseBtn = document.querySelector('.drawer__close');
|
|
var drawerCloseBtn = document.querySelector('.drawer__close');
|
|
|
|
|
|
|
|
var openDrawer = function() {
|
|
var openDrawer = function() {
|
|
|
- modal.style.left = 0;
|
|
|
|
|
modal.style.opacity = 1;
|
|
modal.style.opacity = 1;
|
|
|
- drawer.style.left = 0;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (languagedir === 'rtl') {
|
|
|
|
|
+ modal.style.right = 0;
|
|
|
|
|
+ drawer.style.right = 0;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ modal.style.left = 0;
|
|
|
|
|
+ drawer.style.left = 0;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
var closeDrawer = function() {
|
|
var closeDrawer = function() {
|
|
|
modal.style.opacity = 0;
|
|
modal.style.opacity = 0;
|
|
|
- drawer.style.left = '-100%';
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (languagedir === 'rtl') {
|
|
|
|
|
+ drawer.style.right = '-100%';
|
|
|
|
|
+ } else {
|
|
|
|
|
+ drawer.style.left = '-100%';
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
setTimeout(function () {
|
|
setTimeout(function () {
|
|
|
- modal.style.left = '-100%';
|
|
|
|
|
|
|
+ if (languagedir === 'rtl') {
|
|
|
|
|
+ modal.style.right = '-100%';
|
|
|
|
|
+ } else {
|
|
|
|
|
+ modal.style.left = '-100%';
|
|
|
|
|
+ }
|
|
|
}, 250);
|
|
}, 250);
|
|
|
}
|
|
}
|
|
|
|
|
|