Skip to content

Commit 419a24f

Browse files
committed
feat: add rtl style and check dir in default.html
fix: add dir variables and update comments for clarity on language and direction detection fix: update HTML lang and dir attributes to use correct language variables from lang.html feat: add Persian RTL test post with comprehensive content and formatting feat: add RTL font loader to support appropriate font loading based on page language feat: add RTL styles and font support for Arabic, Persian, and Urdu languages feat: enhance RTL support by adding additional languages to the configuration fix: remove pin attribute from Persian RTL test post feat: add comprehensive RTL support documentation fix: update comment to clarify lang and dir attributes usage in HTML layout fix: improve formatting of RTL content creation instructions in documentation fix: swap float directions for images in Persian RTL content fix: remove duplicated font source and unicode-range for RTL fonts fix: update font weights for RTL language stylesheets fix: add spaces to read time unit and prompt for better formatting fix: reorder RTL font loader inclusion for rendering after googlefonts fix: update RTL language configuration to use 'fa' instead of 'fa-IR' for better compatibility fix: add transform to sidebar for better responsiveness in RTL layout fix: add RTL Support feature to README fix: update RTL support comments for clarity fix: enhance RTL support documentation for clarity and usability fix: correct meta format in fa.yml for clarity Signed-off-by: Zakaria Fatahi <[email protected]> fix: improve sidebar transform handling for RTL layout in mobile refactor: remove RTL font loader and associated styles for cleaner codebase refactor: streamline RTL support configuration and enhance language direction detection chore: remove obsolete RTL support documentation refactor: remove RTL configuration and streamline language direction detection chore: remove RTL support mention from README refactor: remove obsolete Persian RTL test post for cleaner codebase refactor: adjust anchor float and margin for improved RTL styling refactor: remove rtl.scss from main.scss and move to _scss/base refactor: revert all changes about locale files feat: dir is an optional attribute of html element Co-authored-by: Cotes Chung <[email protected]> Signed-off-by: Zakaria Fatahi <[email protected]> refactor: add padding and border styles for access panel in RTL refactor: adjust archive styles for improved RTL layout feat: add padding styles for categories in RTL layout feat: add margin styles for list items in page category for RTL layout feat: add margin styles for tag spans in RTL layout
1 parent 09948da commit 419a24f

File tree

3 files changed

+598
-2
lines changed

3 files changed

+598
-2
lines changed

_layouts/default.html

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,16 @@
1212
{% capture prefer_mode %}data-mode="{{ site.theme_mode }}"{% endcapture %}
1313
{% endif %}
1414

15-
<!-- `site.alt_lang` can specify a language different from the UI -->
16-
<html lang="{{ page.lang | default: site.alt_lang | default: site.lang }}" {{ prefer_mode }}>
15+
{% assign _lang_code = lang | split: '-' | first %}
16+
17+
{%- capture dir -%}
18+
{%- if 'ar,fa,he,iw,ps,ug,ur,yi,ku' contains _lang_code -%}
19+
dir="rtl"
20+
{%- endif -%}
21+
{%- endcapture -%}
22+
23+
<!-- `lang` attribute is set in _includes/lang.html -->
24+
<html lang="{{ lang }}" {{ dir }} {{ prefer_mode }}>
1725
{% include head.html %}
1826

1927
<body>

_sass/base/_index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
@forward 'base';
33
@forward 'typography';
44
@forward 'syntax';
5+
@forward 'rtl';

0 commit comments

Comments
 (0)