diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 13d4db61..aae39d20 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -628,9 +628,6 @@ video { .hx-mb-8 { margin-bottom: 2rem; } -.hx-ml-1 { - margin-left: 0.25rem; -} .hx-ml-4 { margin-left: 1rem; } @@ -950,9 +947,6 @@ video { .hx-border-b-2 { border-bottom-width: 2px; } -.hx-border-l { - border-left-width: 1px; -} .hx-border-t { border-top-width: 1px; } @@ -1135,12 +1129,6 @@ video { .hx-pb-px { padding-bottom: 1px; } -.hx-pl-5 { - padding-left: 1.25rem; -} -.hx-pl-6 { - padding-left: 1.5rem; -} .hx-pl-\[max\(env\(safe-area-inset-left\)\,1\.5rem\)\] { padding-left: max(env(safe-area-inset-left),1.5rem); } @@ -1800,6 +1788,9 @@ article details > summary::before { vertical-align: -4px; padding: 0 0.6em; } +:lang(fa) ol { + list-style-type: persian; +} /* Code syntax highlight */ /* Light theme for syntax highlight */ /* Generated using `hugo gen chromastyles --style=github` */ @@ -2288,9 +2279,19 @@ article details > summary::before { --tw-text-opacity: 1; color: rgb(163 163 163 / var(--tw-text-opacity)); margin-top: 3px; +} +:is([dir="ltr"] .steps h3):before { margin-left: -41px; - content: counter(step); } +:is([dir="rtl"] .steps h3):before { + margin-right: -44px; +} +.steps h3:before { + content: counter(step); + } +:lang(fa) .steps h3:before { + content: counter(step, persian); + } .search-wrapper li { margin-left: 0.625rem; margin-right: 0.625rem; @@ -2804,6 +2805,9 @@ body { :is([dir="ltr"] .ltr\:hx--mr-4) { margin-right: -1rem; } +:is([dir="ltr"] .ltr\:hx-ml-1) { + margin-left: 0.25rem; +} :is([dir="ltr"] .ltr\:hx-ml-3) { margin-left: 0.75rem; } @@ -2817,6 +2821,9 @@ body { --tw-rotate: 180deg; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } +:is([dir="ltr"] .ltr\:hx-border-l) { + border-left-width: 1px; +} :is([dir="ltr"] .ltr\:hx-pl-12) { padding-left: 3rem; } @@ -2829,6 +2836,12 @@ body { :is([dir="ltr"] .ltr\:hx-pl-4) { padding-left: 1rem; } +:is([dir="ltr"] .ltr\:hx-pl-5) { + padding-left: 1.25rem; +} +:is([dir="ltr"] .ltr\:hx-pl-6) { + padding-left: 1.5rem; +} :is([dir="ltr"] .ltr\:hx-pl-8) { padding-left: 2rem; } @@ -2866,6 +2879,9 @@ body { :is([dir="rtl"] .rtl\:hx-ml-auto) { margin-left: auto; } +:is([dir="rtl"] .rtl\:hx-mr-1) { + margin-right: 0.25rem; +} :is([dir="rtl"] .rtl\:hx-mr-3) { margin-right: 0.75rem; } @@ -2876,6 +2892,9 @@ body { --tw-rotate: -180deg; transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); } +:is([dir="rtl"] .rtl\:hx-border-r) { + border-right-width: 1px; +} :is([dir="rtl"] .rtl\:hx-pl-2) { padding-left: 0.5rem; } @@ -2897,6 +2916,12 @@ body { :is([dir="rtl"] .rtl\:hx-pr-4) { padding-right: 1rem; } +:is([dir="rtl"] .rtl\:hx-pr-5) { + padding-right: 1.25rem; +} +:is([dir="rtl"] .rtl\:hx-pr-6) { + padding-right: 1.5rem; +} :is([dir="rtl"] .rtl\:hx-pr-8) { padding-right: 2rem; } diff --git a/assets/css/components/steps.css b/assets/css/components/steps.css index 278862d0..ed3ad8db 100644 --- a/assets/css/components/steps.css +++ b/assets/css/components/steps.css @@ -5,7 +5,13 @@ @apply hx-absolute hx-w-[33px] hx-h-[33px]; @apply hx-border-4 hx-border-white hx-bg-gray-100 dark:hx-border-dark dark:hx-bg-neutral-800; @apply hx-rounded-full hx-text-neutral-400 hx-text-base hx-font-normal hx-text-center -hx-indent-px; - @apply hx-mt-[3px] hx-ml-[-41px]; + @apply hx-mt-[3px] ltr:hx-ml-[-41px] rtl:hx-mr-[-44px]; content: counter(step); } } + +:lang(fa) .steps h3 { + &:before { + content: counter(step, persian); + } +} diff --git a/assets/css/typography.css b/assets/css/typography.css index 47ee352a..a059feef 100644 --- a/assets/css/typography.css +++ b/assets/css/typography.css @@ -118,3 +118,7 @@ article details > summary { padding: 0 0.6em; } } + +:lang(fa) ol { + list-style-type: persian; +} diff --git a/exampleSite/content/blog/markdown.fa.md b/exampleSite/content/blog/markdown.fa.md index 303547a9..7eb06973 100644 --- a/exampleSite/content/blog/markdown.fa.md +++ b/exampleSite/content/blog/markdown.fa.md @@ -1,6 +1,6 @@ --- title: راهنمای استفاده سینتکس مارک‌داون -date: 2020-01-01 +date: 2024-03-03 authors: - name: imfing link: https://github.com/imfing @@ -8,6 +8,9 @@ authors: - name: Octocat link: https://github.com/octocat image: https://github.com/octocat.png + - name: Goudarz Jafari + link: https://github.com/Goudarz + image: https://github.com/Goudarz.png tags: - Markdown - مثال @@ -78,13 +81,19 @@ _شما **می‌توانید** آنها را ترکیب کنید_ #### مرتب شده ``` -۱. مورد ۱ -۲. مورد ۲ -۳. مورد ۳ - ۱. مورد ۳الف - ۲. مورد ۳ب +1. مورد ۱ +2. مورد ۲ +3. مورد ۳ + 1. مورد ۳الف + 2. مورد ۳ب ``` +1. مورد ۱ +2. مورد ۲ +3. مورد ۳ + 1. مورد ۳الف + 2. مورد ۳ب + ### عکس‌ها ```markdown diff --git a/exampleSite/content/docs/guide/markdown.fa.md b/exampleSite/content/docs/guide/markdown.fa.md index 38214d6d..84e39ce7 100644 --- a/exampleSite/content/docs/guide/markdown.fa.md +++ b/exampleSite/content/docs/guide/markdown.fa.md @@ -17,7 +17,7 @@ Hugo از سینتکس [مارک‌داون](https://en.wikipedia.org/wiki/Markd | کج | `*متن کج*` | `*متن کج*` | *متن کج* | | خط خورده | `~~متن خط خورده~~` | `~~متن خط خورده~~` | ~~متن خط خورده~~ | | پایین‌نویس | `` | `این یک متن پایین‌نویس است` | این یک متن پایین‌نویس است | -| بالانویس | `` | `این یک متن بالانویس است` | این یک متن بالانویس است | +| بالانویس | `` | `این یک متن بالانویس است` | این یک متن بالانویس است | ### بلوک نقل‌قول diff --git a/exampleSite/content/docs/guide/shortcodes/steps.fa.md b/exampleSite/content/docs/guide/shortcodes/steps.fa.md index 1347336c..c726882f 100644 --- a/exampleSite/content/docs/guide/shortcodes/steps.fa.md +++ b/exampleSite/content/docs/guide/shortcodes/steps.fa.md @@ -10,11 +10,11 @@ next: /docs/guide/deploy-site {{% steps %}} ### مرحله ۱ -. این اولین مرحله است +این اولین مرحله است. ### مرحله ۲ -این دمین مرحله است. +این دومین مرحله است. ### مرحله ۳ @@ -32,11 +32,11 @@ next: /docs/guide/deploy-site ### مرحله ۱ -. این اولین مرحله است +این اولین مرحله است. ### مرحله ۲ -این دمین مرحله است. +این دومین مرحله است. {{%/* /steps */%}} ``` diff --git a/exampleSite/hugo_stats.json b/exampleSite/hugo_stats.json index 46e46a7d..244d90a4 100644 --- a/exampleSite/hugo_stats.json +++ b/exampleSite/hugo_stats.json @@ -270,7 +270,6 @@ "hx-border-blue-200", "hx-border-gray-200", "hx-border-gray-500", - "hx-border-l", "hx-border-orange-100", "hx-border-red-200", "hx-border-t", @@ -360,7 +359,6 @@ "hx-min-w-[18px]", "hx-min-w-[24px]", "hx-min-w-full", - "hx-ml-1", "hx-ml-4", "hx-mr-1", "hx-mr-2", @@ -400,8 +398,6 @@ "hx-pb-8", "hx-pb-[env(safe-area-inset-bottom)]", "hx-pb-px", - "hx-pl-5", - "hx-pl-6", "hx-pl-[max(env(safe-area-inset-left),1.5rem)]", "hx-pointer-events-none", "hx-pr-2", @@ -514,6 +510,8 @@ "lntd", "ltr:before:hx-left-0", "ltr:hx--mr-4", + "ltr:hx-border-l", + "ltr:hx-ml-1", "ltr:hx-ml-3", "ltr:hx-ml-auto", "ltr:hx-mr-auto", @@ -521,6 +519,8 @@ "ltr:hx-pl-16", "ltr:hx-pl-3", "ltr:hx-pl-4", + "ltr:hx-pl-5", + "ltr:hx-pl-6", "ltr:hx-pl-8", "ltr:hx-pr-0", "ltr:hx-pr-2", @@ -566,9 +566,11 @@ "rtl:before:hx-right-0", "rtl:before:hx-rotate-180", "rtl:hx--ml-4", + "rtl:hx-border-r", "rtl:hx-left-1.5", "rtl:hx-left-3", "rtl:hx-ml-auto", + "rtl:hx-mr-1", "rtl:hx-mr-3", "rtl:hx-mr-auto", "rtl:hx-pl-2", @@ -578,6 +580,8 @@ "rtl:hx-pr-16", "rtl:hx-pr-3", "rtl:hx-pr-4", + "rtl:hx-pr-5", + "rtl:hx-pr-6", "rtl:hx-pr-8", "rtl:hx-text-left", "rtl:md:hx-right-auto", diff --git a/layouts/_default/_markup/render-codeblock.html b/layouts/_default/_markup/render-codeblock.html index 46e9ed6d..fb8a3c75 100644 --- a/layouts/_default/_markup/render-codeblock.html +++ b/layouts/_default/_markup/render-codeblock.html @@ -6,7 +6,7 @@
{{- if $filename -}} -
{{ $filename }}
+
{{ $filename }}
{{- end -}} {{- if transform.CanHighlight $lang -}}
{{- highlight .Inner $lang .Options -}}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 72bef07c..3d62edff 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -39,7 +39,7 @@ {{- . | 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 -}} diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html index 5cb04f65..02cf98da 100644 --- a/layouts/partials/toc.html +++ b/layouts/partials/toc.html @@ -45,7 +45,7 @@ {{- $backToTop -}} - + diff --git a/layouts/shortcodes/filetree/file.html b/layouts/shortcodes/filetree/file.html index 363dfd44..63cbe54f 100644 --- a/layouts/shortcodes/filetree/file.html +++ b/layouts/shortcodes/filetree/file.html @@ -4,6 +4,6 @@
  • {{- partial "utils/icon" (dict "name" "document-text" "attributes" "width=1em") -}} - {{ $name | markdownify }} + {{ $name | markdownify }}
  • diff --git a/layouts/shortcodes/filetree/folder.html b/layouts/shortcodes/filetree/folder.html index 911e75db..9ee9a9e0 100644 --- a/layouts/shortcodes/filetree/folder.html +++ b/layouts/shortcodes/filetree/folder.html @@ -9,9 +9,9 @@ {{- partial "utils/icon" (dict "name" "folder-open" "attributes" "width=1em") -}} - {{ $name }} + {{ $name }} -