mirror of
https://github.com/rvtr/wiki.git
synced 2025-06-19 03:25:40 -04:00
Some fixes for RTL
This commit is contained in:
parent
00863e9094
commit
75031a4e2c
@ -20,6 +20,8 @@ collections:
|
||||
output: true
|
||||
fr-FR:
|
||||
output: true
|
||||
he-IL:
|
||||
output: true
|
||||
hu-HU:
|
||||
output: true
|
||||
it-IT:
|
||||
@ -53,6 +55,7 @@ lang-names:
|
||||
en-US: English
|
||||
es-ES: Español
|
||||
fr-FR: Français
|
||||
he-IL: עברית
|
||||
hu-HU: Magyar
|
||||
it-IT: Italiano
|
||||
ja-JP: 日本語
|
||||
@ -66,3 +69,5 @@ lang-names:
|
||||
uk-UA: Українська
|
||||
zh-CN: 中文 (简体)
|
||||
zh-TW: 中文 (繁體)
|
||||
|
||||
rtl: [he-IL]
|
@ -11,7 +11,11 @@
|
||||
</title>
|
||||
|
||||
<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">
|
||||
{% 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">
|
||||
{% endif %}
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="screen" href="/assets/css/style.css">
|
||||
|
||||
|
@ -33,13 +33,13 @@
|
||||
<a class="nav-link" href="https://github.com/{{ page.repo | default: site.repo }}">{{ site.data[page.collection].strings.source}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="btn-group language-dropdown">
|
||||
<div class="btn-group position-absolute-sm end-0 me-1">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-globe" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm7.5-6.923c-.67.204-1.335.82-1.887 1.855A7.97 7.97 0 0 0 5.145 4H7.5V1.077zM4.09 4H2.255a7.025 7.025 0 0 1 3.072-2.472 6.7 6.7 0 0 0-.597.933c-.247.464-.462.98-.64 1.539zm-.582 3.5h-2.49c.062-.89.291-1.733.656-2.5H3.82a13.652 13.652 0 0 0-.312 2.5zM4.847 5H7.5v2.5H4.51A12.5 12.5 0 0 1 4.846 5zM8.5 5v2.5h2.99a12.495 12.495 0 0 0-.337-2.5H8.5zM4.51 8.5H7.5V11H4.847a12.5 12.5 0 0 1-.338-2.5zm3.99 0V11h2.653c.187-.765.306-1.608.338-2.5H8.5zM5.145 12H7.5v2.923c-.67-.204-1.335-.82-1.887-1.855A7.97 7.97 0 0 1 5.145 12zm.182 2.472a6.696 6.696 0 0 1-.597-.933A9.268 9.268 0 0 1 4.09 12H2.255a7.024 7.024 0 0 0 3.072 2.472zM3.82 11H1.674a6.958 6.958 0 0 1-.656-2.5h2.49c.03.877.138 1.718.312 2.5zm6.853 3.472A7.024 7.024 0 0 0 13.745 12H11.91a9.27 9.27 0 0 1-.64 1.539 6.688 6.688 0 0 1-.597.933zM8.5 12h2.355a7.967 7.967 0 0 1-.468 1.068c-.552 1.035-1.218 1.65-1.887 1.855V12zm3.68-1h2.146c.365-.767.594-1.61.656-2.5h-2.49a13.65 13.65 0 0 1-.312 2.5zm2.802-3.5h-2.49A13.65 13.65 0 0 0 12.18 5h2.146c.365.767.594 1.61.656 2.5zM11.27 2.461c.247.464.462.98.64 1.539h1.835a7.024 7.024 0 0 0-3.072-2.472c.218.284.418.598.597.933zM10.855 4H8.5V1.077c.67.204 1.335.82 1.887 1.855.173.324.33.682.468 1.068z"/>
|
||||
</svg>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end-sm" id="language-dropdown">
|
||||
<ul class="dropdown-menu dropdown-menu-sm-end" id="language-dropdown">
|
||||
{% assign ref = page.url | split: page.collection | last %}
|
||||
{% for collection in site.collections %}
|
||||
{% unless collection.label == "ic-IC" %}
|
||||
|
@ -3,7 +3,7 @@ layout: compress
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ page.collection | default: "en-US" }}">
|
||||
<html lang="{{ page.collection | default: "en-US" }}" {% if site.rtl contains page.collection %}dir="rtl"{% endif %}>
|
||||
{% include head.html%}
|
||||
|
||||
<body>
|
||||
|
@ -3,7 +3,7 @@ layout: compress
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ page.collection | default: "en-US" }}">
|
||||
<html lang="{{ page.collection | default: "en-US" }}" {% if site.rtl contains page.collection %}dir="rtl"{% endif %}>
|
||||
{% include head.html%}
|
||||
|
||||
<body>
|
||||
@ -43,11 +43,11 @@ layout: compress
|
||||
<!-- Finally, the other pages -->
|
||||
{% for cat in categories %}
|
||||
<li>
|
||||
<details {% if page.category contains cat %}open{% endif %}>
|
||||
<details {% if page.category == cat or page.category.first and page.category contains cat %}open{% endif %}>
|
||||
<summary>{{ cat }}</summary>
|
||||
<ul>
|
||||
{% for item in items %}
|
||||
{% unless item.category contains cat %}
|
||||
{% unless item.category == cat or item.category.first and item.category contains cat %}
|
||||
{% continue %}
|
||||
{% endunless %}
|
||||
<li class="{% if page.title == item.title %}fw-bold{% endif %}"><a href="{{ item.url }}">{{ item.title }}</a></li>
|
||||
|
@ -292,7 +292,13 @@ div .btn-primary:hover {
|
||||
|
||||
.li-bullet {
|
||||
list-style: disc;
|
||||
margin-left: 1em;
|
||||
margin-left: 1.25em;
|
||||
}
|
||||
|
||||
html[dir=rtl] .li-bullet {
|
||||
list-style: disc;
|
||||
margin-left: 0;
|
||||
margin-right: 1.5em;
|
||||
}
|
||||
|
||||
// Hide header anchors unless hovering the header
|
||||
@ -362,15 +368,16 @@ kbd.face {
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 576px) {
|
||||
// Only right align language dropdown when sm+
|
||||
.language-dropdown {
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
// Version of .position-absolute that only triggers for sm+
|
||||
.position-absolute-sm {
|
||||
position: absolute!important;
|
||||
}
|
||||
.dropdown-menu-end-sm {
|
||||
|
||||
// Seems to be broken in RTL in bootstrap v5.0-beta1, so override here
|
||||
html[dir=rtl] .dropdown-menu-sm-end {
|
||||
--bs-position: end;
|
||||
right: 0;
|
||||
left: auto;
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user