From 2c71bda97f3e343ffb74f53b81f1e157ce519bfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Fri, 11 Jul 2025 10:37:30 +0100 Subject: [PATCH 01/89] new version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d87c1877..22ff7368 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hugo-blowfish-theme", - "version": "2.88.1", + "version": "2.89.0", "description": "Blowfish theme for Hugo.", "scripts": { "postinstall": "vendor-copy", From f12ae0b4024ea54ec24570bf06ee1e6c8412a51a Mon Sep 17 00:00:00 2001 From: Goudarz Jafari Date: Fri, 11 Jul 2025 14:11:49 +0330 Subject: [PATCH 02/89] feat(i18n): Update Persian localization --- i18n/fa.yaml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/i18n/fa.yaml b/i18n/fa.yaml index 96c13ad4..cb1534c4 100644 --- a/i18n/fa.yaml +++ b/i18n/fa.yaml @@ -19,8 +19,8 @@ article: one: "{{ .Count }} بازدید" other: "{{ .Count }} بازدید" likes: - one: "{{ .Count }} لایک" - other: "{{ .Count }} لایک" + one: "{{ .Count }} نفر پسندید" + other: "{{ .Count }} نفر پسندیدن" part_of_series: "این مقاله بخشی از یک مجموعه مقالات است." part: "بخش" this_article: "همین مقاله" @@ -38,7 +38,7 @@ code: error: 404_title: "صفحه مورد نظر یافت نشد :confused:" - 404_error: "ارور 404" + 404_error: "خطای ۴۰۴" 404_description: "به نظر می‌رسد صفحه‌ای که درخواست کرده‌اید وجود ندارد." footer: @@ -47,7 +47,7 @@ footer: powered_by: "قدرت گرفته از {{ .Hugo }} و {{ .Theme }}" list: - externalurl_title: "لینک به سایت خارجی" + externalurl_title: "پیوند به وبگاهئ خارجی" no_articles: "هیچ مقاله‌ای برای نمایش وجود ندارد." nav: @@ -61,13 +61,15 @@ search: sharing: email: "ارسال ایمیل" - facebook: "اشتراک گذاری در فیسبوک" - line: "اشتراک گذاری در لاین" - linkedin: "اشتراک گذاری در لینکداین" - pinterest: "اشتراک گذاری در پینترست" - reddit: "اشتراک گذاری در ردیت" - twitter: "اشتراک گذاری در توییتر" - bluesky: "اشتراک گذاری در بلواسکای" + facebook: "هم‌رسانی در فیس‌بوک" + line: "هم‌رسانی در لاین" + linkedin: "هم‌رسانی در لینکداین" + pinterest: "هم‌رسانی در پینترست" + reddit: "هم‌رسانی در ردیت" + twitter: "هم‌رسانی در توییتر" + bluesky: "هم‌رسانی در بلواسکای" + whatsapp: "هم‌رسانی در واتس‌اپ" + telegram: "هم‌رسانی در تلگرام" shortcode: recent_articles: "مقاله‌های اخیر" From c545fc334401b495e82ab57ea4ae999f70f52d35 Mon Sep 17 00:00:00 2001 From: Goudarz Jafari Date: Fri, 11 Jul 2025 14:14:00 +0330 Subject: [PATCH 03/89] fix(i18n): fix some issue --- i18n/fa.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i18n/fa.yaml b/i18n/fa.yaml index cb1534c4..43721c1f 100644 --- a/i18n/fa.yaml +++ b/i18n/fa.yaml @@ -47,7 +47,7 @@ footer: powered_by: "قدرت گرفته از {{ .Hugo }} و {{ .Theme }}" list: - externalurl_title: "پیوند به وبگاهئ خارجی" + externalurl_title: "پیوند به وبگاه خارجی" no_articles: "هیچ مقاله‌ای برای نمایش وجود ندارد." nav: @@ -63,7 +63,7 @@ sharing: email: "ارسال ایمیل" facebook: "هم‌رسانی در فیس‌بوک" line: "هم‌رسانی در لاین" - linkedin: "هم‌رسانی در لینکداین" + linkedin: "هم‌رسانی در لینکدین" pinterest: "هم‌رسانی در پینترست" reddit: "هم‌رسانی در ردیت" twitter: "هم‌رسانی در توییتر" From fed64fa58dc1ee65dd0d593736c5539958e06e56 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Fri, 11 Jul 2025 18:49:05 +0800 Subject: [PATCH 04/89] fix: gist corb error --- layouts/shortcodes/gist.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/shortcodes/gist.html b/layouts/shortcodes/gist.html index a1b7ba6d..801e7b69 100644 --- a/layouts/shortcodes/gist.html +++ b/layouts/shortcodes/gist.html @@ -1,3 +1,3 @@ - + From 5e8561d83b1ffddf8401ee1c38997156303a5c0f Mon Sep 17 00:00:00 2001 From: Served Smart <195884188+servedsmart@users.noreply.github.com> Date: Wed, 18 Jun 2025 22:40:05 +0200 Subject: [PATCH 05/89] :children_crossing: UX: Use anchor tags in article-meta/basic.html - This removes an inline event handler - This also adds an aria-label Using javascript instead of just using is bad practice regarding accessibility and automated processing of web pages. Even the browser doesn't show a hint if hovering badges when using the old implementation. This in my opinion is a good way to replace inline event handlers in that code. --- .../partials/article-link/card-related.html | 124 ++++++++---------- layouts/partials/article-link/card.html | 121 ++++++++--------- layouts/partials/article-link/simple.html | 70 +++++----- layouts/partials/article-meta/basic.html | 14 +- 4 files changed, 151 insertions(+), 178 deletions(-) diff --git a/layouts/partials/article-link/card-related.html b/layouts/partials/article-link/card-related.html index 288a85de..c7c49b01 100644 --- a/layouts/partials/article-link/card-related.html +++ b/layouts/partials/article-link/card-related.html @@ -1,78 +1,70 @@ {{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }} -{{ with .Params.externalUrl }} - - {{ else }} - - {{ end }} -
- - {{- with $.Params.images -}} - {{- range first 6 . }} - {{ end -}} - {{- else -}} - {{- $images := $.Resources.ByType "image" -}} - {{- $featured := $images.GetMatch "*feature*" -}} - {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} - {{ if and .Params.featureimage (not $featured) }} +
+ + {{- with $.Params.images -}} + {{- range first 6 . }} + + {{ end -}} + {{- else -}} + {{- $images := $.Resources.ByType "image" -}} + {{- $featured := $images.GetMatch "*feature*" -}} + {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} + {{ if and .Params.featureimage (not $featured) }} {{- $url:= .Params.featureimage -}} {{ $featured = resources.GetRemote $url }} - {{ end }} - {{- if not $featured }}{{ with .Site.Params.defaultFeaturedImage }}{{ $featured = resources.Get . }}{{ end }}{{ end -}} - {{- with $featured -}} - {{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg")}} + {{ end }} + {{- if not $featured }} + {{ with .Site.Params.defaultFeaturedImage }}{{ $featured = resources.Get . }}{{ end }} + {{ end -}} + {{- with $featured -}} + {{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg") }} {{ with . }} - + {{ end }} {{ else }} {{ with .Resize "600x" }} - + {{ end }} {{ end }} - {{- else -}} + {{- else -}} {{- with $.Site.Params.images }} - {{ end -}} - {{- end -}} - {{- end -}} - - - {{ if and .Draft .Site.Params.article.showDraftLabel }} - - {{ partial "badge.html" (i18n "article.draft" | emojify) }} - - {{ end }} - - -
- {{ with .Params.externalUrl }} -
-
- {{ $.Title | emojify }} - - - - -
-
- {{ else }} -
- {{ .Title | emojify }} -
- {{ end }} - - -
- {{ partial "article-meta/basic.html" . }} + + {{ end -}} + {{- end -}} + {{- end -}} + {{ if and .Draft .Site.Params.article.showDraftLabel }} + + {{ partial "badge.html" (i18n "article.draft" | emojify) }} + + {{ end }} +
+ {{ with .Params.externalUrl }} +
+ {{ $.Title | emojify }} + + + +
- - {{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }} -
- {{ .Summary | plainify }} -
- {{ end }} -
-
+ {{ else }} +
+ {{ .Title | emojify }} +
+ {{ end }} +
{{ partial "article-meta/basic.html" . }}
+ {{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }} +
{{ .Summary | plainify }}
+ {{ end }}
- +
+
diff --git a/layouts/partials/article-link/card.html b/layouts/partials/article-link/card.html index 7a565d3c..91bacda6 100644 --- a/layouts/partials/article-link/card.html +++ b/layouts/partials/article-link/card.html @@ -1,78 +1,67 @@ {{ $disableImageOptimization := .Page.Site.Params.disableImageOptimization | default false }} -{{ with .Params.externalUrl }} - - {{ else }} - - {{ end }} -
- - {{- with $.Params.images -}} - {{- range first 6 . }} - {{ end -}} - {{- else -}} - {{- $images := $.Resources.ByType "image" -}} - {{- $featured := $images.GetMatch "*feature*" -}} - {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} - {{ if and .Params.featureimage (not $featured) }} +
+ + {{- with $.Params.images -}} + {{- range first 6 . }} + + {{ end -}} + {{- else -}} + {{- $images := $.Resources.ByType "image" -}} + {{- $featured := $images.GetMatch "*feature*" -}} + {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} + {{ if and .Params.featureimage (not $featured) }} {{- $url:= .Params.featureimage -}} {{ $featured = resources.GetRemote $url }} - {{ end }} - {{- if not $featured }}{{ with .Site.Params.defaultFeaturedImage }}{{ $featured = resources.Get . }}{{ end }}{{ end -}} - {{ if .Params.hideFeatureImage }}{{ $featured = false }}{{ end }} - {{- with $featured -}} - {{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg")}} + {{ end }} + {{- if not $featured }} + {{ with .Site.Params.defaultFeaturedImage }}{{ $featured = resources.Get . }}{{ end }} + {{ end -}} + {{ if .Params.hideFeatureImage }}{{ $featured = false }}{{ end }} + {{- with $featured -}} + {{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg") }} {{ with . }} -
+
{{ end }} {{ else }} {{ with .Resize "600x" }} -
+
{{ end }} {{ end }} - {{- else -}} + {{- else -}} {{- with $.Site.Params.images }} - {{ end -}} - {{- end -}} - {{- end -}} - - {{ if and .Draft .Site.Params.article.showDraftLabel }} - - {{ partial "badge.html" (i18n "article.draft" | emojify) }} - - {{ end }} - - -
- {{ with .Params.externalUrl }} -
-
- {{ $.Title | emojify }} - - - - -
-
- {{ else }} -
- {{ .Title | emojify }} -
- {{ end }} - - -
- {{ partial "article-meta/basic.html" . }} + + {{ end -}} + {{- end -}} + {{- end -}} + {{ if and .Draft .Site.Params.article.showDraftLabel }} + + {{ partial "badge.html" (i18n "article.draft" | emojify) }} + + {{ end }} +
+ {{ with .Params.externalUrl }} +
+ {{ $.Title | emojify }} + + + +
- - {{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }} -
- {{ .Summary | plainify }} -
- {{ end }} -
-
+ {{ else }} +
+ {{ .Title | emojify }} +
+ {{ end }} +
{{ partial "article-meta/basic.html" . }}
+ {{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }} +
{{ .Summary | plainify }}
+ {{ end }}
- +
+
diff --git a/layouts/partials/article-link/simple.html b/layouts/partials/article-link/simple.html index bf5461fc..43b49835 100644 --- a/layouts/partials/article-link/simple.html +++ b/layouts/partials/article-link/simple.html @@ -1,6 +1,6 @@ {{ $constrainItemsWidth := .Page.Site.Params.list.constrainItemsWidth | default false }} -{{ $articleClasses := "flex flex-wrap md:flex-nowrap article" }} +{{ $articleClasses := "flex flex-wrap md:flex-nowrap article relative" }} {{ if .Site.Params.list.showCards }} {{ $articleClasses = delimit (slice $articleClasses "border border-neutral-200 dark:border-neutral-700 border-2 rounded-md overflow-hidden") " " }} {{ else }} @@ -28,73 +28,73 @@ {{ end }} - +
+ {{- with $.Params.images -}} {{- range first 6 . }} - {{ end -}} - {{- else -}} + + {{ end -}} + {{- else -}} {{- $images := $.Resources.ByType "image" -}} {{- $featured := $images.GetMatch "*feature*" -}} {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} {{ if and .Params.featureimage (not $featured) }} - {{- $url:= .Params.featureimage -}} - {{ $featured = resources.GetRemote $url }} + {{- $url:= .Params.featureimage -}} + {{ $featured = resources.GetRemote $url }} {{ end }} - {{- if not $featured }}{{ with .Site.Params.defaultFeaturedImage }}{{ $featured = resources.Get . }}{{ end }}{{ end -}} + {{- if not $featured }} + {{ with .Site.Params.defaultFeaturedImage }}{{ $featured = resources.Get . }}{{ end }} + {{ end -}} {{ if .Params.hideFeatureImage }}{{ $featured = false }}{{ end }} {{- with $featured -}} - {{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg")}} + {{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg") }} {{ with . }} -
+
{{ end }} {{ else }} - {{ with .Resize "600x" }} -
+ {{ with .Resize "600x" }} +
{{ end }} {{ end }} {{- else -}} - {{- with $.Site.Params.images }} - {{ end -}} - {{- end -}} + {{- with $.Site.Params.images }} + + {{ end -}} {{- end -}} + {{- end -}}
{{ with .Params.externalUrl }} -
-
- {{ $.Title | emojify }} - - - - -
+
+ {{ $.Title | emojify }} + + + +
{{ else }}
+ class="decoration-primary-500 dark:text-neutral text-xl font-bold text-neutral-800 hover:underline hover:underline-offset-2"> {{ .Title | emojify }}
{{ end }} {{ if and .Draft .Site.Params.article.showDraftLabel }} -
- {{ partial "badge.html" (i18n "article.draft" | emojify) }} -
+
{{ partial "badge.html" (i18n "article.draft" | emojify) }}
{{ end }} {{ if templates.Exists "partials/extend-article-link.html" }} {{ partial "extend-article-link.html" . }} {{ end }}
-
- {{ partial "article-meta/basic.html" . }} -
+
{{ partial "article-meta/basic.html" . }}
{{ if .Params.showSummary | default (.Site.Params.list.showSummary | default false) }} -
- {{ .Summary | plainify }} -
+
{{ .Summary | plainify }}
{{ end }}
- +
+
diff --git a/layouts/partials/article-meta/basic.html b/layouts/partials/article-meta/basic.html index ed6fb5f3..5ba26058 100644 --- a/layouts/partials/article-meta/basic.html +++ b/layouts/partials/article-meta/basic.html @@ -82,9 +82,7 @@ {{ if (gt (len ($context.GetTerms $taxonomy)) 0) }} {{ range $i, $a := $context.GetTerms $taxonomy }} {{ if not (eq $i 0) }}, {{ end }} -
- {{ $a.LinkTitle }} -
+ {{ $a.LinkTitle }} {{ end }} {{ end }} {{ end }} @@ -99,11 +97,7 @@ {{ if and (not (eq $taxonomy "authors")) (not (eq $taxonomy "series")) }} {{ if (gt (len ($context.GetTerms $taxonomy)) 0) }} {{ range $context.GetTerms $taxonomy }} - - {{ partial "badge.html" .LinkTitle }} - + {{ partial "badge.html" .LinkTitle }} {{ end }} {{ end }} {{ end }} @@ -115,9 +109,7 @@ {{ if .Params.showCategoryOnly | default (.Site.Params.article.showCategoryOnly | default false) }}
{{ range (.GetTerms "categories") }} - - {{ partial "badge.html" .LinkTitle }} - + {{ partial "badge.html" .LinkTitle }} {{ end }}
{{ end }} From b73c64f4f53bbf74ad1b4f1d332b772445bdeba6 Mon Sep 17 00:00:00 2001 From: Served Smart <195884188+servedsmart@users.noreply.github.com> Date: Thu, 10 Jul 2025 15:51:37 +0200 Subject: [PATCH 06/89] :art: Reformat article-meta/basic.html --- layouts/partials/article-meta/basic.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/layouts/partials/article-meta/basic.html b/layouts/partials/article-meta/basic.html index 5ba26058..15ef16d9 100644 --- a/layouts/partials/article-meta/basic.html +++ b/layouts/partials/article-meta/basic.html @@ -97,7 +97,9 @@ {{ if and (not (eq $taxonomy "authors")) (not (eq $taxonomy "series")) }} {{ if (gt (len ($context.GetTerms $taxonomy)) 0) }} {{ range $context.GetTerms $taxonomy }} - {{ partial "badge.html" .LinkTitle }} + {{ partial "badge.html" .LinkTitle }} {{ end }} {{ end }} {{ end }} @@ -109,7 +111,9 @@ {{ if .Params.showCategoryOnly | default (.Site.Params.article.showCategoryOnly | default false) }}
{{ range (.GetTerms "categories") }} - {{ partial "badge.html" .LinkTitle }} + {{ partial "badge.html" .LinkTitle }} {{ end }}
{{ end }} From 7fb7ab2eacc47a338aee7f8672efd0073fc1995a Mon Sep 17 00:00:00 2001 From: Goudarz Jafari Date: Fri, 11 Jul 2025 19:20:39 +0330 Subject: [PATCH 07/89] fix(i18n): fix some issue --- i18n/fa.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18n/fa.yaml b/i18n/fa.yaml index 43721c1f..6eecd8ab 100644 --- a/i18n/fa.yaml +++ b/i18n/fa.yaml @@ -60,7 +60,7 @@ search: input_placeholder: "جستجو" sharing: - email: "ارسال ایمیل" + email: "ارسال از طریق ایمیل" facebook: "هم‌رسانی در فیس‌بوک" line: "هم‌رسانی در لاین" linkedin: "هم‌رسانی در لینکدین" From e9141435c0fed276c9f5470605815595f64fcebb Mon Sep 17 00:00:00 2001 From: t1mssc <160235066+t1mssc@users.noreply.github.com> Date: Sat, 12 Jul 2025 12:04:11 +0800 Subject: [PATCH 08/89] Update users.json --- exampleSite/content/users/users.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/exampleSite/content/users/users.json b/exampleSite/content/users/users.json index e4adf685..204b538a 100644 --- a/exampleSite/content/users/users.json +++ b/exampleSite/content/users/users.json @@ -889,5 +889,13 @@ "Personal site", "Portfolio" ] + }, + { + "title": "cayte.xyz", + "url": "https://cayte.xyz", + "source": "n/a", + "tags": [ + "Personal site", + ] } ] From c210a1258923b7fd78712f9fc66088136c376dec Mon Sep 17 00:00:00 2001 From: nunocoracao <3803196+nunocoracao@users.noreply.github.com> Date: Sat, 12 Jul 2025 06:06:34 +0000 Subject: [PATCH 09/89] Update Hugo supported version --- config.toml | 2 +- release-versions/hugo-latest.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.toml b/config.toml index 0a97846b..7c50e6f5 100644 --- a/config.toml +++ b/config.toml @@ -2,4 +2,4 @@ [module.hugoVersion] extended = true min = "0.137.0" -max = "0.148.0" \ No newline at end of file +max = "0.148.1" \ No newline at end of file diff --git a/release-versions/hugo-latest.txt b/release-versions/hugo-latest.txt index cdc2beac..2e2f46cf 100644 --- a/release-versions/hugo-latest.txt +++ b/release-versions/hugo-latest.txt @@ -1 +1 @@ -v0.148.0 +v0.148.1 From 6bed0f26242fa6182e7789a1d631907673685d20 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Tue, 1 Jul 2025 00:21:58 +0800 Subject: [PATCH 10/89] docs: document showSummary option in article shortcode --- exampleSite/content/docs/shortcodes/index.it.md | 1 + exampleSite/content/docs/shortcodes/index.ja.md | 1 + exampleSite/content/docs/shortcodes/index.md | 2 ++ exampleSite/content/docs/shortcodes/index.zh-cn.md | 2 ++ 4 files changed, 6 insertions(+) diff --git a/exampleSite/content/docs/shortcodes/index.it.md b/exampleSite/content/docs/shortcodes/index.it.md index a5bfdd81..42aaaeb2 100644 --- a/exampleSite/content/docs/shortcodes/index.it.md +++ b/exampleSite/content/docs/shortcodes/index.it.md @@ -72,6 +72,7 @@ This is an error! | Parameter | Description | | --------- | -------------------------------------------------------- | | `link` | **Required.** the `.RelPermalink` to the target article. | +| `showSummary` | **Optional.** A boolean value indicating whether to show the article summary. If not set, the site's default configuration will be used. | **Example:** diff --git a/exampleSite/content/docs/shortcodes/index.ja.md b/exampleSite/content/docs/shortcodes/index.ja.md index ff728e09..6cb83f3e 100644 --- a/exampleSite/content/docs/shortcodes/index.ja.md +++ b/exampleSite/content/docs/shortcodes/index.ja.md @@ -72,6 +72,7 @@ Twitter で私を[フォロー](https://twitter.com/nunocoracao)するのを忘 | パラメータ | 説明 | | --------- | -------------------------------------------------------- | | `link` | **必須** ターゲット記事への `.RelPermalink`。 | +| `showSummary` | **任意。** 記事の要約を表示するかどうかを示すブール値。設定されていない場合、サイトのデフォルト設定が使用されます。 | **例:** diff --git a/exampleSite/content/docs/shortcodes/index.md b/exampleSite/content/docs/shortcodes/index.md index 43f45ab0..052a2e81 100644 --- a/exampleSite/content/docs/shortcodes/index.md +++ b/exampleSite/content/docs/shortcodes/index.md @@ -72,6 +72,8 @@ This is an error! | Parameter | Description | | --------- | -------------------------------------------------------- | | `link` | **Required.** the `.RelPermalink` to the target article. | +| `showSummary` | **Optional.** A boolean value indicating whether to show the article summary. If not set, the site's default configuration will be used. | + **Example:** diff --git a/exampleSite/content/docs/shortcodes/index.zh-cn.md b/exampleSite/content/docs/shortcodes/index.zh-cn.md index 8d9886b2..acd32b4a 100644 --- a/exampleSite/content/docs/shortcodes/index.zh-cn.md +++ b/exampleSite/content/docs/shortcodes/index.zh-cn.md @@ -72,6 +72,8 @@ This is an error! | 参数 | 功能 | | ------ | ------------------------------------- | | `link` | **必填** 要嵌入文章的 `.RelPermalink` | +| `showSummary` | **可选。** 一个布尔值,指示是否显示文章摘要。如果未设置,将使用站点的默认配置。 | + **例如:** From b4a7741b39e12a8ad6d2bb90255ea0aeb130ae1e Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Tue, 1 Jul 2025 01:24:34 +0800 Subject: [PATCH 11/89] feat: add support for showSummary in article shortcode --- assets/css/compiled/main.css | 12 ++ layouts/partials/article-link/_shortcode.html | 113 ++++++++++++++++++ layouts/shortcodes/article.html | 4 +- 3 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 layouts/partials/article-link/_shortcode.html diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 7ca3ba0b..8f462959 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -1689,6 +1689,9 @@ body.zen-mode-enable { .p-1\.5 { padding: calc(var(--spacing) * 1.5); } + .p-2\.5 { + padding: calc(var(--spacing) * 2.5); + } .p-4 { padding: calc(var(--spacing) * 4); } @@ -1758,6 +1761,9 @@ body.zen-mode-enable { .py-\[1px\] { padding-block: 1px; } + .pt-1 { + padding-top: calc(var(--spacing) * 1); + } .pt-2 { padding-top: calc(var(--spacing) * 2); } @@ -1785,6 +1791,9 @@ body.zen-mode-enable { .pr-\[24px\] { padding-right: 24px; } + .pb-0 { + padding-bottom: calc(var(--spacing) * 0); + } .pb-2 { padding-bottom: calc(var(--spacing) * 2); } @@ -1809,6 +1818,9 @@ body.zen-mode-enable { .pl-2 { padding-left: calc(var(--spacing) * 2); } + .pl-4 { + padding-left: calc(var(--spacing) * 4); + } .pl-\[24px\] { padding-left: 24px; } diff --git a/layouts/partials/article-link/_shortcode.html b/layouts/partials/article-link/_shortcode.html new file mode 100644 index 00000000..79756146 --- /dev/null +++ b/layouts/partials/article-link/_shortcode.html @@ -0,0 +1,113 @@ +{{ $target := .target }} +{{ $shortcodeShowSummary := .showSummary }} +{{ $constrainItemsWidth := site.Params.list.constrainItemsWidth | default false }} +{{ $disableImageOptimization := site.Params.disableImageOptimization | default false }} + +{{ $articleClasses := "flex flex-wrap md:flex-nowrap article" }} +{{ if site.Params.list.showCards }} + {{ $articleClasses = delimit (slice $articleClasses "border border-neutral-200 dark:border-neutral-700 border-2 rounded-md overflow-hidden") " " }} +{{ else }} + {{ $articleClasses = delimit (slice $articleClasses "") " " }} +{{ end }} + +{{ $articleImageClasses := "w-full md:w-auto h-full thumbnail nozoom" }} +{{ if site.Params.list.showCards }} + {{ $articleImageClasses = delimit (slice $articleImageClasses "") " " }} +{{ else }} + {{ $articleImageClasses = delimit (slice $articleImageClasses "thumbnailshadow md:mr-7") " " }} +{{ end }} + +{{ $articleInnerClasses := "" }} +{{ if site.Params.list.showCards }} + {{ $articleInnerClasses = delimit (slice $articleInnerClasses "p-2.5 pl-4 pb-0") " " }} +{{ else }} + {{ $articleInnerClasses = delimit (slice $articleInnerClasses "mt-3 md:mt-0") " " }} +{{ end }} + +{{ if $constrainItemsWidth }} + {{ $articleClasses = delimit (slice $articleClasses "max-w-prose") " " }} +{{ end }} + + + + {{- with $target.Params.images -}} + {{- range first 6 . }} + + {{ end -}} + {{- else -}} + {{- $images := $target.Resources.ByType "image" -}} + {{- $featured := $images.GetMatch "*feature*" -}} + {{- if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} + {{ if and $target.Params.featureimage (not $featured) }} + {{- $url:= $target.Params.featureimage -}} + {{ $featured = resources.GetRemote $url }} + {{ end }} + {{- if not $featured }} + {{ with site.Params.defaultFeaturedImage }}{{ $featured = resources.Get . }}{{ end }} + {{ end -}} + {{ if $target.Params.hideFeatureImage }}{{ $featured = false }}{{ end }} + {{- with $featured -}} + {{ if or $disableImageOptimization (strings.HasSuffix $featured ".svg") }} + {{ with . }} +
+ {{ end }} + {{ else }} + {{ with .Resize "600x" }} +
+ {{ end }} + {{ end }} + {{- else -}} + {{- with site.Params.images }} + + {{ end -}} + {{- end -}} + {{- end -}} + + +
+
+ {{ with $target.Params.externalUrl }} +
+
+ {{ $target.Title | emojify }} + + + + +
+
+ {{ else }} +
+ {{ $target.Title | emojify }} +
+ {{ end }} + {{ if and $target.Draft site.Params.article.showDraftLabel }} +
+ {{ partial "badge.html" (i18n "article.draft" | emojify) }} +
+ {{ end }} + {{ if templates.Exists "partials/extend-article-link.html" }} + {{ partial "extend-article-link.html" $target }} + {{ end }} +
+
+ {{ partial "article-meta/basic.html" $target }} +
+ {{ $showSummary := false }} + {{ if ne $shortcodeShowSummary nil }} + {{ $showSummary = $shortcodeShowSummary }} + {{ else }} + {{ $showSummary = $target.Params.showSummary | default (site.Params.list.showSummary | default false) }} + {{ end }} + {{ if $showSummary }} +
+
+ {{ $target.Summary | plainify }} +
+
+ {{ end }} +
+
diff --git a/layouts/shortcodes/article.html b/layouts/shortcodes/article.html index b85a3ca2..f71181b6 100644 --- a/layouts/shortcodes/article.html +++ b/layouts/shortcodes/article.html @@ -1,10 +1,12 @@ {{ $link := .Get "link" }} +{{ $showSummary := .Get "showSummary" }} {{ $target := .Page }} {{ if ne $link .Page.RelPermalink }} {{ $target = index (first 1 (where .Site.AllPages "RelPermalink" $link)) 0 }} {{ end }} {{ if $target }}
- {{ partial "article-link/simple.html" $target }} + {{ $context := dict "target" $target "showSummary" $showSummary }} + {{ partial "article-link/_shortcode.html" $context }}
{{ end }} From ad1ba9905dd1d65059b2012f32a688ecb8ff4493 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Tue, 1 Jul 2025 00:41:29 +0800 Subject: [PATCH 12/89] docs: document compactSummary option in article shortcode --- exampleSite/content/docs/shortcodes/index.it.md | 5 +++-- exampleSite/content/docs/shortcodes/index.ja.md | 7 ++++--- exampleSite/content/docs/shortcodes/index.md | 6 +++--- exampleSite/content/docs/shortcodes/index.zh-cn.md | 8 ++++---- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/exampleSite/content/docs/shortcodes/index.it.md b/exampleSite/content/docs/shortcodes/index.it.md index 42aaaeb2..82cea40a 100644 --- a/exampleSite/content/docs/shortcodes/index.it.md +++ b/exampleSite/content/docs/shortcodes/index.it.md @@ -73,15 +73,16 @@ This is an error! | --------- | -------------------------------------------------------- | | `link` | **Required.** the `.RelPermalink` to the target article. | | `showSummary` | **Optional.** A boolean value indicating whether to show the article summary. If not set, the site's default configuration will be used. | +| `compactSummary` | **Optional.** A boolean value indicating whether to display the summary in compact mode. Default to false. | **Example:** ```md -{{}} +{{}} ``` -{{< article link="/docs/welcome/" >}} +{{< article link="/it/docs/welcome/" showSummary=true compactSummary=true >}}


diff --git a/exampleSite/content/docs/shortcodes/index.ja.md b/exampleSite/content/docs/shortcodes/index.ja.md index 6cb83f3e..0bf5722e 100644 --- a/exampleSite/content/docs/shortcodes/index.ja.md +++ b/exampleSite/content/docs/shortcodes/index.ja.md @@ -72,16 +72,17 @@ Twitter で私を[フォロー](https://twitter.com/nunocoracao)するのを忘 | パラメータ | 説明 | | --------- | -------------------------------------------------------- | | `link` | **必須** ターゲット記事への `.RelPermalink`。 | -| `showSummary` | **任意。** 記事の要約を表示するかどうかを示すブール値。設定されていない場合、サイトのデフォルト設定が使用されます。 | +| `showSummary` | **オプション** のブール値で、記事の要約を表示するかどうかを示します。設定されていない場合は、サイトのデフォルト設定が使用されます。 | +| `compactSummary` | **オプション** のブール値で、要約をコンパクトモードで表示するかどうかを示します。デフォルトは false です。 | **例:** ```md -{{}} +{{}} ``` -{{< article link="/docs/welcome/" >}} +{{< article link="/ja/docs/welcome/" showSummary=true compactSummary=true >}}


diff --git a/exampleSite/content/docs/shortcodes/index.md b/exampleSite/content/docs/shortcodes/index.md index 052a2e81..4ec2be3a 100644 --- a/exampleSite/content/docs/shortcodes/index.md +++ b/exampleSite/content/docs/shortcodes/index.md @@ -73,16 +73,16 @@ This is an error! | --------- | -------------------------------------------------------- | | `link` | **Required.** the `.RelPermalink` to the target article. | | `showSummary` | **Optional.** A boolean value indicating whether to show the article summary. If not set, the site's default configuration will be used. | - +| `compactSummary` | **Optional.** A boolean value indicating whether to display the summary in compact mode. Default to false. | **Example:** ```md -{{}} +{{}} ``` -{{< article link="/docs/welcome/" >}} +{{< article link="/docs/welcome/" showSummary=true compactSummary=true >}}


diff --git a/exampleSite/content/docs/shortcodes/index.zh-cn.md b/exampleSite/content/docs/shortcodes/index.zh-cn.md index acd32b4a..91ec4cf5 100644 --- a/exampleSite/content/docs/shortcodes/index.zh-cn.md +++ b/exampleSite/content/docs/shortcodes/index.zh-cn.md @@ -72,17 +72,17 @@ This is an error! | 参数 | 功能 | | ------ | ------------------------------------- | | `link` | **必填** 要嵌入文章的 `.RelPermalink` | -| `showSummary` | **可选。** 一个布尔值,指示是否显示文章摘要。如果未设置,将使用站点的默认配置。 | - +| `showSummary` | **可选** 布尔值,指示是否显示文章摘要。如果未设置,将使用站点的默认配置。 | +| `compactSummary` | **可选** 布尔值,指示是否以紧凑模式显示摘要。默认为 false。 | **例如:** ```md -{{}} +{{}} ``` -{{< article link="/zh-cn/docs/welcome/" >}} +{{< article link="/zh-cn/docs/welcome/" showSummary=true compactSummary=true >}}


From 965c241f8c080950354d48886feb9cf58dfb610d Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Tue, 1 Jul 2025 00:42:56 +0800 Subject: [PATCH 13/89] feat: add support for compactSummary option in article shortcode --- assets/css/compiled/main.css | 6 ++++++ layouts/partials/article-link/_shortcode.html | 9 ++++++++- layouts/shortcodes/article.html | 3 ++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 8f462959..402e86f1 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -1028,6 +1028,12 @@ body.zen-mode-enable { height: 8px; } } + .line-clamp-3 { + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + } .\!block { display: block !important; } diff --git a/layouts/partials/article-link/_shortcode.html b/layouts/partials/article-link/_shortcode.html index 79756146..db73ec3c 100644 --- a/layouts/partials/article-link/_shortcode.html +++ b/layouts/partials/article-link/_shortcode.html @@ -1,5 +1,6 @@ {{ $target := .target }} {{ $shortcodeShowSummary := .showSummary }} +{{ $shortcodeCompactSummary := .compactSummary }} {{ $constrainItemsWidth := site.Params.list.constrainItemsWidth | default false }} {{ $disableImageOptimization := site.Params.disableImageOptimization | default false }} @@ -103,8 +104,14 @@ {{ $showSummary = $target.Params.showSummary | default (site.Params.list.showSummary | default false) }} {{ end }} {{ if $showSummary }} + {{ $compactSummary := false }} + {{ if ne $shortcodeCompactSummary nil }} + {{ $compactSummary = $shortcodeCompactSummary }} + {{ else }} + {{ $compactSummary = $target.Params.compactSummary | default (site.Params.list.compactSummary | default false) }} + {{ end }}
-
+
{{ $target.Summary | plainify }}
diff --git a/layouts/shortcodes/article.html b/layouts/shortcodes/article.html index f71181b6..299319ff 100644 --- a/layouts/shortcodes/article.html +++ b/layouts/shortcodes/article.html @@ -1,12 +1,13 @@ {{ $link := .Get "link" }} {{ $showSummary := .Get "showSummary" }} +{{ $compactSummary := .Get "compactSummary" | default false }} {{ $target := .Page }} {{ if ne $link .Page.RelPermalink }} {{ $target = index (first 1 (where .Site.AllPages "RelPermalink" $link)) 0 }} {{ end }} {{ if $target }}
- {{ $context := dict "target" $target "showSummary" $showSummary }} + {{ $context := dict "target" $target "showSummary" $showSummary "compactSummary" $compactSummary }} {{ partial "article-link/_shortcode.html" $context }}
{{ end }} From d8bdf7e3164abb117c03a0c79883b2d391de0048 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Sun, 13 Jul 2025 19:56:39 +0800 Subject: [PATCH 14/89] chore: add warn message for GetRemote usage in shortcodes --- layouts/shortcodes/codeberg.html | 2 ++ layouts/shortcodes/codeimporter.html | 4 ++-- layouts/shortcodes/forgejo.html | 2 ++ layouts/shortcodes/gitea.html | 2 ++ layouts/shortcodes/github.html | 2 ++ layouts/shortcodes/mdimporter.html | 2 +- 6 files changed, 11 insertions(+), 3 deletions(-) diff --git a/layouts/shortcodes/codeberg.html b/layouts/shortcodes/codeberg.html index 067175f9..ccaeca18 100644 --- a/layouts/shortcodes/codeberg.html +++ b/layouts/shortcodes/codeberg.html @@ -56,4 +56,6 @@ data-repo-id="{{ $id }}">
+{{- else -}} + {{ warnf "codeberg shortcode: unable to fetch %q: %s" $codebergURL .Position }} {{- end -}} diff --git a/layouts/shortcodes/codeimporter.html b/layouts/shortcodes/codeimporter.html index e4467ddf..6ecdc003 100644 --- a/layouts/shortcodes/codeimporter.html +++ b/layouts/shortcodes/codeimporter.html @@ -15,7 +15,7 @@ {{ end }} {{ if gt $startLine $endLine }} - {{ errorf "Code Importer Shortcode - startLine is greater than endLine" . }} + {{ errorf "codeimporter shortcode: startLine is greater than endLine" . }} {{ end }} {{ $selectedLines := first $endLine $lines }} @@ -23,5 +23,5 @@ {{ $codeBlock := printf "```%s\n%s\n```" $type (delimit $selectedLines "\n") }} {{ $codeBlock | markdownify }} {{ else }} - {{ errorf "Code Importer Shortcode - Unable to get remote resource" . }} + {{ warnf "codeimporter shortcode: unable to fetch %q: %s" $url .Position }} {{ end }} diff --git a/layouts/shortcodes/forgejo.html b/layouts/shortcodes/forgejo.html index 666f5f0a..775a3a59 100644 --- a/layouts/shortcodes/forgejo.html +++ b/layouts/shortcodes/forgejo.html @@ -56,4 +56,6 @@ data-repo-id="{{ $id }}">
+{{- else -}} + {{ warnf "forgejo shortcode: unable to fetch %q: %s" $forgejoURL .Position }} {{- end -}} diff --git a/layouts/shortcodes/gitea.html b/layouts/shortcodes/gitea.html index 511ee4ae..fcf0f8fb 100644 --- a/layouts/shortcodes/gitea.html +++ b/layouts/shortcodes/gitea.html @@ -56,4 +56,6 @@ data-repo-id="{{ $id }}">
+{{- else -}} + {{ warnf "gitea shortcode: unable to fetch %q: %s" $giteaURL .Position }} {{- end -}} diff --git a/layouts/shortcodes/github.html b/layouts/shortcodes/github.html index d333972b..8cd33c01 100644 --- a/layouts/shortcodes/github.html +++ b/layouts/shortcodes/github.html @@ -71,5 +71,7 @@ data-repo-url="{{ $githubURL }}" data-repo-id="{{ $id }}"> + {{- else -}} + {{ warnf "github shortcode: unable to fetch %q: %s" $githubURL .Position }} {{- end -}}
diff --git a/layouts/shortcodes/mdimporter.html b/layouts/shortcodes/mdimporter.html index db50adba..2b7bab9c 100644 --- a/layouts/shortcodes/mdimporter.html +++ b/layouts/shortcodes/mdimporter.html @@ -2,5 +2,5 @@ {{ with resources.GetRemote (urls.Parse $url) }} {{ .Content | markdownify }} {{ else }} - {{ errorf "Mardown Importer Shortcode - Unable to get remote resource" . }} + {{ warnf "mdimporter shortcode: unable to fetch %q: %s" $url .Position }} {{ end }} From 237c90afa93b791f66d044ab04210f9357d3806c Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Sun, 13 Jul 2025 20:08:32 +0800 Subject: [PATCH 15/89] chore(github.html): move div into with syntax --- layouts/shortcodes/github.html | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/layouts/shortcodes/github.html b/layouts/shortcodes/github.html index 8cd33c01..05be3d4e 100644 --- a/layouts/shortcodes/github.html +++ b/layouts/shortcodes/github.html @@ -4,9 +4,8 @@ {{- $githubThumbnailURL := print "https://opengraph.githubassets.com/0/" (.Get "repo") -}} {{- $showThumbnail := .Get "showThumbnail" | default true -}} - -
- {{- with $githubData -}} +{{- with $githubData -}} +
@@ -71,7 +70,7 @@ data-repo-url="{{ $githubURL }}" data-repo-id="{{ $id }}"> - {{- else -}} - {{ warnf "github shortcode: unable to fetch %q: %s" $githubURL .Position }} - {{- end -}} -
+
+{{- else -}} + {{ warnf "github shortcode: unable to fetch %q: %s" $githubURL .Position }} +{{- end -}} From 367be5c6d4851c02fc8092bb75f4cbee960319df Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Sun, 13 Jul 2025 21:31:59 +0800 Subject: [PATCH 16/89] fix: use @variant for tailwind 4.0 --- assets/css/compiled/main.css | 24 ++++++++++++------------ assets/css/main.css | 24 ++++++++++++------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 7ca3ba0b..29c869b1 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -3746,7 +3746,7 @@ pre { [id^="fn"], [id^="fnref"] { scroll-margin-top: 145px; } -@screen sm { +@media (width >= 640px) { .thumbnail { min-width: 100%; height: 180px; @@ -3755,7 +3755,7 @@ pre { flex-wrap: wrap; } } -@screen md { +@media (width >= 853px) { .thumbnail { min-width: 300px; min-height: 180px; @@ -3873,7 +3873,7 @@ pre { width: calc(100% - 5px); margin: 0px !important; } -@screen sm { +@media (width >= 640px) { .sm\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; @@ -3959,7 +3959,7 @@ pre { margin: 0px !important; } } -@screen md { +@media (width >= 853px) { .md\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; @@ -4045,7 +4045,7 @@ pre { margin: 0px !important; } } -@screen lg { +@media (width >= 1024px) { .lg\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; @@ -4131,7 +4131,7 @@ pre { margin: 0px !important; } } -@screen xl { +@media (width >= 1280px) { .xl\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; @@ -4217,7 +4217,7 @@ pre { margin: 0px !important; } } -@screen 2xl { +@media (width >= 1536px) { .2xl\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; @@ -4312,7 +4312,7 @@ pre { .ratio-32-9 { padding-top: 28.125%; } -@screen sm { +@media (width >= 640px) { .sm\:ratio-16-9 { padding-top: 56.25%; } @@ -4323,7 +4323,7 @@ pre { padding-top: 28.125%; } } -@screen md { +@media (width >= 853px) { .md\:ratio-16-9 { padding-top: 56.25%; } @@ -4334,7 +4334,7 @@ pre { padding-top: 28.125%; } } -@screen lg { +@media (width >= 1024px) { .lg\:ratio-16-9 { padding-top: 56.25%; } @@ -4345,7 +4345,7 @@ pre { padding-top: 28.125%; } } -@screen xl { +@media (width >= 1280px) { .xl\:ratio-16-9 { padding-top: 56.25%; } @@ -4356,7 +4356,7 @@ pre { padding-top: 28.125%; } } -@screen 2xl { +@media (width >= 1536px) { .2xl\:ratio-16-9 { padding-top: 56.25%; } diff --git a/assets/css/main.css b/assets/css/main.css index 89efdc90..f15ad75b 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -457,7 +457,7 @@ pre { scroll-margin-top: 145px; } -@screen sm { +@variant sm { .thumbnail { min-width: 100%; height: 180px; @@ -467,7 +467,7 @@ pre { } } -@screen md { +@variant md { .thumbnail { min-width: 300px; min-height: 180px; @@ -599,7 +599,7 @@ pre { margin: 0px !important; } -@screen sm { +@variant sm { .sm\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; @@ -686,7 +686,7 @@ pre { } } -@screen md { +@variant md { .md\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; @@ -773,7 +773,7 @@ pre { } } -@screen lg { +@variant lg { .lg\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; @@ -860,7 +860,7 @@ pre { } } -@screen xl { +@variant xl { .xl\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; @@ -947,7 +947,7 @@ pre { } } -@screen 2xl { +@variant 2xl { .2xl\:grid-w10 { width: calc(10% - 5px); margin: 0px !important; @@ -1045,7 +1045,7 @@ pre { padding-top: 28.125%; } /* 32:9 Aspect Ratio */ -@screen sm { +@variant sm { .sm\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */ @@ -1057,7 +1057,7 @@ pre { } /* 32:9 Aspect Ratio */ } -@screen md { +@variant md { .md\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */ @@ -1069,7 +1069,7 @@ pre { } /* 32:9 Aspect Ratio */ } -@screen lg { +@variant lg { .lg\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */ @@ -1081,7 +1081,7 @@ pre { } /* 32:9 Aspect Ratio */ } -@screen xl { +@variant xl { .xl\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */ @@ -1093,7 +1093,7 @@ pre { } /* 32:9 Aspect Ratio */ } -@screen 2xl { +@variant 2xl { .2xl\:ratio-16-9 { padding-top: 56.25%; } /* 16:9 Aspect Ratio */ From 23e0416f51ac74c590ba201f56ca4fd31c46d9f7 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Sun, 13 Jul 2025 21:52:54 +0800 Subject: [PATCH 17/89] refactor: modularize carousel and gallery css --- assets/css/compiled/main.css | 578 ---------------------------- assets/css/components/carousel.css | 65 ++++ assets/css/components/gallery.css | 579 ++++++++++++++++++++++++++++ assets/css/main.css | 592 ----------------------------- layouts/partials/vendor.html | 14 + 5 files changed, 658 insertions(+), 1170 deletions(-) create mode 100644 assets/css/components/carousel.css create mode 100644 assets/css/components/gallery.css diff --git a/assets/css/compiled/main.css b/assets/css/compiled/main.css index 29c869b1..1c4a32e1 100644 --- a/assets/css/compiled/main.css +++ b/assets/css/compiled/main.css @@ -3789,584 +3789,6 @@ pre { text-decoration-thickness: 3px; text-underline-offset: 4px; } -.grid-w10 { - width: calc(10% - 5px); - margin: 0px !important; -} -.grid-w15 { - width: calc(15% - 5px); - margin: 0px !important; -} -.grid-w20 { - width: calc(20% - 5px); - margin: 0px !important; -} -.grid-w25 { - width: calc(25% - 5px); - margin: 0px !important; -} -.grid-w30 { - width: calc(30% - 5px); - margin: 0px !important; -} -.grid-w33 { - width: calc(33% - 5px); - margin: 0px !important; -} -.grid-w35 { - width: calc(35% - 5px); - margin: 0px !important; -} -.grid-w40 { - width: calc(40% - 5px); - margin: 0px !important; -} -.grid-w45 { - width: calc(45% - 5px); - margin: 0px !important; -} -.grid-w50 { - width: calc(50% - 5px); - margin: 0px !important; -} -.grid-w55 { - width: calc(55% - 5px); - margin: 0px !important; -} -.grid-w60 { - width: calc(60% - 5px); - margin: 0px !important; -} -.grid-w65 { - width: calc(65% - 5px); - margin: 0px !important; -} -.grid-w66 { - width: calc(66% - 5px); - margin: 0px !important; -} -.grid-w70 { - width: calc(70% - 5px); - margin: 0px !important; -} -.grid-w75 { - width: calc(75% - 5px); - margin: 0px !important; -} -.grid-w80 { - width: calc(80% - 5px); - margin: 0px !important; -} -.grid-w85 { - width: calc(85% - 5px); - margin: 0px !important; -} -.grid-w90 { - width: calc(90% - 5px); - margin: 0px !important; -} -.grid-w95 { - width: calc(95% - 5px); - margin: 0px !important; -} -.grid-w100 { - width: calc(100% - 5px); - margin: 0px !important; -} -@media (width >= 640px) { - .sm\:grid-w10 { - width: calc(10% - 5px); - margin: 0px !important; - } - .sm\:grid-w15 { - width: calc(15% - 5px); - margin: 0px !important; - } - .sm\:grid-w20 { - width: calc(20% - 5px); - margin: 0px !important; - } - .sm\:grid-w25 { - width: calc(25% - 5px); - margin: 0px !important; - } - .sm\:grid-w30 { - width: calc(30% - 5px); - margin: 0px !important; - } - .sm\:grid-w33 { - width: calc(33% - 5px); - margin: 0px !important; - } - .sm\:grid-w35 { - width: calc(35% - 5px); - margin: 0px !important; - } - .sm\:grid-w40 { - width: calc(40% - 5px); - margin: 0px !important; - } - .sm\:grid-w45 { - width: calc(45% - 5px); - margin: 0px !important; - } - .sm\:grid-w50 { - width: calc(50% - 5px); - margin: 0px !important; - } - .sm\:grid-w55 { - width: calc(55% - 5px); - margin: 0px !important; - } - .sm\:grid-w60 { - width: calc(60% - 5px); - margin: 0px !important; - } - .sm\:grid-w65 { - width: calc(65% - 5px); - margin: 0px !important; - } - .sm\:grid-w66 { - width: calc(66% - 5px); - margin: 0px !important; - } - .sm\:grid-w70 { - width: calc(70% - 5px); - margin: 0px !important; - } - .sm\:grid-w75 { - width: calc(75% - 5px); - margin: 0px !important; - } - .sm\:grid-w80 { - width: calc(80% - 5px); - margin: 0px !important; - } - .sm\:grid-w85 { - width: calc(85% - 5px); - margin: 0px !important; - } - .sm\:grid-w90 { - width: calc(90% - 5px); - margin: 0px !important; - } - .sm\:grid-w95 { - width: calc(95% - 5px); - margin: 0px !important; - } - .sm\:grid-w100 { - width: calc(100% - 5px); - margin: 0px !important; - } -} -@media (width >= 853px) { - .md\:grid-w10 { - width: calc(10% - 5px); - margin: 0px !important; - } - .md\:grid-w15 { - width: calc(15% - 5px); - margin: 0px !important; - } - .md\:grid-w20 { - width: calc(20% - 5px); - margin: 0px !important; - } - .md\:grid-w25 { - width: calc(25% - 5px); - margin: 0px !important; - } - .md\:grid-w30 { - width: calc(30% - 5px); - margin: 0px !important; - } - .md\:grid-w33 { - width: calc(33% - 5px); - margin: 0px !important; - } - .md\:grid-w35 { - width: calc(35% - 5px); - margin: 0px !important; - } - .md\:grid-w40 { - width: calc(40% - 5px); - margin: 0px !important; - } - .md\:grid-w45 { - width: calc(45% - 5px); - margin: 0px !important; - } - .md\:grid-w50 { - width: calc(50% - 5px); - margin: 0px !important; - } - .md\:grid-w55 { - width: calc(55% - 5px); - margin: 0px !important; - } - .md\:grid-w60 { - width: calc(60% - 5px); - margin: 0px !important; - } - .md\:grid-w65 { - width: calc(65% - 5px); - margin: 0px !important; - } - .md\:grid-w66 { - width: calc(66% - 5px); - margin: 0px !important; - } - .md\:grid-w70 { - width: calc(70% - 5px); - margin: 0px !important; - } - .md\:grid-w75 { - width: calc(75% - 5px); - margin: 0px !important; - } - .md\:grid-w80 { - width: calc(80% - 5px); - margin: 0px !important; - } - .md\:grid-w85 { - width: calc(85% - 5px); - margin: 0px !important; - } - .md\:grid-w90 { - width: calc(90% - 5px); - margin: 0px !important; - } - .md\:grid-w95 { - width: calc(95% - 5px); - margin: 0px !important; - } - .md\:grid-w100 { - width: calc(100% - 5px); - margin: 0px !important; - } -} -@media (width >= 1024px) { - .lg\:grid-w10 { - width: calc(10% - 5px); - margin: 0px !important; - } - .lg\:grid-w15 { - width: calc(15% - 5px); - margin: 0px !important; - } - .lg\:grid-w20 { - width: calc(20% - 5px); - margin: 0px !important; - } - .lg\:grid-w25 { - width: calc(25% - 5px); - margin: 0px !important; - } - .lg\:grid-w30 { - width: calc(30% - 5px); - margin: 0px !important; - } - .lg\:grid-w33 { - width: calc(33% - 5px); - margin: 0px !important; - } - .lg\:grid-w35 { - width: calc(35% - 5px); - margin: 0px !important; - } - .lg\:grid-w40 { - width: calc(40% - 5px); - margin: 0px !important; - } - .lg\:grid-w45 { - width: calc(45% - 5px); - margin: 0px !important; - } - .lg\:grid-w50 { - width: calc(50% - 5px); - margin: 0px !important; - } - .lg\:grid-w55 { - width: calc(55% - 5px); - margin: 0px !important; - } - .lg\:grid-w60 { - width: calc(60% - 5px); - margin: 0px !important; - } - .lg\:grid-w65 { - width: calc(65% - 5px); - margin: 0px !important; - } - .lg\:grid-w66 { - width: calc(66% - 5px); - margin: 0px !important; - } - .lg\:grid-w70 { - width: calc(70% - 5px); - margin: 0px !important; - } - .lg\:grid-w75 { - width: calc(75% - 5px); - margin: 0px !important; - } - .lg\:grid-w80 { - width: calc(80% - 5px); - margin: 0px !important; - } - .lg\:grid-w85 { - width: calc(85% - 5px); - margin: 0px !important; - } - .lg\:grid-w90 { - width: calc(90% - 5px); - margin: 0px !important; - } - .lg\:grid-w95 { - width: calc(95% - 5px); - margin: 0px !important; - } - .lg\:grid-w100 { - width: calc(100% - 5px); - margin: 0px !important; - } -} -@media (width >= 1280px) { - .xl\:grid-w10 { - width: calc(10% - 5px); - margin: 0px !important; - } - .xl\:grid-w15 { - width: calc(15% - 5px); - margin: 0px !important; - } - .xl\:grid-w20 { - width: calc(20% - 5px); - margin: 0px !important; - } - .xl\:grid-w25 { - width: calc(25% - 5px); - margin: 0px !important; - } - .xl\:grid-w30 { - width: calc(30% - 5px); - margin: 0px !important; - } - .xl\:grid-w33 { - width: calc(33% - 5px); - margin: 0px !important; - } - .xl\:grid-w35 { - width: calc(35% - 5px); - margin: 0px !important; - } - .xl\:grid-w40 { - width: calc(40% - 5px); - margin: 0px !important; - } - .xl\:grid-w45 { - width: calc(45% - 5px); - margin: 0px !important; - } - .xl\:grid-w50 { - width: calc(50% - 5px); - margin: 0px !important; - } - .xl\:grid-w55 { - width: calc(55% - 5px); - margin: 0px !important; - } - .xl\:grid-w60 { - width: calc(60% - 5px); - margin: 0px !important; - } - .xl\:grid-w65 { - width: calc(65% - 5px); - margin: 0px !important; - } - .xl\:grid-w66 { - width: calc(66% - 5px); - margin: 0px !important; - } - .xl\:grid-w70 { - width: calc(70% - 5px); - margin: 0px !important; - } - .xl\:grid-w75 { - width: calc(75% - 5px); - margin: 0px !important; - } - .xl\:grid-w80 { - width: calc(80% - 5px); - margin: 0px !important; - } - .xl\:grid-w85 { - width: calc(85% - 5px); - margin: 0px !important; - } - .xl\:grid-w90 { - width: calc(90% - 5px); - margin: 0px !important; - } - .xl\:grid-w95 { - width: calc(95% - 5px); - margin: 0px !important; - } - .xl\:grid-w100 { - width: calc(100% - 5px); - margin: 0px !important; - } -} -@media (width >= 1536px) { - .2xl\:grid-w10 { - width: calc(10% - 5px); - margin: 0px !important; - } - .2xl\:grid-w15 { - width: calc(15% - 5px); - margin: 0px !important; - } - .2xl\:grid-w20 { - width: calc(20% - 5px); - margin: 0px !important; - } - .2xl\:grid-w25 { - width: calc(25% - 5px); - margin: 0px !important; - } - .2xl\:grid-w30 { - width: calc(30% - 5px); - margin: 0px !important; - } - .2xl\:grid-w33 { - width: calc(33% - 5px); - margin: 0px !important; - } - .2xl\:grid-w35 { - width: calc(35% - 5px); - margin: 0px !important; - } - .2xl\:grid-w40 { - width: calc(40% - 5px); - margin: 0px !important; - } - .2xl\:grid-w45 { - width: calc(45% - 5px); - margin: 0px !important; - } - .2xl\:grid-w50 { - width: calc(50% - 5px); - margin: 0px !important; - } - .2xl\:grid-w55 { - width: calc(55% - 5px); - margin: 0px !important; - } - .2xl\:grid-w60 { - width: calc(60% - 5px); - margin: 0px !important; - } - .2xl\:grid-w65 { - width: calc(65% - 5px); - margin: 0px !important; - } - .2xl\:grid-w66 { - width: calc(66% - 5px); - margin: 0px !important; - } - .2xl\:grid-w70 { - width: calc(70% - 5px); - margin: 0px !important; - } - .2xl\:grid-w75 { - width: calc(75% - 5px); - margin: 0px !important; - } - .2xl\:grid-w80 { - width: calc(80% - 5px); - margin: 0px !important; - } - .2xl\:grid-w85 { - width: calc(85% - 5px); - margin: 0px !important; - } - .2xl\:grid-w90 { - width: calc(90% - 5px); - margin: 0px !important; - } - .2xl\:grid-w95 { - width: calc(95% - 5px); - margin: 0px !important; - } - .2xl\:grid-w100 { - width: calc(100% - 5px); - margin: 0px !important; - } -} -.ratio-16-9 { - padding-top: 56.25%; -} -.ratio-21-9 { - padding-top: 42.85%; -} -.ratio-32-9 { - padding-top: 28.125%; -} -@media (width >= 640px) { - .sm\:ratio-16-9 { - padding-top: 56.25%; - } - .sm\:ratio-21-9 { - padding-top: 42.85%; - } - .sm\:ratio-32-9 { - padding-top: 28.125%; - } -} -@media (width >= 853px) { - .md\:ratio-16-9 { - padding-top: 56.25%; - } - .md\:ratio-21-9 { - padding-top: 42.85%; - } - .md\:ratio-32-9 { - padding-top: 28.125%; - } -} -@media (width >= 1024px) { - .lg\:ratio-16-9 { - padding-top: 56.25%; - } - .lg\:ratio-21-9 { - padding-top: 42.85%; - } - .lg\:ratio-32-9 { - padding-top: 28.125%; - } -} -@media (width >= 1280px) { - .xl\:ratio-16-9 { - padding-top: 56.25%; - } - .xl\:ratio-21-9 { - padding-top: 42.85%; - } - .xl\:ratio-32-9 { - padding-top: 28.125%; - } -} -@media (width >= 1536px) { - .2xl\:ratio-16-9 { - padding-top: 56.25%; - } - .2xl\:ratio-21-9 { - padding-top: 42.85%; - } - .2xl\:ratio-32-9 { - padding-top: 28.125%; - } -} @layer base { [type='text'],input:where(:not([type])),[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select { appearance: none; diff --git a/assets/css/components/carousel.css b/assets/css/components/carousel.css new file mode 100644 index 00000000..9a799e05 --- /dev/null +++ b/assets/css/components/carousel.css @@ -0,0 +1,65 @@ +/* Carousel Specific Styles */ +.ratio-16-9 { + padding-top: 56.25%; +} +.ratio-21-9 { + padding-top: 42.85%; +} +.ratio-32-9 { + padding-top: 28.125%; +} +@media (width >= 640px) { + .sm\:ratio-16-9 { + padding-top: 56.25%; + } + .sm\:ratio-21-9 { + padding-top: 42.85%; + } + .sm\:ratio-32-9 { + padding-top: 28.125%; + } +} +@media (width >= 853px) { + .md\:ratio-16-9 { + padding-top: 56.25%; + } + .md\:ratio-21-9 { + padding-top: 42.85%; + } + .md\:ratio-32-9 { + padding-top: 28.125%; + } +} +@media (width >= 1024px) { + .lg\:ratio-16-9 { + padding-top: 56.25%; + } + .lg\:ratio-21-9 { + padding-top: 42.85%; + } + .lg\:ratio-32-9 { + padding-top: 28.125%; + } +} +@media (width >= 1280px) { + .xl\:ratio-16-9 { + padding-top: 56.25%; + } + .xl\:ratio-21-9 { + padding-top: 42.85%; + } + .xl\:ratio-32-9 { + padding-top: 28.125%; + } +} +@media (width >= 1536px) { + .\32xl\:ratio-16-9 { + padding-top: 56.25%; + } + .\32xl\:ratio-21-9 { + padding-top: 42.85%; + } + .\32xl\:ratio-32-9 { + padding-top: 28.125%; + } +} diff --git a/assets/css/components/gallery.css b/assets/css/components/gallery.css new file mode 100644 index 00000000..e9e9616b --- /dev/null +++ b/assets/css/components/gallery.css @@ -0,0 +1,579 @@ +/* Gallery Specific Styles */ +.grid-w10 { + width: calc(10% - 5px); + margin: 0px !important; +} +.grid-w15 { + width: calc(15% - 5px); + margin: 0px !important; +} +.grid-w20 { + width: calc(20% - 5px); + margin: 0px !important; +} +.grid-w25 { + width: calc(25% - 5px); + margin: 0px !important; +} +.grid-w30 { + width: calc(30% - 5px); + margin: 0px !important; +} +.grid-w33 { + width: calc(33% - 5px); + margin: 0px !important; +} +.grid-w35 { + width: calc(35% - 5px); + margin: 0px !important; +} +.grid-w40 { + width: calc(40% - 5px); + margin: 0px !important; +} +.grid-w45 { + width: calc(45% - 5px); + margin: 0px !important; +} +.grid-w50 { + width: calc(50% - 5px); + margin: 0px !important; +} +.grid-w55 { + width: calc(55% - 5px); + margin: 0px !important; +} +.grid-w60 { + width: calc(60% - 5px); + margin: 0px !important; +} +.grid-w65 { + width: calc(65% - 5px); + margin: 0px !important; +} +.grid-w66 { + width: calc(66% - 5px); + margin: 0px !important; +} +.grid-w70 { + width: calc(70% - 5px); + margin: 0px !important; +} +.grid-w75 { + width: calc(75% - 5px); + margin: 0px !important; +} +.grid-w80 { + width: calc(80% - 5px); + margin: 0px !important; +} +.grid-w85 { + width: calc(85% - 5px); + margin: 0px !important; +} +.grid-w90 { + width: calc(90% - 5px); + margin: 0px !important; +} +.grid-w95 { + width: calc(95% - 5px); + margin: 0px !important; +} +.grid-w100 { + width: calc(100% - 5px); + margin: 0px !important; +} +@media (width >= 640px) { + .sm\:grid-w10 { + width: calc(10% - 5px); + margin: 0px !important; + } + .sm\:grid-w15 { + width: calc(15% - 5px); + margin: 0px !important; + } + .sm\:grid-w20 { + width: calc(20% - 5px); + margin: 0px !important; + } + .sm\:grid-w25 { + width: calc(25% - 5px); + margin: 0px !important; + } + .sm\:grid-w30 { + width: calc(30% - 5px); + margin: 0px !important; + } + .sm\:grid-w33 { + width: calc(33% - 5px); + margin: 0px !important; + } + .sm\:grid-w35 { + width: calc(35% - 5px); + margin: 0px !important; + } + .sm\:grid-w40 { + width: calc(40% - 5px); + margin: 0px !important; + } + .sm\:grid-w45 { + width: calc(45% - 5px); + margin: 0px !important; + } + .sm\:grid-w50 { + width: calc(50% - 5px); + margin: 0px !important; + } + .sm\:grid-w55 { + width: calc(55% - 5px); + margin: 0px !important; + } + .sm\:grid-w60 { + width: calc(60% - 5px); + margin: 0px !important; + } + .sm\:grid-w65 { + width: calc(65% - 5px); + margin: 0px !important; + } + .sm\:grid-w66 { + width: calc(66% - 5px); + margin: 0px !important; + } + .sm\:grid-w70 { + width: calc(70% - 5px); + margin: 0px !important; + } + .sm\:grid-w75 { + width: calc(75% - 5px); + margin: 0px !important; + } + .sm\:grid-w80 { + width: calc(80% - 5px); + margin: 0px !important; + } + .sm\:grid-w85 { + width: calc(85% - 5px); + margin: 0px !important; + } + .sm\:grid-w90 { + width: calc(90% - 5px); + margin: 0px !important; + } + .sm\:grid-w95 { + width: calc(95% - 5px); + margin: 0px !important; + } + .sm\:grid-w100 { + width: calc(100% - 5px); + margin: 0px !important; + } +} +@media (width >= 853px) { + .md\:grid-w10 { + width: calc(10% - 5px); + margin: 0px !important; + } + .md\:grid-w15 { + width: calc(15% - 5px); + margin: 0px !important; + } + .md\:grid-w20 { + width: calc(20% - 5px); + margin: 0px !important; + } + .md\:grid-w25 { + width: calc(25% - 5px); + margin: 0px !important; + } + .md\:grid-w30 { + width: calc(30% - 5px); + margin: 0px !important; + } + .md\:grid-w33 { + width: calc(33% - 5px); + margin: 0px !important; + } + .md\:grid-w35 { + width: calc(35% - 5px); + margin: 0px !important; + } + .md\:grid-w40 { + width: calc(40% - 5px); + margin: 0px !important; + } + .md\:grid-w45 { + width: calc(45% - 5px); + margin: 0px !important; + } + .md\:grid-w50 { + width: calc(50% - 5px); + margin: 0px !important; + } + .md\:grid-w55 { + width: calc(55% - 5px); + margin: 0px !important; + } + .md\:grid-w60 { + width: calc(60% - 5px); + margin: 0px !important; + } + .md\:grid-w65 { + width: calc(65% - 5px); + margin: 0px !important; + } + .md\:grid-w66 { + width: calc(66% - 5px); + margin: 0px !important; + } + .md\:grid-w70 { + width: calc(70% - 5px); + margin: 0px !important; + } + .md\:grid-w75 { + width: calc(75% - 5px); + margin: 0px !important; + } + .md\:grid-w80 { + width: calc(80% - 5px); + margin: 0px !important; + } + .md\:grid-w85 { + width: calc(85% - 5px); + margin: 0px !important; + } + .md\:grid-w90 { + width: calc(90% - 5px); + margin: 0px !important; + } + .md\:grid-w95 { + width: calc(95% - 5px); + margin: 0px !important; + } + .md\:grid-w100 { + width: calc(100% - 5px); + margin: 0px !important; + } +} +@media (width >= 1024px) { + .lg\:grid-w10 { + width: calc(10% - 5px); + margin: 0px !important; + } + .lg\:grid-w15 { + width: calc(15% - 5px); + margin: 0px !important; + } + .lg\:grid-w20 { + width: calc(20% - 5px); + margin: 0px !important; + } + .lg\:grid-w25 { + width: calc(25% - 5px); + margin: 0px !important; + } + .lg\:grid-w30 { + width: calc(30% - 5px); + margin: 0px !important; + } + .lg\:grid-w33 { + width: calc(33% - 5px); + margin: 0px !important; + } + .lg\:grid-w35 { + width: calc(35% - 5px); + margin: 0px !important; + } + .lg\:grid-w40 { + width: calc(40% - 5px); + margin: 0px !important; + } + .lg\:grid-w45 { + width: calc(45% - 5px); + margin: 0px !important; + } + .lg\:grid-w50 { + width: calc(50% - 5px); + margin: 0px !important; + } + .lg\:grid-w55 { + width: calc(55% - 5px); + margin: 0px !important; + } + .lg\:grid-w60 { + width: calc(60% - 5px); + margin: 0px !important; + } + .lg\:grid-w65 { + width: calc(65% - 5px); + margin: 0px !important; + } + .lg\:grid-w66 { + width: calc(66% - 5px); + margin: 0px !important; + } + .lg\:grid-w70 { + width: calc(70% - 5px); + margin: 0px !important; + } + .lg\:grid-w75 { + width: calc(75% - 5px); + margin: 0px !important; + } + .lg\:grid-w80 { + width: calc(80% - 5px); + margin: 0px !important; + } + .lg\:grid-w85 { + width: calc(85% - 5px); + margin: 0px !important; + } + .lg\:grid-w90 { + width: calc(90% - 5px); + margin: 0px !important; + } + .lg\:grid-w95 { + width: calc(95% - 5px); + margin: 0px !important; + } + .lg\:grid-w100 { + width: calc(100% - 5px); + margin: 0px !important; + } +} +@media (width >= 1280px) { + .xl\:grid-w10 { + width: calc(10% - 5px); + margin: 0px !important; + } + .xl\:grid-w15 { + width: calc(15% - 5px); + margin: 0px !important; + } + .xl\:grid-w20 { + width: calc(20% - 5px); + margin: 0px !important; + } + .xl\:grid-w25 { + width: calc(25% - 5px); + margin: 0px !important; + } + .xl\:grid-w30 { + width: calc(30% - 5px); + margin: 0px !important; + } + .xl\:grid-w33 { + width: calc(33% - 5px); + margin: 0px !important; + } + .xl\:grid-w35 { + width: calc(35% - 5px); + margin: 0px !important; + } + .xl\:grid-w40 { + width: calc(40% - 5px); + margin: 0px !important; + } + .xl\:grid-w45 { + width: calc(45% - 5px); + margin: 0px !important; + } + .xl\:grid-w50 { + width: calc(50% - 5px); + margin: 0px !important; + } + .xl\:grid-w55 { + width: calc(55% - 5px); + margin: 0px !important; + } + .xl\:grid-w60 { + width: calc(60% - 5px); + margin: 0px !important; + } + .xl\:grid-w65 { + width: calc(65% - 5px); + margin: 0px !important; + } + .xl\:grid-w66 { + width: calc(66% - 5px); + margin: 0px !important; + } + .xl\:grid-w70 { + width: calc(70% - 5px); + margin: 0px !important; + } + .xl\:grid-w75 { + width: calc(75% - 5px); + margin: 0px !important; + } + .xl\:grid-w80 { + width: calc(80% - 5px); + margin: 0px !important; + } + .xl\:grid-w85 { + width: calc(85% - 5px); + margin: 0px !important; + } + .xl\:grid-w90 { + width: calc(90% - 5px); + margin: 0px !important; + } + .xl\:grid-w95 { + width: calc(95% - 5px); + margin: 0px !important; + } + .xl\:grid-w100 { + width: calc(100% - 5px); + margin: 0px !important; + } +} +@media (width >= 1536px) { + .\32xl\:grid-w10 { + width: calc(10% - 5px); + margin: 0px !important; + } + .\32xl\:grid-w15 { + width: calc(15% - 5px); + margin: 0px !important; + } + .\32xl\:grid-w20 { + width: calc(20% - 5px); + margin: 0px !important; + } + .\32xl\:grid-w25 { + width: calc(25% - 5px); + margin: 0px !important; + } + .\32xl\:grid-w30 { + width: calc(30% - 5px); + margin: 0px !important; + } + .\32xl\:grid-w33 { + width: calc(33% - 5px); + margin: 0px !important; + } + .\32xl\:grid-w35 { + width: calc(35% - 5px); + margin: 0px !important; + } + .\32xl\:grid-w40 { + width: calc(40% - 5px); + margin: 0px !important; + } + .\32xl\:grid-w45 { + width: calc(45% - 5px); + margin: 0px !important; + } + .\32xl\:grid-w50 { + width: calc(50% - 5px); + margin: 0px !important; + } + .\32xl\:grid-w55 { + width: calc(55% - 5px); + margin: 0px !important; + } + .\32xl\:grid-w60 { + width: calc(60% - 5px); + margin: 0px !important; + } + .\32xl\:grid-w65 { + width: calc(65% - 5px); + margin: 0px !important; + } + .\32xl\:grid-w66 { + width: calc(66% - 5px); + margin: 0px !important; + } + .\32xl\:grid-w70 { + width: calc(70% - 5px); + margin: 0px !important; + } + .\32xl\:grid-w75 { + width: calc(75% - 5px); + margin: 0px !important; + } + .\32xl\:grid-w80 { + width: calc(80% - 5px); + margin: 0px !important; + } + .\32xl\:grid-w85 { + width: calc(85% - 5px); + margin: 0px !important; + } + .\32xl\:grid-w90 { + width: calc(90% - 5px); + margin: 0px !important; + } + .\32xl\:grid-w95 { + width: calc(95% - 5px); + margin: 0px !important; + } + .\32xl\:grid-w100 { + width: calc(100% - 5px); + margin: 0px !important; + } +} +.ratio-16-9 { + padding-top: 56.25%; +} +.ratio-21-9 { + padding-top: 42.85%; +} +.ratio-32-9 { + padding-top: 28.125%; +} +@media (width >= 640px) { + .sm\:ratio-16-9 { + padding-top: 56.25%; + } + .sm\:ratio-21-9 { + padding-top: 42.85%; + } + .sm\:ratio-32-9 { + padding-top: 28.125%; + } +} +@media (width >= 853px) { + .md\:ratio-16-9 { + padding-top: 56.25%; + } + .md\:ratio-21-9 { + padding-top: 42.85%; + } + .md\:ratio-32-9 { + padding-top: 28.125%; + } +} +@media (width >= 1024px) { + .lg\:ratio-16-9 { + padding-top: 56.25%; + } + .lg\:ratio-21-9 { + padding-top: 42.85%; + } + .lg\:ratio-32-9 { + padding-top: 28.125%; + } +} +@media (width >= 1280px) { + .xl\:ratio-16-9 { + padding-top: 56.25%; + } + .xl\:ratio-21-9 { + padding-top: 42.85%; + } + .xl\:ratio-32-9 { + padding-top: 28.125%; + } +} +@media (width >= 1536px) { + .\32xl\:ratio-16-9 { + padding-top: 56.25%; + } + .\32xl\:ratio-21-9 { + padding-top: 42.85%; + } + .\32xl\:ratio-32-9 { + padding-top: 28.125%; + } +} diff --git a/assets/css/main.css b/assets/css/main.css index f15ad75b..6dfa1a7c 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -512,595 +512,3 @@ pre { text-decoration-thickness: 3px; text-underline-offset: 4px; } - -/* Gallery Specific Styles */ -.grid-w10 { - width: calc(10% - 5px); - margin: 0px !important; -} -.grid-w15 { - width: calc(15% - 5px); - margin: 0px !important; -} -.grid-w20 { - width: calc(20% - 5px); - margin: 0px !important; -} -.grid-w25 { - width: calc(25% - 5px); - margin: 0px !important; -} -.grid-w30 { - width: calc(30% - 5px); - margin: 0px !important; -} -.grid-w33 { - width: calc(33% - 5px); - margin: 0px !important; -} -.grid-w35 { - width: calc(35% - 5px); - margin: 0px !important; -} -.grid-w40 { - width: calc(40% - 5px); - margin: 0px !important; -} -.grid-w45 { - width: calc(45% - 5px); - margin: 0px !important; -} -.grid-w50 { - width: calc(50% - 5px); - margin: 0px !important; -} -.grid-w55 { - width: calc(55% - 5px); - margin: 0px !important; -} -.grid-w60 { - width: calc(60% - 5px); - margin: 0px !important; -} -.grid-w65 { - width: calc(65% - 5px); - margin: 0px !important; -} -.grid-w66 { - width: calc(66% - 5px); - margin: 0px !important; -} -.grid-w70 { - width: calc(70% - 5px); - margin: 0px !important; -} -.grid-w75 { - width: calc(75% - 5px); - margin: 0px !important; -} -.grid-w80 { - width: calc(80% - 5px); - margin: 0px !important; -} -.grid-w85 { - width: calc(85% - 5px); - margin: 0px !important; -} -.grid-w90 { - width: calc(90% - 5px); - margin: 0px !important; -} -.grid-w95 { - width: calc(95% - 5px); - margin: 0px !important; -} -.grid-w100 { - width: calc(100% - 5px); - margin: 0px !important; -} - -@variant sm { - .sm\:grid-w10 { - width: calc(10% - 5px); - margin: 0px !important; - } - .sm\:grid-w15 { - width: calc(15% - 5px); - margin: 0px !important; - } - .sm\:grid-w20 { - width: calc(20% - 5px); - margin: 0px !important; - } - .sm\:grid-w25 { - width: calc(25% - 5px); - margin: 0px !important; - } - .sm\:grid-w30 { - width: calc(30% - 5px); - margin: 0px !important; - } - .sm\:grid-w33 { - width: calc(33% - 5px); - margin: 0px !important; - } - .sm\:grid-w35 { - width: calc(35% - 5px); - margin: 0px !important; - } - .sm\:grid-w40 { - width: calc(40% - 5px); - margin: 0px !important; - } - .sm\:grid-w45 { - width: calc(45% - 5px); - margin: 0px !important; - } - .sm\:grid-w50 { - width: calc(50% - 5px); - margin: 0px !important; - } - .sm\:grid-w55 { - width: calc(55% - 5px); - margin: 0px !important; - } - .sm\:grid-w60 { - width: calc(60% - 5px); - margin: 0px !important; - } - .sm\:grid-w65 { - width: calc(65% - 5px); - margin: 0px !important; - } - .sm\:grid-w66 { - width: calc(66% - 5px); - margin: 0px !important; - } - .sm\:grid-w70 { - width: calc(70% - 5px); - margin: 0px !important; - } - .sm\:grid-w75 { - width: calc(75% - 5px); - margin: 0px !important; - } - .sm\:grid-w80 { - width: calc(80% - 5px); - margin: 0px !important; - } - .sm\:grid-w85 { - width: calc(85% - 5px); - margin: 0px !important; - } - .sm\:grid-w90 { - width: calc(90% - 5px); - margin: 0px !important; - } - .sm\:grid-w95 { - width: calc(95% - 5px); - margin: 0px !important; - } - .sm\:grid-w100 { - width: calc(100% - 5px); - margin: 0px !important; - } -} - -@variant md { - .md\:grid-w10 { - width: calc(10% - 5px); - margin: 0px !important; - } - .md\:grid-w15 { - width: calc(15% - 5px); - margin: 0px !important; - } - .md\:grid-w20 { - width: calc(20% - 5px); - margin: 0px !important; - } - .md\:grid-w25 { - width: calc(25% - 5px); - margin: 0px !important; - } - .md\:grid-w30 { - width: calc(30% - 5px); - margin: 0px !important; - } - .md\:grid-w33 { - width: calc(33% - 5px); - margin: 0px !important; - } - .md\:grid-w35 { - width: calc(35% - 5px); - margin: 0px !important; - } - .md\:grid-w40 { - width: calc(40% - 5px); - margin: 0px !important; - } - .md\:grid-w45 { - width: calc(45% - 5px); - margin: 0px !important; - } - .md\:grid-w50 { - width: calc(50% - 5px); - margin: 0px !important; - } - .md\:grid-w55 { - width: calc(55% - 5px); - margin: 0px !important; - } - .md\:grid-w60 { - width: calc(60% - 5px); - margin: 0px !important; - } - .md\:grid-w65 { - width: calc(65% - 5px); - margin: 0px !important; - } - .md\:grid-w66 { - width: calc(66% - 5px); - margin: 0px !important; - } - .md\:grid-w70 { - width: calc(70% - 5px); - margin: 0px !important; - } - .md\:grid-w75 { - width: calc(75% - 5px); - margin: 0px !important; - } - .md\:grid-w80 { - width: calc(80% - 5px); - margin: 0px !important; - } - .md\:grid-w85 { - width: calc(85% - 5px); - margin: 0px !important; - } - .md\:grid-w90 { - width: calc(90% - 5px); - margin: 0px !important; - } - .md\:grid-w95 { - width: calc(95% - 5px); - margin: 0px !important; - } - .md\:grid-w100 { - width: calc(100% - 5px); - margin: 0px !important; - } -} - -@variant lg { - .lg\:grid-w10 { - width: calc(10% - 5px); - margin: 0px !important; - } - .lg\:grid-w15 { - width: calc(15% - 5px); - margin: 0px !important; - } - .lg\:grid-w20 { - width: calc(20% - 5px); - margin: 0px !important; - } - .lg\:grid-w25 { - width: calc(25% - 5px); - margin: 0px !important; - } - .lg\:grid-w30 { - width: calc(30% - 5px); - margin: 0px !important; - } - .lg\:grid-w33 { - width: calc(33% - 5px); - margin: 0px !important; - } - .lg\:grid-w35 { - width: calc(35% - 5px); - margin: 0px !important; - } - .lg\:grid-w40 { - width: calc(40% - 5px); - margin: 0px !important; - } - .lg\:grid-w45 { - width: calc(45% - 5px); - margin: 0px !important; - } - .lg\:grid-w50 { - width: calc(50% - 5px); - margin: 0px !important; - } - .lg\:grid-w55 { - width: calc(55% - 5px); - margin: 0px !important; - } - .lg\:grid-w60 { - width: calc(60% - 5px); - margin: 0px !important; - } - .lg\:grid-w65 { - width: calc(65% - 5px); - margin: 0px !important; - } - .lg\:grid-w66 { - width: calc(66% - 5px); - margin: 0px !important; - } - .lg\:grid-w70 { - width: calc(70% - 5px); - margin: 0px !important; - } - .lg\:grid-w75 { - width: calc(75% - 5px); - margin: 0px !important; - } - .lg\:grid-w80 { - width: calc(80% - 5px); - margin: 0px !important; - } - .lg\:grid-w85 { - width: calc(85% - 5px); - margin: 0px !important; - } - .lg\:grid-w90 { - width: calc(90% - 5px); - margin: 0px !important; - } - .lg\:grid-w95 { - width: calc(95% - 5px); - margin: 0px !important; - } - .lg\:grid-w100 { - width: calc(100% - 5px); - margin: 0px !important; - } -} - -@variant xl { - .xl\:grid-w10 { - width: calc(10% - 5px); - margin: 0px !important; - } - .xl\:grid-w15 { - width: calc(15% - 5px); - margin: 0px !important; - } - .xl\:grid-w20 { - width: calc(20% - 5px); - margin: 0px !important; - } - .xl\:grid-w25 { - width: calc(25% - 5px); - margin: 0px !important; - } - .xl\:grid-w30 { - width: calc(30% - 5px); - margin: 0px !important; - } - .xl\:grid-w33 { - width: calc(33% - 5px); - margin: 0px !important; - } - .xl\:grid-w35 { - width: calc(35% - 5px); - margin: 0px !important; - } - .xl\:grid-w40 { - width: calc(40% - 5px); - margin: 0px !important; - } - .xl\:grid-w45 { - width: calc(45% - 5px); - margin: 0px !important; - } - .xl\:grid-w50 { - width: calc(50% - 5px); - margin: 0px !important; - } - .xl\:grid-w55 { - width: calc(55% - 5px); - margin: 0px !important; - } - .xl\:grid-w60 { - width: calc(60% - 5px); - margin: 0px !important; - } - .xl\:grid-w65 { - width: calc(65% - 5px); - margin: 0px !important; - } - .xl\:grid-w66 { - width: calc(66% - 5px); - margin: 0px !important; - } - .xl\:grid-w70 { - width: calc(70% - 5px); - margin: 0px !important; - } - .xl\:grid-w75 { - width: calc(75% - 5px); - margin: 0px !important; - } - .xl\:grid-w80 { - width: calc(80% - 5px); - margin: 0px !important; - } - .xl\:grid-w85 { - width: calc(85% - 5px); - margin: 0px !important; - } - .xl\:grid-w90 { - width: calc(90% - 5px); - margin: 0px !important; - } - .xl\:grid-w95 { - width: calc(95% - 5px); - margin: 0px !important; - } - .xl\:grid-w100 { - width: calc(100% - 5px); - margin: 0px !important; - } -} - -@variant 2xl { - .2xl\:grid-w10 { - width: calc(10% - 5px); - margin: 0px !important; - } - .2xl\:grid-w15 { - width: calc(15% - 5px); - margin: 0px !important; - } - .2xl\:grid-w20 { - width: calc(20% - 5px); - margin: 0px !important; - } - .2xl\:grid-w25 { - width: calc(25% - 5px); - margin: 0px !important; - } - .2xl\:grid-w30 { - width: calc(30% - 5px); - margin: 0px !important; - } - .2xl\:grid-w33 { - width: calc(33% - 5px); - margin: 0px !important; - } - .2xl\:grid-w35 { - width: calc(35% - 5px); - margin: 0px !important; - } - .2xl\:grid-w40 { - width: calc(40% - 5px); - margin: 0px !important; - } - .2xl\:grid-w45 { - width: calc(45% - 5px); - margin: 0px !important; - } - .2xl\:grid-w50 { - width: calc(50% - 5px); - margin: 0px !important; - } - .2xl\:grid-w55 { - width: calc(55% - 5px); - margin: 0px !important; - } - .2xl\:grid-w60 { - width: calc(60% - 5px); - margin: 0px !important; - } - .2xl\:grid-w65 { - width: calc(65% - 5px); - margin: 0px !important; - } - .2xl\:grid-w66 { - width: calc(66% - 5px); - margin: 0px !important; - } - .2xl\:grid-w70 { - width: calc(70% - 5px); - margin: 0px !important; - } - .2xl\:grid-w75 { - width: calc(75% - 5px); - margin: 0px !important; - } - .2xl\:grid-w80 { - width: calc(80% - 5px); - margin: 0px !important; - } - .2xl\:grid-w85 { - width: calc(85% - 5px); - margin: 0px !important; - } - .2xl\:grid-w90 { - width: calc(90% - 5px); - margin: 0px !important; - } - .2xl\:grid-w95 { - width: calc(95% - 5px); - margin: 0px !important; - } - .2xl\:grid-w100 { - width: calc(100% - 5px); - margin: 0px !important; - } -} - -/* Carousel Specific Styles */ -.ratio-16-9 { - padding-top: 56.25%; -} /* 16:9 Aspect Ratio */ -.ratio-21-9 { - padding-top: 42.85%; -} /* 21:9 Aspect Ratio */ -.ratio-32-9 { - padding-top: 28.125%; -} /* 32:9 Aspect Ratio */ - -@variant sm { - .sm\:ratio-16-9 { - padding-top: 56.25%; - } /* 16:9 Aspect Ratio */ - .sm\:ratio-21-9 { - padding-top: 42.85%; - } /* 21:9 Aspect Ratio */ - .sm\:ratio-32-9 { - padding-top: 28.125%; - } /* 32:9 Aspect Ratio */ -} - -@variant md { - .md\:ratio-16-9 { - padding-top: 56.25%; - } /* 16:9 Aspect Ratio */ - .md\:ratio-21-9 { - padding-top: 42.85%; - } /* 21:9 Aspect Ratio */ - .md\:ratio-32-9 { - padding-top: 28.125%; - } /* 32:9 Aspect Ratio */ -} - -@variant lg { - .lg\:ratio-16-9 { - padding-top: 56.25%; - } /* 16:9 Aspect Ratio */ - .lg\:ratio-21-9 { - padding-top: 42.85%; - } /* 21:9 Aspect Ratio */ - .lg\:ratio-32-9 { - padding-top: 28.125%; - } /* 32:9 Aspect Ratio */ -} - -@variant xl { - .xl\:ratio-16-9 { - padding-top: 56.25%; - } /* 16:9 Aspect Ratio */ - .xl\:ratio-21-9 { - padding-top: 42.85%; - } /* 21:9 Aspect Ratio */ - .xl\:ratio-32-9 { - padding-top: 28.125%; - } /* 32:9 Aspect Ratio */ -} - -@variant 2xl { - .2xl\:ratio-16-9 { - padding-top: 56.25%; - } /* 16:9 Aspect Ratio */ - .2xl\:ratio-21-9 { - padding-top: 42.85%; - } /* 21:9 Aspect Ratio */ - .2xl\:ratio-32-9 { - padding-top: 28.125%; - } /* 32:9 Aspect Ratio */ -} diff --git a/layouts/partials/vendor.html b/layouts/partials/vendor.html index f76b90fc..9210cc57 100644 --- a/layouts/partials/vendor.html +++ b/layouts/partials/vendor.html @@ -60,6 +60,13 @@ {{/* Packery */}} {{ if .Page.HasShortcode "gallery" }} + {{ $galleryCSS := resources.Get "css/components/gallery.css" }} + {{ $galleryCSS = $galleryCSS | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }} + {{ $packeryLib := resources.Get "lib/packery/packery.pkgd.min.js" }} {{ $packeryLib = $packeryLib | resources.Fingerprint (.Site.Params.fingerprintAlgorithm | default "sha512") }} - {{ end }} - -
- {{ if $toc }} -
-
- {{ partial "toc.html" . }} -
-
+ {{ .Scratch.Set "scope" "list" }} + {{ if .Site.Params.list.showHero | default false }} + {{ $heroStyle := print "hero/" .Site.Params.list.heroStyle ".html" }} + {{ if templates.Exists ( printf "partials/%s" $heroStyle ) }} + {{ partial $heroStyle . }} + {{ else }} + {{ partial "hero/basic.html" . }} {{ end }} -
- {{ .Content }} + {{- end -}} + + {{ $toc := and (.Params.showTableOfContents | default (.Site.Params.list.showTableOfContents | default false)) (in .TableOfContents " + {{ if .Params.showBreadcrumbs | default (.Site.Params.list.showBreadcrumbs | default false) }} + {{ partial "breadcrumbs.html" . }} + {{ end }} +

{{ .Title }}

+
+ {{ partial "article-meta/list.html" (dict "context" . "scope" "single") }}
- - - - -
- {{ if gt .Pages 0 }} - - {{ $cardView := .Params.cardView | default (.Site.Params.list.cardView | default false) }} - {{ $cardViewScreenWidth := .Params.cardViewScreenWidth | default (.Site.Params.list.cardViewScreenWidth | default false) }} - {{ $groupByYear := .Params.groupByYear | default ($.Site.Params.list.groupByYear | default false) }} - {{ $orderByWeight := .Params.orderByWeight | default ($.Site.Params.list.orderByWeight | default false) }} - {{ $groupByYear := and (not $orderByWeight) $groupByYear }} - - {{ if not $cardView }} - -
- {{ if not $orderByWeight }} - {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} - {{ if $groupByYear }} -

- {{ .Key }} -

- {{ end }} - {{ range .Pages }} - {{ partial "article-link/simple.html" . }} - {{ end }} - {{ end }} - {{ else }} - {{ range (.Paginate (.Pages.ByWeight)).Pages }} - {{ partial "article-link/simple.html" . }} - {{ end }} + {{ $translations := .AllTranslations }} + {{ with .File }} + {{ $path := .Path }} + {{ range $translations }} + {{ $lang := print "." .Lang ".md" }} + {{ $path = replace $path $lang ".md" }} {{ end }} + {{ $jsPage := resources.Get "js/page.js" }} + {{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }} + + {{ end }} + +
+ {{ if $toc }} +
+
+ {{ partial "toc.html" . }} +
+
+ {{ end }} +
+ {{ .Content }} +
- {{ else }} + {{ if gt .Pages 0 }} + {{ $cardView := .Params.cardView | default (.Site.Params.list.cardView | default false) }} + {{ $cardViewScreenWidth := .Params.cardViewScreenWidth | default (.Site.Params.list.cardViewScreenWidth | default false) }} + {{ $groupByYear := .Params.groupByYear | default ($.Site.Params.list.groupByYear | default false) }} + {{ $orderByWeight := .Params.orderByWeight | default ($.Site.Params.list.orderByWeight | default false) }} + {{ $groupByYear := and (not $orderByWeight) $groupByYear }} - {{ if $groupByYear }} - - {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} - {{ if $cardViewScreenWidth }} -
- {{ end }} -

- {{ .Key }} -

-
- {{ range .Pages }} - {{ partial "article-link/card.html" . }} + {{ if not $cardView }} +
+ {{ if not $orderByWeight }} + {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} + {{ if $groupByYear }} +

+ {{ .Key }} +

+ {{ end }} + {{ range .Pages }} + {{ partial "article-link/simple.html" . }} + {{ end }} + {{ end }} + {{ else }} + {{ range (.Paginate (.Pages.ByWeight)).Pages }} + {{ partial "article-link/simple.html" . }} + {{ end }} {{ end }}
- {{ if $cardViewScreenWidth }}
{{ end }} + + {{ else }} + + {{ if $groupByYear }} + {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} + {{ if $cardViewScreenWidth }} +
+ {{ end }} +

+ {{ .Key }} +

+
+ {{ range .Pages }} + {{ partial "article-link/card.html" . }} + {{ end }} +
+ {{ if $cardViewScreenWidth }} +
+ {{ end }} + {{ end }} + + {{ else }} + + {{ if $cardViewScreenWidth }} +
+
+ {{ else }} +
+ {{ end }} + {{ if not $orderByWeight }} + {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} + {{ range .Pages }} + {{ partial "article-link/card.html" . }} + {{ end }} + {{ end }} + {{ else }} + {{ range (.Paginate (.Pages.ByWeight)).Pages }} + {{ partial "article-link/card.html" . }} + {{ end }} + {{ end }} +
+ {{ if $cardViewScreenWidth }} +
+ {{ end }} + {{ end }} + {{ end }} - - {{ else }} - - {{ if $cardViewScreenWidth }} -
-
- {{ else }} -
- {{ end }} - {{ if not $orderByWeight }} - {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} - {{ range .Pages }} - {{ partial "article-link/card.html" . }} - {{ end }} - {{ end }} - {{ else }} - {{ range (.Paginate (.Pages.ByWeight)).Pages }} - {{ partial "article-link/card.html" . }} - {{ end }} - {{ end }} -
- {{ if $cardViewScreenWidth }}
{{ end }} - + {{ else }} +
+

+ {{ i18n "list.no_articles" | emojify }} +

+
{{ end }} - - {{end}} - - {{ else }} -
-

- {{ i18n "list.no_articles" | emojify }} -

-
- {{ end }} - - {{ partial "pagination.html" . }} - - {{ end }} + {{ partial "pagination.html" . }} +{{ end }} From b0c3ac1321bc063eb50525514d4710920fc737b7 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Wed, 16 Jul 2025 14:48:18 +0800 Subject: [PATCH 31/89] refactor(list.html): make list.html formattable --- .prettierignore | 1 - layouts/_default/list.html | 67 ++++++++++++++++++++++++-------------- 2 files changed, 42 insertions(+), 26 deletions(-) diff --git a/.prettierignore b/.prettierignore index 0a829920..d26f8b34 100644 --- a/.prettierignore +++ b/.prettierignore @@ -27,7 +27,6 @@ static layouts/_default/_markup/render-heading.html layouts/_default/index.json -layouts/_default/list.html layouts/shortcodes/screenshot.html layouts/shortcodes/figure.html layouts/partials/hugo-embedded/shortcodes/figure-default.html diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 465c4f97..18d60f54 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -81,17 +81,24 @@ {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} {{ if $cardViewScreenWidth }}
- {{ end }} -

- {{ .Key }} -

-
- {{ range .Pages }} - {{ partial "article-link/card.html" . }} - {{ end }} -
- {{ if $cardViewScreenWidth }} +

+ {{ .Key }} +

+
+ {{ range .Pages }} + {{ partial "article-link/card.html" . }} + {{ end }} +
+ {{ else }} +

+ {{ .Key }} +

+
+ {{ range .Pages }} + {{ partial "article-link/card.html" . }} + {{ end }} +
{{ end }} {{ end }} @@ -99,24 +106,34 @@ {{ if $cardViewScreenWidth }}
-
+
+ {{ if not $orderByWeight }} + {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} + {{ range .Pages }} + {{ partial "article-link/card.html" . }} + {{ end }} + {{ end }} + {{ else }} + {{ range (.Paginate (.Pages.ByWeight)).Pages }} + {{ partial "article-link/card.html" . }} + {{ end }} + {{ end }} +
+
{{ else }}
- {{ end }} - {{ if not $orderByWeight }} - {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} - {{ range .Pages }} - {{ partial "article-link/card.html" . }} + {{ if not $orderByWeight }} + {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} + {{ range .Pages }} + {{ partial "article-link/card.html" . }} + {{ end }} + {{ end }} + {{ else }} + {{ range (.Paginate (.Pages.ByWeight)).Pages }} + {{ partial "article-link/card.html" . }} + {{ end }} {{ end }} - {{ end }} - {{ else }} - {{ range (.Paginate (.Pages.ByWeight)).Pages }} - {{ partial "article-link/card.html" . }} - {{ end }} - {{ end }} -
- {{ if $cardViewScreenWidth }} -
+ {{ end }} {{ end }} From 80927fb37a30bf64ddece30acb8b61d387d17b98 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Wed, 16 Jul 2025 14:48:41 +0800 Subject: [PATCH 32/89] style(list.html): prettier format --- layouts/_default/list.html | 212 ++++++++++++++++++++----------------- 1 file changed, 113 insertions(+), 99 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 18d60f54..a6df0714 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -25,125 +25,139 @@ {{ $lang := print "." .Lang ".md" }} {{ $path = replace $path $lang ".md" }} {{ end }} - {{ $jsPage := resources.Get "js/page.js" }} - {{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }} - + {{ $jsPage := resources.Get "js/page.js" }} + {{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }} + {{ end }} -
- {{ if $toc }} +
+ {{ if $toc }}
-
+
{{ partial "toc.html" . }}
- {{ end }} -
- {{ .Content }} -
-
+ {{ end }} +
+ {{ .Content }} +
+
- {{ if gt .Pages 0 }} - {{ $cardView := .Params.cardView | default (.Site.Params.list.cardView | default false) }} - {{ $cardViewScreenWidth := .Params.cardViewScreenWidth | default (.Site.Params.list.cardViewScreenWidth | default false) }} - {{ $groupByYear := .Params.groupByYear | default ($.Site.Params.list.groupByYear | default false) }} - {{ $orderByWeight := .Params.orderByWeight | default ($.Site.Params.list.orderByWeight | default false) }} - {{ $groupByYear := and (not $orderByWeight) $groupByYear }} + {{ if gt .Pages 0 }} + {{ $cardView := .Params.cardView | default (.Site.Params.list.cardView | default false) }} + {{ $cardViewScreenWidth := .Params.cardViewScreenWidth | default (.Site.Params.list.cardViewScreenWidth | default false) }} + {{ $groupByYear := .Params.groupByYear | default ($.Site.Params.list.groupByYear | default false) }} + {{ $orderByWeight := .Params.orderByWeight | default ($.Site.Params.list.orderByWeight | default false) }} + {{ $groupByYear := and (not $orderByWeight) $groupByYear }} - {{ if not $cardView }} -
- {{ if not $orderByWeight }} - {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} - {{ if $groupByYear }} -

- {{ .Key }} -

- {{ end }} - {{ range .Pages }} - {{ partial "article-link/simple.html" . }} - {{ end }} + {{ if not $cardView }} +
+ {{ if not $orderByWeight }} + {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} + {{ if $groupByYear }} +

+ {{ .Key }} +

{{ end }} - {{ else }} - {{ range (.Paginate (.Pages.ByWeight)).Pages }} + {{ range .Pages }} {{ partial "article-link/simple.html" . }} {{ end }} {{ end }} -
- {{ else }} + {{ range (.Paginate (.Pages.ByWeight)).Pages }} + {{ partial "article-link/simple.html" . }} + {{ end }} + {{ end }} +
+ {{ else }} - {{ if $groupByYear }} - {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} - {{ if $cardViewScreenWidth }} -
-

- {{ .Key }} -

-
- {{ range .Pages }} - {{ partial "article-link/card.html" . }} - {{ end }} -
-
- {{ else }} -

- {{ .Key }} -

-
+ {{ if $groupByYear }} + {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} + {{ if $cardViewScreenWidth }} +
+

+ {{ .Key }} +

+
+ {{ range .Pages }} + {{ partial "article-link/card.html" . }} + {{ end }} +
+
+ {{ else }} +

+ {{ .Key }} +

+
+ {{ range .Pages }} + {{ partial "article-link/card.html" . }} + {{ end }} +
+ {{ end }} + {{ end }} + + {{ else }} + {{ if $cardViewScreenWidth }} +
+
+ {{ if not $orderByWeight }} + {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} {{ range .Pages }} {{ partial "article-link/card.html" . }} {{ end }} -
+ {{ end }} + {{ else }} + {{ range (.Paginate (.Pages.ByWeight)).Pages }} + {{ partial "article-link/card.html" . }} + {{ end }} + {{ end }} +
+
+ {{ else }} +
+ {{ if not $orderByWeight }} + {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} + {{ range .Pages }} + {{ partial "article-link/card.html" . }} + {{ end }} + {{ end }} + {{ else }} + {{ range (.Paginate (.Pages.ByWeight)).Pages }} + {{ partial "article-link/card.html" . }} {{ end }} {{ end }} - - {{ else }} - - {{ if $cardViewScreenWidth }} -
-
- {{ if not $orderByWeight }} - {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} - {{ range .Pages }} - {{ partial "article-link/card.html" . }} - {{ end }} - {{ end }} - {{ else }} - {{ range (.Paginate (.Pages.ByWeight)).Pages }} - {{ partial "article-link/card.html" . }} - {{ end }} - {{ end }} -
-
- {{ else }} -
- {{ if not $orderByWeight }} - {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} - {{ range .Pages }} - {{ partial "article-link/card.html" . }} - {{ end }} - {{ end }} - {{ else }} - {{ range (.Paginate (.Pages.ByWeight)).Pages }} - {{ partial "article-link/card.html" . }} - {{ end }} - {{ end }} -
- {{ end }} - {{ end }} - +
+ {{ end }} {{ end }} - {{ else }} -
-

- {{ i18n "list.no_articles" | emojify }} -

-
+ {{ end }} + {{ else }} +
+

+ {{ i18n "list.no_articles" | emojify }} +

+
+ {{ end }} {{ partial "pagination.html" . }} {{ end }} From c8265de81335a10ac15dded9e2229083d36e6b10 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Wed, 16 Jul 2025 14:51:34 +0800 Subject: [PATCH 33/89] refactor(list.html): use intermediate variable for complex condition --- layouts/_default/list.html | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index a6df0714..117c8045 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -9,7 +9,8 @@ {{ end }} {{- end -}} - {{ $toc := and (.Params.showTableOfContents | default (.Site.Params.list.showTableOfContents | default false)) (in .TableOfContents " {{ if .Params.showBreadcrumbs | default (.Site.Params.list.showBreadcrumbs | default false) }} {{ partial "breadcrumbs.html" . }} @@ -35,20 +36,12 @@ data-oid-likes="likes_{{ $path }}"> {{ end }} -
+ {{ $tocMargin := cond $toc "mt-12" "mt-0" -}} + {{ $topClass := cond (hasPrefix .Site.Params.header.layout "fixed") "lg:top-[140px]" "lg:top-10" }} +
{{ if $toc }}
-
+
{{ partial "toc.html" . }}
@@ -94,9 +87,7 @@ {{ .Key }}
+ class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5"> {{ range .Pages }} {{ partial "article-link/card.html" . }} {{ end }} @@ -107,9 +98,7 @@ {{ .Key }}
+ class="w-full grid gap-4 sm:grid-cols-2 md:grid-cols-3"> {{ range .Pages }} {{ partial "article-link/card.html" . }} {{ end }} From c362f4a488b6ad85e8f3cb4902ec0f26f2ca3a29 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Thu, 17 Jul 2025 21:21:30 +0800 Subject: [PATCH 34/89] style(list.html): add proper code comments --- layouts/_default/list.html | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 117c8045..c6a50e77 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,5 +1,9 @@ {{ define "main" }} {{ .Scratch.Set "scope" "list" }} + {{ $enableToc := .Params.showTableOfContents | default (.Site.Params.list.showTableOfContents | default false) }} + {{ $showToc := and $enableToc (in .TableOfContents " {{ if .Params.showBreadcrumbs | default (.Site.Params.list.showBreadcrumbs | default false) }} {{ partial "breadcrumbs.html" . }} @@ -36,10 +39,12 @@ data-oid-likes="likes_{{ $path }}"> {{ end }} - {{ $tocMargin := cond $toc "mt-12" "mt-0" -}} + + {{/* Description (markdown content) */}} + {{ $tocMargin := cond $showToc "mt-12" "mt-0" }} {{ $topClass := cond (hasPrefix .Site.Params.header.layout "fixed") "lg:top-[140px]" "lg:top-10" }}
- {{ if $toc }} + {{ if $showToc }}
{{ partial "toc.html" . }} @@ -51,6 +56,7 @@
+ {{/* Article Grid */}} {{ if gt .Pages 0 }} {{ $cardView := .Params.cardView | default (.Site.Params.list.cardView | default false) }} {{ $cardViewScreenWidth := .Params.cardViewScreenWidth | default (.Site.Params.list.cardViewScreenWidth | default false) }} @@ -77,8 +83,8 @@ {{ end }} {{ end }}
+ {{/* else: is cardView */}} {{ else }} - {{ if $groupByYear }} {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} {{ if $cardViewScreenWidth }} @@ -86,8 +92,7 @@

{{ .Key }}

-
+
{{ range .Pages }} {{ partial "article-link/card.html" . }} {{ end }} @@ -97,8 +102,7 @@

{{ .Key }}

-
+
{{ range .Pages }} {{ partial "article-link/card.html" . }} {{ end }} @@ -106,6 +110,7 @@ {{ end }} {{ end }} + {{/* else: not groupByYear */}} {{ else }} {{ if $cardViewScreenWidth }}
@@ -137,10 +142,10 @@ {{ end }} {{ end }}
- {{ end }} - {{ end }} - - {{ end }} + {{ end }}{{/* End of cardViewScreenWidth */}} + {{ end }}{{/* End of groupByYear */}} + {{ end }}{{/* End of cardView */}} + {{/* else: .Pages not greater to zero */}} {{ else }}

From bda68f96a8b6c7813bfb19468fc9d4dec29c373c Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Thu, 17 Jul 2025 21:37:27 +0800 Subject: [PATCH 35/89] style(baseof.html): manually format --- layouts/_default/baseof.html | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 0b71d2ce..3f037b8a 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -17,11 +17,10 @@

{{ i18n - "nav.skip_to_main" - }} + href="#main-content"> + + {{ i18n "nav.skip_to_main" }} +
{{ $header := print "header/" .Site.Params.header.layout ".html" }} {{ if templates.Exists ( printf "partials/%s" $header ) }} From 8930731ccc6cbdc12a636e07a0e4642a24f0c372 Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Thu, 17 Jul 2025 20:38:51 +0800 Subject: [PATCH 36/89] refactor(single.html): modularize author and fix the multilingual link when author is at bottom --- layouts/_default/single.html | 108 +++++++++++++++-------------------- 1 file changed, 45 insertions(+), 63 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index d9378bb2..0487403c 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -26,48 +26,8 @@ {{ partial "article-meta/basic.html" (dict "context" . "scope" "single") }}
- {{ $authorsData := .Site.Data.authors }} - {{ $taxonomies := .Site.Taxonomies.authors }} - {{ $baseURL := .Site.BaseURL }} - {{ $taxonomyLink := 0 }} - {{ $showAuthor := 0 }} - - {{ if not (strings.HasSuffix $baseURL "/") }} - {{ $baseURL = delimit (slice $baseURL "/") "" }} - {{ end }} - {{ if not (.Params.showAuthorBottom | default ( .Site.Params.article.showAuthorBottom | default false)) }} - - {{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }} - {{ $showAuthor = 1 }} - {{ partial "author.html" . }} - {{ end }} - - {{ range $author := .Page.Params.authors }} - {{ $authorData := index $authorsData $author }} - {{- if $authorData -}} - {{ range $taxonomyname, $taxonomy := $taxonomies }} - {{ if (eq $taxonomyname $author) }} - {{ $taxonomyLink = delimit (slice $baseURL "authors/" $author "/") "" }} - {{ end }} - {{ end }} - - {{ $finalLink := $taxonomyLink }} - {{ $currentLang := $.Site.Language.Lang }} - {{ if eq $.Site.LanguagePrefix "" }} - {{ $finalLink = printf "%sauthors/%s/" $baseURL $author }} - {{ else }} - {{ $finalLink = printf "%s%s/authors/%s/" $baseURL $currentLang $author }} - {{ end }} - - {{ partial "author-extra.html" (dict "context" . "data" $authorData "link" $finalLink) }} - {{- end -}} - {{ end }} - - {{ if or $taxonomyLink $showAuthor }} -
- {{ end }} - + {{ template "SingleAuthor" . }} {{ end }} @@ -120,28 +80,7 @@
{{ if (.Params.showAuthorBottom | default ( .Site.Params.article.showAuthorBottom | default false)) }} - - {{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }} - {{ $showAuthor = 1 }} - {{ partial "author.html" . }} - {{ end }} - - {{ range $author := .Page.Params.authors }} - {{ $authorData := index $authorsData $author }} - {{- if $authorData -}} - {{ range $taxonomyname, $taxonomy := $taxonomies }} - {{ if (eq $taxonomyname $author) }} - {{ $taxonomyLink = delimit (slice $baseURL "authors/" $author "/") "" }} - {{ end }} - {{ end }} - {{ partial "author-extra.html" (dict "context" . "data" $authorData "link" $taxonomyLink) }} - {{- end -}} - {{ end }} - - {{ if or $taxonomyLink $showAuthor }} -
- {{ end }} - + {{ template "SingleAuthor" . }} {{ end }} {{ partial "series/series-closed.html" . }} @@ -184,3 +123,46 @@ {{ end }} + +{{ define "SingleAuthor" }} + {{ $authorsData := .Site.Data.authors }} + {{ $taxonomies := .Site.Taxonomies.authors }} + {{ $baseURL := .Site.BaseURL }} + {{ $taxonomyLink := 0 }} + {{ $showAuthor := 0 }} + {{ $isAuthorBottom := (.Params.showAuthorBottom | default ( .Site.Params.article.showAuthorBottom | default false)) }} + + {{ if not (strings.HasSuffix $baseURL "/") }} + {{ $baseURL = delimit (slice $baseURL "/") "" }} + {{ end }} + + {{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }} + {{ $showAuthor = 1 }} + {{ partial "author.html" . }} + {{ end }} + + {{ range $author := .Page.Params.authors }} + {{ $authorData := index $authorsData $author }} + {{- if $authorData -}} + {{ range $taxonomyname, $taxonomy := $taxonomies }} + {{ if (eq $taxonomyname $author) }} + {{ $taxonomyLink = delimit (slice $baseURL "authors/" $author "/") "" }} + {{ end }} + {{ end }} + + {{ $finalLink := $taxonomyLink }} + {{ $currentLang := $.Site.Language.Lang }} + {{ if eq $.Site.LanguagePrefix "" }} + {{ $finalLink = printf "%sauthors/%s/" $baseURL $author }} + {{ else }} + {{ $finalLink = printf "%s%s/authors/%s/" $baseURL $currentLang $author }} + {{ end }} + + {{ partial "author-extra.html" (dict "context" . "data" $authorData "link" $finalLink) }} + {{- end -}} + {{ end }} + + {{ if or $taxonomyLink $showAuthor }} +
+ {{ end }} +{{ end }} From c4e658057eecb4d3547c60eea27611582717c89d Mon Sep 17 00:00:00 2001 From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com> Date: Thu, 17 Jul 2025 21:50:39 +0800 Subject: [PATCH 37/89] refactor: polish base templates - use intermediate variable for complex condition - replace .Site with global function site --- layouts/_default/baseof.html | 24 ++++++------ layouts/_default/list.html | 20 +++++----- layouts/_default/single.html | 72 +++++++++++++++--------------------- layouts/_default/term.html | 19 ++++------ layouts/_default/terms.html | 14 +++---- 5 files changed, 64 insertions(+), 85 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 3f037b8a..b746f93e 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,14 +1,14 @@ + data-default-appearance="{{ site.Params.defaultAppearance | default " light" }}" + data-auto-appearance="{{ site.Params.autoSwitchAppearance | default " true" }}"> {{- partial "head.html" . -}} @@ -22,7 +22,7 @@ {{ i18n "nav.skip_to_main" }} - {{ $header := print "header/" .Site.Params.header.layout ".html" }} + {{ $header := print "header/" site.Params.header.layout ".html" }} {{ if templates.Exists ( printf "partials/%s" $header ) }} {{ partial $header . }} {{ else }} @@ -31,26 +31,26 @@
{{ block "main" . }}{{ end }} - {{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 1) }} + {{ if and (site.Params.footer.showScrollToTop | default true) (gt .WordCount 1) }} {{- partial "scroll-to-top.html" . -}} {{ end }}
{{- partial "footer.html" . -}} - {{ if .Site.Params.enableSearch | default false }} + {{ if site.Params.enableSearch | default false }} {{- partial "search.html" . -}} {{ end }}
- {{ if .Site.Params.buymeacoffee.globalWidget | default false }} + {{ if site.Params.buymeacoffee.globalWidget | default false }} {{ end }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index c6a50e77..10d78f1a 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,11 +1,11 @@ {{ define "main" }} {{ .Scratch.Set "scope" "list" }} - {{ $enableToc := .Params.showTableOfContents | default (.Site.Params.list.showTableOfContents | default false) }} + {{ $enableToc := .Params.showTableOfContents | default (site.Params.list.showTableOfContents | default false) }} {{ $showToc := and $enableToc (in .TableOfContents " - {{ if .Params.showBreadcrumbs | default (.Site.Params.list.showBreadcrumbs | default false) }} + {{ if .Params.showBreadcrumbs | default (site.Params.list.showBreadcrumbs | default false) }} {{ partial "breadcrumbs.html" . }} {{ end }}

{{ .Title }}

@@ -30,7 +30,7 @@ {{ $path = replace $path $lang ".md" }} {{ end }} {{ $jsPage := resources.Get "js/page.js" }} - {{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }} + {{ $jsPage = $jsPage | resources.Minify | resources.Fingerprint (site.Params.fingerprintAlgorithm | default "sha512") }} {{ end }} - + + {{/* Footer */}}