fix(rtl): incorrect article-link badge padding

This commit is contained in:
ZhenShuo Leo
2025-08-02 17:43:00 +08:00
parent 58b7a6be39
commit b005096833
2 changed files with 13 additions and 11 deletions

View File

@@ -2053,6 +2053,9 @@ body.zen-mode-enable {
.py-\[1px\] {
padding-block: 1px;
}
.ps-2 {
padding-inline-start: calc(var(--spacing) * 2);
}
.ps-5 {
padding-inline-start: calc(var(--spacing) * 5);
}
@@ -2119,9 +2122,6 @@ body.zen-mode-enable {
.pl-0 {
padding-left: calc(var(--spacing) * 0);
}
.pl-2 {
padding-left: calc(var(--spacing) * 2);
}
.pl-4 {
padding-left: calc(var(--spacing) * 4);
}

View File

@@ -71,7 +71,7 @@
{{/* Output draft label */}}
{{ if and (eq $scope "single") (and .Draft .Site.Params.article.showDraftLabel) }}
<span class="pl-2">{{ partial "badge.html" (i18n "article.draft" | emojify) }}</span>
<span class="ps-2">{{ partial "badge.html" (i18n "article.draft" | emojify) }}</span>
{{ end }}
</div>
@@ -81,7 +81,9 @@
{{ if (eq $taxonomy "authors") }}
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
{{ range $i, $a := $context.GetTerms $taxonomy }}
{{ if not (eq $i 0) }},&nbsp;{{ end }}
{{ if not (eq $i 0) }}
,&nbsp;
{{ end }}
<a href="{{ $a.RelPermalink }}" class="relative">{{ $a.LinkTitle }}</a>
{{ end }}
{{ end }}
@@ -97,9 +99,9 @@
{{ if and (not (eq $taxonomy "authors")) (not (eq $taxonomy "series")) }}
{{ if (gt (len ($context.GetTerms $taxonomy)) 0) }}
{{ range $context.GetTerms $taxonomy }}
<a class="relative mt-[0.5rem] mr-2" href="{{ .RelPermalink }}"
>{{ partial "badge.html" .LinkTitle }}</a
>
<a class="relative mt-[0.5rem] me-2" href="{{ .RelPermalink }}">
{{ partial "badge.html" .LinkTitle }}
</a>
{{ end }}
{{ end }}
{{ end }}
@@ -111,9 +113,9 @@
{{ if .Params.showCategoryOnly | default (.Site.Params.article.showCategoryOnly | default false) }}
<div class="flex flex-row flex-wrap items-center">
{{ range (.GetTerms "categories") }}
<a class="relative mt-[0.5rem] mr-2" href="{{ .RelPermalink }}"
>{{ partial "badge.html" .LinkTitle }}</a
>
<a class="relative mt-[0.5rem] me-2" href="{{ .RelPermalink }}">
{{ partial "badge.html" .LinkTitle }}
</a>
{{ end }}
</div>
{{ end }}