From 340364f31a96d1a2d0f94fc6199fd536d1a5effe Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Sat, 6 Sep 2025 15:36:21 +0800 Subject: [PATCH] feat(article-link): use semantic HTML --- layouts/partials/article-link/_shortcode.html | 12 +++---- .../partials/article-link/card-related.html | 32 ++++++++++--------- layouts/partials/article-link/card.html | 32 ++++++++++--------- layouts/partials/article-link/simple.html | 12 +++---- 4 files changed, 46 insertions(+), 42 deletions(-) diff --git a/layouts/partials/article-link/_shortcode.html b/layouts/partials/article-link/_shortcode.html index 36e9450e..50381dcc 100644 --- a/layouts/partials/article-link/_shortcode.html +++ b/layouts/partials/article-link/_shortcode.html @@ -62,16 +62,16 @@ {{ end }} -
+
{{ with $featuredURL }}
{{ end }}
-
+
-
+

{{ $target.Title | emojify }} {{ if $target.Params.externalUrl }} @@ -79,7 +79,7 @@ {{ end }} -

+
{{ if and $target.Draft site.Params.article.showDraftLabel }}
@@ -89,7 +89,7 @@ {{ if templates.Exists "partials/extend-article-link.html" }} {{ partial "extend-article-link.html" $target }} {{ end }} -
+
{{ partial "article-meta/basic.html" $target }}
@@ -113,4 +113,4 @@
{{ end }}
-
+ diff --git a/layouts/partials/article-link/card-related.html b/layouts/partials/article-link/card-related.html index 5510d4af..f333c223 100644 --- a/layouts/partials/article-link/card-related.html +++ b/layouts/partials/article-link/card-related.html @@ -31,7 +31,7 @@ {{ end }} -
{{ with $featuredURL }} @@ -42,19 +42,21 @@ {{ end }}
- -
- {{ .Title | emojify }} - {{ if .Params.externalUrl }} - - - - - {{ end }} -
-
+
+ +

+ {{ .Title | emojify }} + {{ if .Params.externalUrl }} + + + + + {{ end }} +

+
+
{{ partial "article-meta/basic.html" . }}
@@ -63,4 +65,4 @@ {{ end }}
-
+ diff --git a/layouts/partials/article-link/card.html b/layouts/partials/article-link/card.html index c0927192..6f9e9ba9 100644 --- a/layouts/partials/article-link/card.html +++ b/layouts/partials/article-link/card.html @@ -35,7 +35,7 @@ {{ end }} -
{{ with $featuredURL }}
@@ -46,19 +46,21 @@ {{ end }}
- -
- {{ .Title | emojify }} - {{ if .Params.externalUrl }} - - - - - {{ end }} -
-
+
+ +

+ {{ .Title | emojify }} + {{ if .Params.externalUrl }} + + + + + {{ end }} +

+
+
{{ partial "article-meta/basic.html" . }}
@@ -67,4 +69,4 @@ {{ end }}
-
+ diff --git a/layouts/partials/article-link/simple.html b/layouts/partials/article-link/simple.html index ce087db9..54b7c3b0 100644 --- a/layouts/partials/article-link/simple.html +++ b/layouts/partials/article-link/simple.html @@ -62,16 +62,16 @@ {{ end }} -
+
{{ with $featuredURL }}
{{ end }}
-
+
-
+

{{ .Title | emojify }} {{ if .Params.externalUrl }} @@ -79,7 +79,7 @@ {{ end }} -

+
{{ if and .Draft .Site.Params.article.showDraftLabel }}
{{ partial "badge.html" (i18n "article.draft" | emojify) }}
@@ -87,7 +87,7 @@ {{ if templates.Exists "partials/extend-article-link.html" }} {{ partial "extend-article-link.html" . }} {{ end }} -
+
{{ partial "article-meta/basic.html" . }}
@@ -96,4 +96,4 @@ {{ end }}
-
+