mirror of
https://github.com/rvtr/wiki.git
synced 2025-06-19 03:25:40 -04:00
Switch to RTL layout when using in-context for RTL
This commit is contained in:
parent
771147939b
commit
1f6c2bb959
@ -12,9 +12,9 @@
|
||||
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
{% if site.rtl contains page.collection %}
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.rtl.min.css" integrity="sha384-mUkCBeyHPdg0tqB6JDd+65Gpw5h/l8DKcCTV2D2UpaMMFd7Jo8A+mDAosaWgFBPl" crossorigin="anonymous">
|
||||
<link id="bootstrap-stylesheet" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.rtl.min.css" integrity="sha384-mUkCBeyHPdg0tqB6JDd+65Gpw5h/l8DKcCTV2D2UpaMMFd7Jo8A+mDAosaWgFBPl" crossorigin="anonymous">
|
||||
{% else %}
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
|
||||
<link id="bootstrap-stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
|
||||
{% endif %}
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="/assets/css/style.css">
|
||||
@ -29,6 +29,19 @@
|
||||
_jipt.push(['escape', function() {
|
||||
window.location.href = "http://wiki.ds-homebrew.com";
|
||||
}]);
|
||||
|
||||
let langCheck = setInterval(() => {
|
||||
let selectedLang = document.getElementsByClassName("crowdin-jipt")?.[4]?.contentWindow.document.getElementById("jipt-target-languages").value;
|
||||
if(selectedLang) {
|
||||
clearInterval(langCheck);
|
||||
if(["he"].includes(selectedLang)) {
|
||||
document.dir = "rtl";
|
||||
let bootstrapStylesheet = document.getElementById("bootstrap-stylesheet");
|
||||
bootstrapStylesheet.integrity = "sha384-mUkCBeyHPdg0tqB6JDd+65Gpw5h/l8DKcCTV2D2UpaMMFd7Jo8A+mDAosaWgFBPl";
|
||||
bootstrapStylesheet.href = "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.rtl.min.css";
|
||||
}
|
||||
}
|
||||
}, 500);
|
||||
</script>
|
||||
<script src="//cdn.crowdin.com/jipt/jipt.js"></script>
|
||||
{% endif %}
|
||||
|
@ -1,6 +1,3 @@
|
||||
---
|
||||
layout: compress
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ page.collection | default: "en-US" }}" {% if site.rtl contains page.collection %}dir="rtl"{% endif %}>
|
||||
|
Loading…
Reference in New Issue
Block a user