fix: RTL Steps FileTree, feat: Add Persian number for ol label counter and Steps (#314)

* fix: RTL Steps in steps.html file

* feat: Add bidirectional support

* fix: RTL problem

* fix: RTL problem, feat: Add Persian CSS counter

* feat: Add Persian for ol counter

* fix: styling text

* Add ol output example

* fix: RTL problem

* fix some issue

* fix some issue

* fix some issue
This commit is contained in:
Goudarz Jafari
2024-03-05 11:17:29 +03:30
committed by GitHub
parent fba95d5336
commit 22d4737b99
13 changed files with 85 additions and 37 deletions

View File

@ -6,7 +6,7 @@
<div class="code-block hx-relative hx-mt-6 first:hx-mt-0 group/code">
{{- if $filename -}}
<div class="filename">{{ $filename }}</div>
<div class="filename" dir="auto">{{ $filename }}</div>
{{- end -}}
{{- if transform.CanHighlight $lang -}}
<div>{{- highlight .Inner $lang .Options -}}</div>

View File

@ -39,7 +39,7 @@
<span>
{{- . | markdownify -}}
{{- if strings.Contains . "Hextra" -}}
{{- partial "utils/icon.html" (dict "name" "hextra" "attributes" `height=1em class="hx-inline-block hx-ml-1 hx-align-[-2.5px]"`) -}}
{{- partial "utils/icon.html" (dict "name" "hextra" "attributes" `height=1em class="hx-inline-block ltr:hx-ml-1 rtl:hx-mr-1 hx-align-[-2.5px]"`) -}}
{{- end -}}
</span>
</a>

View File

@ -45,7 +45,7 @@
<span>
{{- $backToTop -}}
</span>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="hx-inline hx-ml-1 hx-h-3.5 hx-w-3.5 hx-border hx-rounded-full hx-border-gray-500 hover:hx-border-gray-900 dark:hx-border-gray-400 dark:hover:hx-border-gray-100 contrast-more:hx-border-gray-800 contrast-more:dark:hx-border-gray-50">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="hx-inline ltr:hx-ml-1 rtl:hx-mr-1 hx-h-3.5 hx-w-3.5 hx-border hx-rounded-full hx-border-gray-500 hover:hx-border-gray-900 dark:hx-border-gray-400 dark:hover:hx-border-gray-100 contrast-more:hx-border-gray-800 contrast-more:dark:hx-border-gray-50">
<path stroke-linecap="round" stroke-linejoin="round" d="M4.5 15.75l7.5-7.5 7.5 7.5" />
</svg>
</button>

View File

@ -4,6 +4,6 @@
<li class="hx-flex hx-list-none">
<span class="hx-inline-flex hx-cursor-default hx-items-center hx-py-1">
{{- partial "utils/icon" (dict "name" "document-text" "attributes" "width=1em") -}}
<span class="hx-ml-1">{{ $name | markdownify }}</span>
<span class="ltr:hx-ml-1 rtl:hx-mr-1">{{ $name | markdownify }}</span>
</span>
</li>

View File

@ -9,9 +9,9 @@
<span data-state="{{ $state }}" class="data-[state=closed]:hx-hidden">
{{- partial "utils/icon" (dict "name" "folder-open" "attributes" "width=1em") -}}
</span>
<span class="hx-ml-1">{{ $name }}</span>
<span class="ltr:hx-ml-1 rtl:hx-mr-1">{{ $name }}</span>
</button>
<ul data-state="{{ $state }}" class="hx-pl-5 data-[state=closed]:hx-hidden">
<ul data-state="{{ $state }}" class="ltr:hx-pl-5 rtl:hx-pr-5 data-[state=closed]:hx-hidden">
{{- .Inner -}}
</ul>
</li>

View File

@ -1,3 +1,3 @@
<div class="steps hx-ml-4 hx-mb-12 hx-border-l hx-border-gray-200 hx-pl-6 dark:hx-border-neutral-800 [counter-reset:step]">
<div class="steps hx-ml-4 hx-mb-12 ltr:hx-border-l rtl:hx-border-r hx-border-gray-200 ltr:hx-pl-6 rtl:hx-pr-6 dark:hx-border-neutral-800 [counter-reset:step]">
{{- .Inner -}}
</div>