style(article-link): run prettier format

This commit is contained in:
ZhenShuo Leo
2025-07-09 23:43:26 +08:00
parent 35faec527b
commit 2978995211
4 changed files with 155 additions and 149 deletions

View File

@@ -28,9 +28,6 @@ static
layouts/_default/_markup/render-heading.html
layouts/_default/index.json
layouts/_default/list.html
layouts/partials/article-link/card-related.html
layouts/partials/article-link/card.html
layouts/partials/article-link/simple.html
layouts/partials/hero/background.html
layouts/shortcodes/screenshot.html
layouts/shortcodes/figure.html

View File

@@ -1,9 +1,10 @@
<a {{ partial "article-link/_external-link.html" . | safeHTMLAttr }} class="min-w-full">
<div class="min-h-full border border-neutral-200 dark:border-neutral-700 border-2 rounded overflow-hidden shadow-2xl relative">
<div
class="min-h-full border border-neutral-200 dark:border-neutral-700 border-2 rounded overflow-hidden shadow-2xl relative">
{{- with $.Params.images -}}
{{- range first 6 . }}
<meta property="og:image" content="{{ . | absURL }}" />{{ end -}}
<meta property="og:image" content="{{ . | absURL }}">
{{ end -}}
{{- else -}}
{{ $images := $.Resources.ByType "image" }}
{{ $featuredImage := $images.GetMatch "*feature*" }}
@@ -25,7 +26,7 @@
<div class="w-full thumbnail_card_related nozoom {{ $className }}"></div>
{{ else }}
{{ with $.Site.Params.images }}
<meta property="og:image" content="{{ index . 0 | absURL }}" />
<meta property="og:image" content="{{ index . 0 | absURL }}">
{{ end }}
{{ end }}
{{ end }}
@@ -36,8 +37,8 @@
</span>
{{ end }}
<div class="px-6 py-4">
<div class="px-6 py-4">
{{ with .Params.externalUrl }}
<div>
<div
@@ -50,10 +51,14 @@
</div>
</div>
{{ else }}
<div class="font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral"
href="{{ .RelPermalink }}">{{ .Title | emojify }}</div>
<div
class="font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral"
href="{{ .RelPermalink }}">
{{ .Title | emojify }}
</div>
{{ end }}
<div class="text-sm text-neutral-500 dark:text-neutral-400">
{{ partial "article-meta/basic.html" . }}
</div>
@@ -64,8 +69,6 @@
</div>
{{ end }}
</div>
<div class="px-6 pt-4 pb-2">
</div>
<div class="px-6 pt-4 pb-2"></div>
</div>
</a>

View File

@@ -1,9 +1,10 @@
<a {{ partial "article-link/_external-link.html" . | safeHTMLAttr }} class="min-w-full">
<div class="min-h-full border border-neutral-200 dark:border-neutral-700 border-2 rounded overflow-hidden shadow-2xl relative">
<div
class="min-h-full border border-neutral-200 dark:border-neutral-700 border-2 rounded overflow-hidden shadow-2xl relative">
{{- with $.Params.images -}}
{{- range first 6 . }}
<meta property="og:image" content="{{ . | absURL }}" />{{ end -}}
<meta property="og:image" content="{{ . | absURL }}">
{{ end -}}
{{- else -}}
{{ $images := $.Resources.ByType "image" }}
{{ $featuredImage := $images.GetMatch "*feature*" }}
@@ -28,20 +29,19 @@
<div class="w-full thumbnail_card nozoom {{ $className }}"></div>
{{ else }}
{{ with $.Site.Params.images }}
<meta property="og:image" content="{{ index . 0 | absURL }}" />
<meta property="og:image" content="{{ index . 0 | absURL }}">
{{ end }}
{{ end }}
{{ end }}
{{ if and .Draft .Site.Params.article.showDraftLabel }}
<span class="absolute top-0 right-0 m-2">
{{ partial "badge.html" (i18n "article.draft" | emojify) }}
</span>
{{ end }}
<div class="px-6 py-4">
<div class="px-6 py-4">
{{ with .Params.externalUrl }}
<div>
<div
@@ -54,10 +54,14 @@
</div>
</div>
{{ else }}
<div class="font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral"
href="{{ .RelPermalink }}">{{ .Title | emojify }}</div>
<div
class="font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral"
href="{{ .RelPermalink }}">
{{ .Title | emojify }}
</div>
{{ end }}
<div class="text-sm text-neutral-500 dark:text-neutral-400">
{{ partial "article-meta/basic.html" . }}
</div>
@@ -68,8 +72,6 @@
</div>
{{ end }}
</div>
<div class="px-6 pt-4 pb-2">
</div>
<div class="px-6 pt-4 pb-2"></div>
</div>
</a>

View File

@@ -29,7 +29,8 @@
<a class="{{ $articleClasses }}" {{ partial "article-link/_external-link.html" . | safeHTMLAttr }}>
{{- with $.Params.images -}}
{{- range first 6 . }}
<meta property="og:image" content="{{ . | absURL }}" />{{ end -}}
<meta property="og:image" content="{{ . | absURL }}">
{{ end -}}
{{- else -}}
{{ $images := $.Resources.ByType "image" }}
{{ $featuredImage := $images.GetMatch "*feature*" }}
@@ -54,7 +55,7 @@
<div class="{{ $articleImageClasses }} {{ $className }}"></div>
{{ else }}
{{ with $.Site.Params.images }}
<meta property="og:image" content="{{ index . 0 | absURL }}" />
<meta property="og:image" content="{{ index . 0 | absURL }}">
{{ end }}
{{ end }}
{{ end }}
@@ -74,8 +75,11 @@
</div>
</div>
{{ else }}
<div class="font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral"
href="{{ .RelPermalink }}">{{ .Title | emojify }}</div>
<div
class="font-bold text-xl text-neutral-800 decoration-primary-500 hover:underline hover:underline-offset-2 dark:text-neutral"
href="{{ .RelPermalink }}">
{{ .Title | emojify }}
</div>
{{ end }}
{{ if and .Draft .Site.Params.article.showDraftLabel }}
<div class=" ltr:ml-2 rtl:mr-2">