diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml index 8069e6b7..928b4cda 100644 --- a/exampleSite/config/_default/params.toml +++ b/exampleSite/config/_default/params.toml @@ -48,6 +48,7 @@ smartTOCHideUnfocusedChildren = false cardView = true cardViewScreenWidth = false layoutBackgroundBlur = true # only used when layout equals background + disableHeroImageFilter = false # only used when layout equals hero [article] showDate = false diff --git a/exampleSite/content/docs/configuration/index.it.md b/exampleSite/content/docs/configuration/index.it.md index 4da3babd..a2c91dee 100644 --- a/exampleSite/content/docs/configuration/index.it.md +++ b/exampleSite/content/docs/configuration/index.it.md @@ -214,6 +214,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | `homepage.cardView` | `false` | Display recent articles as a gallery of cards. | | `homepage.cardViewScreenWidth` | `false` | Enhance the width of the recent articles card gallery to take the full width available. | | `homepage.layoutBackgroundBlur` | `false` | Makes the background image in the homepage layout blur with the scroll | +| `homepage.disableHeroImageFilter` | `false` | Whether to apply an image filter on the homepage background. | ### Article diff --git a/exampleSite/content/docs/configuration/index.ja.md b/exampleSite/content/docs/configuration/index.ja.md index 0630f6f4..e28b8ba0 100644 --- a/exampleSite/content/docs/configuration/index.ja.md +++ b/exampleSite/content/docs/configuration/index.ja.md @@ -214,6 +214,7 @@ Blowfish は、テーマの機能を制御する多数の設定パラメータ | `homepage.cardView` | `false` | 最近の記事をカードのギャラリーとして表示します。 | | `homepage.cardViewScreenWidth` | `false` | 最近の記事カードギャラリーの幅を拡張して、利用可能な幅全体を使用します。 | | `homepage.layoutBackgroundBlur` | `false` | ホームページレイアウトの背景画像をスクロールに合わせてぼかします。 | +| `homepage.disableHeroImageFilter` | `false` | ホームページの背景画像にフィルターを適用するかどうか。 | ### 記事(Article) diff --git a/exampleSite/content/docs/configuration/index.md b/exampleSite/content/docs/configuration/index.md index 6cc76234..16d19be4 100644 --- a/exampleSite/content/docs/configuration/index.md +++ b/exampleSite/content/docs/configuration/index.md @@ -220,6 +220,7 @@ Many of the article defaults here can be overridden on a per article basis by sp | `homepage.cardView` | `false` | Display recent articles as a gallery of cards. | | `homepage.cardViewScreenWidth` | `false` | Enhance the width of the recent articles card gallery to take the full width available. | | `homepage.layoutBackgroundBlur` | `false` | Makes the background image in the homepage layout blur with the scroll | +| `homepage.disableHeroImageFilter` | `false` | Whether to apply an image filter on the homepage background. | ### Article diff --git a/exampleSite/content/docs/configuration/index.zh-cn.md b/exampleSite/content/docs/configuration/index.zh-cn.md index 12510ba5..eca35f9e 100644 --- a/exampleSite/content/docs/configuration/index.zh-cn.md +++ b/exampleSite/content/docs/configuration/index.zh-cn.md @@ -218,6 +218,7 @@ Blowfish 提供了大量控制主题功能的配置参数,下面的表格中 | `homepage.cardView` | `false` | 将列表展示为卡片容器。 | | `homepage.cardViewScreenWidth` | `false` | 增强列表中卡片的宽度,使其可以占据可用的全部宽度。 | | `homepage.layoutBackgroundBlur` | `false` | 向下滚动主页时,是否模糊背景图。 | +| `homepage.disableHeroImageFilter` | `false` | 主页背景是否套用图片滤镜。 | ### 文章页 diff --git a/layouts/partials/home/hero.html b/layouts/partials/home/hero.html index aa6ea0e2..735f8196 100644 --- a/layouts/partials/home/hero.html +++ b/layouts/partials/home/hero.html @@ -1,4 +1,5 @@ {{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }} +{{ $disableHeroImageFilter := .Site.Params.homepage.disableHeroImageFilter | default false }}
@@ -22,9 +23,15 @@ {{ end }} {{ if $homepageImage }} -
-
+ {{ if not $disableHeroImageFilter }} +
+
+ {{ else }} +
+
+ {{ end }} {{ end }}
@@ -43,22 +50,39 @@ alt="{{ $.Site.Params.Author.name | default " Author" }}" src="{{ $authorImage.RelPermalink }}" /> {{ end }} {{ end }} -

- {{ .Site.Params.Author.name | default .Site.Title }} -

- {{ with .Site.Params.Author.headline }} -

- {{ . | markdownify }} -

+ {{ if not $disableHeroImageFilter }} +

+ {{ .Site.Params.Author.name | default .Site.Title }} +

+ {{ with .Site.Params.Author.headline }} +

+ {{ . | markdownify }} +

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

+ {{ .Site.Params.Author.name | default .Site.Title }} +

+ {{ with .Site.Params.Author.headline }} +

+ {{ . | markdownify }} +

+ {{ end }} {{ end }}
{{ with .Site.Params.Author.links }}
{{ range $links := . }} {{ range $name, $url := $links }} - {{ partial "icon.html" $name }} + {{ else }} + {{ partial + "icon.html" $name }} + {{ end }} {{ end }} {{ end }}