mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-11-16 16:05:52 +00:00
Properly implement layoutBackgroundBlur and layoutBackgroundHeaderSpace in term and taxonomy
This commit is contained in:
6 files changed
+24
-10
No files matched your search
@@ -119,6 +119,8 @@ forgejoDefaultServer = "https://v11.next.forgejo.org"
|
|||||||
showTermCount = true
|
showTermCount = true
|
||||||
showHero = false
|
showHero = false
|
||||||
# heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
# heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
||||||
|
layoutBackgroundBlur = true # only used when heroStyle equals background or thumbAndBackground
|
||||||
|
layoutBackgroundHeaderSpace = true # only used when heroStyle equals background
|
||||||
showBreadcrumbs = false
|
showBreadcrumbs = false
|
||||||
showViews = false
|
showViews = false
|
||||||
showLikes = false
|
showLikes = false
|
||||||
@@ -128,6 +130,8 @@ forgejoDefaultServer = "https://v11.next.forgejo.org"
|
|||||||
[term]
|
[term]
|
||||||
showHero = false
|
showHero = false
|
||||||
# heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
# heroStyle = "background" # valid options: basic, big, background, thumbAndBackground
|
||||||
|
layoutBackgroundBlur = true # only used when heroStyle equals background or thumbAndBackground
|
||||||
|
layoutBackgroundHeaderSpace = true # only used when heroStyle equals background
|
||||||
showBreadcrumbs = false
|
showBreadcrumbs = false
|
||||||
showViews = false
|
showViews = false
|
||||||
showLikes = false
|
showLikes = false
|
||||||
|
|||||||
@@ -303,6 +303,8 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||||||
| `taxonomy.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each taxonomy page. |
|
| `taxonomy.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each taxonomy page. |
|
||||||
| `taxonomy.heroStyle` | _Not set_ | Style to display the hero image, valid options are: `basic`, `big`, `background`, `thumbAndBackground`. Effective only if `taxonomy.showHero = true`. |
|
| `taxonomy.heroStyle` | _Not set_ | Style to display the hero image, valid options are: `basic`, `big`, `background`, `thumbAndBackground`. Effective only if `taxonomy.showHero = true`. |
|
||||||
| `taxonomy.showBreadcrumbs` | `false` | Whether or not breadcrumbs are displayed in the taxonomy header. |
|
| `taxonomy.showBreadcrumbs` | `false` | Whether or not breadcrumbs are displayed in the taxonomy header. |
|
||||||
|
| `taxonomy.layoutBackgroundBlur` | `true` | Makes the background image in the background taxonomy heroStyle blur with the scroll |
|
||||||
|
| `taxonomy.layoutBackgroundHeaderSpace` | `true` | Add space between the header and the body. |
|
||||||
| `taxonomy.showViews` | `false` | Whether or not article views are displayed. This requires firebase integrations to be enabled, look below. |
|
| `taxonomy.showViews` | `false` | Whether or not article views are displayed. This requires firebase integrations to be enabled, look below. |
|
||||||
| `taxonomy.showLikes` | `false` | Whether or not article likes are displayed. This requires firebase integrations to be enabled, look below. |
|
| `taxonomy.showLikes` | `false` | Whether or not article likes are displayed. This requires firebase integrations to be enabled, look below. |
|
||||||
| `taxonomy.showTableOfContents` | `false` | Whether or not the table of contents is displayed on taxonomies. |
|
| `taxonomy.showTableOfContents` | `false` | Whether or not the table of contents is displayed on taxonomies. |
|
||||||
@@ -315,6 +317,8 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||||||
| `term.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each term page. |
|
| `term.showHero` | `false` | Whether the thumbnail image will be shown as a hero image within each term page. |
|
||||||
| `term.heroStyle` | _Not set_ | Style to display the hero image, valid options are: `basic`, `big`, `background`, `thumbAndBackground`. Effective only if `term.showHero = true`. |
|
| `term.heroStyle` | _Not set_ | Style to display the hero image, valid options are: `basic`, `big`, `background`, `thumbAndBackground`. Effective only if `term.showHero = true`. |
|
||||||
| `term.showBreadcrumbs` | `false` | Whether or not breadcrumbs are displayed in the term header. |
|
| `term.showBreadcrumbs` | `false` | Whether or not breadcrumbs are displayed in the term header. |
|
||||||
|
| `term.layoutBackgroundBlur` | `true` | Makes the background image in the background term heroStyle blur with the scroll |
|
||||||
|
| `term.layoutBackgroundHeaderSpace` | `true` | Add space between the header and the body. |
|
||||||
| `term.showViews` | `false` | Whether or not article views are displayed. This requires firebase integrations to be enabled, look below. |
|
| `term.showViews` | `false` | Whether or not article views are displayed. This requires firebase integrations to be enabled, look below. |
|
||||||
| `term.showLikes` | `false` | Whether or not article likes are displayed. This requires firebase integrations to be enabled, look below. |
|
| `term.showLikes` | `false` | Whether or not article likes are displayed. This requires firebase integrations to be enabled, look below. |
|
||||||
| `term.showTableOfContents` | `false` | Whether or not the table of contents is displayed on terms. |
|
| `term.showTableOfContents` | `false` | Whether or not the table of contents is displayed on terms. |
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ .Scratch.Set "scope" "list" }}
|
{{ .Scratch.Set "scope" "term" }}
|
||||||
{{ $showHero := .Params.showHero | default site.Params.term.showHero | default false }}
|
{{ $showHero := .Params.showHero | default site.Params.term.showHero | default false }}
|
||||||
{{ if $showHero }}
|
{{ if $showHero }}
|
||||||
{{ $heroStyle := print "hero/" site.Params.term.heroStyle ".html" }}
|
{{ $heroStyle := print "hero/" site.Params.term.heroStyle ".html" }}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ .Scratch.Set "scope" "list" }}
|
{{ .Scratch.Set "scope" "terms" }}
|
||||||
{{ $showHero := .Params.showHero | default site.Params.taxonomy.showHero | default false }}
|
{{ $showHero := .Params.showHero | default site.Params.taxonomy.showHero | default false }}
|
||||||
{{ if $showHero }}
|
{{ if $showHero }}
|
||||||
{{ $heroStyle := print "hero/" site.Params.taxonomy.heroStyle ".html" }}
|
{{ $heroStyle := print "hero/" site.Params.taxonomy.heroStyle ".html" }}
|
||||||
|
|||||||
@@ -44,15 +44,19 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ $isParentList := eq (.Scratch.Get "scope") "list" }}
|
{{ $scope := .Scratch.Get "scope" }}
|
||||||
{{ $shouldBlur := $.Params.layoutBackgroundBlur | default (or
|
{{ $shouldBlur := $.Params.layoutBackgroundBlur | default (or
|
||||||
(and ($.Site.Params.article.layoutBackgroundBlur | default true) (not $isParentList))
|
(and ($.Site.Params.article.layoutBackgroundBlur | default true) (eq $scope "single"))
|
||||||
(and ($.Site.Params.list.layoutBackgroundBlur | default true) ($isParentList))
|
(and ($.Site.Params.list.layoutBackgroundBlur | default true) (eq $scope "list"))
|
||||||
|
(and ($.Site.Params.taxonomy.layoutBackgroundBlur | default true) (eq $scope "terms"))
|
||||||
|
(and ($.Site.Params.term.layoutBackgroundBlur | default true) (eq $scope "term"))
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
{{ $shouldAddHeaderSpace := $.Params.layoutBackgroundHeaderSpace | default (or
|
{{ $shouldAddHeaderSpace := $.Params.layoutBackgroundHeaderSpace | default (or
|
||||||
(and ($.Site.Params.article.layoutBackgroundHeaderSpace | default true) (not $isParentList))
|
(and ($.Site.Params.article.layoutBackgroundHeaderSpace | default true) (eq $scope "single"))
|
||||||
(and ($.Site.Params.list.layoutBackgroundHeaderSpace | default true) ($isParentList))
|
(and ($.Site.Params.list.layoutBackgroundHeaderSpace | default true) (eq $scope "list"))
|
||||||
|
(and ($.Site.Params.taxonomy.layoutBackgroundHeaderSpace | default true) (eq $scope "terms"))
|
||||||
|
(and ($.Site.Params.term.layoutBackgroundHeaderSpace | default true) (eq $scope "term"))
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|||||||
@@ -76,10 +76,12 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ $isParentList := eq (.Scratch.Get "scope") "list" }}
|
{{ $scope := .Scratch.Get "scope" }}
|
||||||
{{ $shouldBlur := $.Params.layoutBackgroundBlur | default (or
|
{{ $shouldBlur := $.Params.layoutBackgroundBlur | default (or
|
||||||
(and ($.Site.Params.article.layoutBackgroundBlur | default true) (not $isParentList))
|
(and ($.Site.Params.article.layoutBackgroundBlur | default true) (eq $scope "single"))
|
||||||
(and ($.Site.Params.list.layoutBackgroundBlur | default true) ($isParentList))
|
(and ($.Site.Params.list.layoutBackgroundBlur | default true) (eq $scope "list"))
|
||||||
|
(and ($.Site.Params.taxonomy.layoutBackgroundBlur | default true) (eq $scope "terms"))
|
||||||
|
(and ($.Site.Params.term.layoutBackgroundBlur | default true) (eq $scope "term"))
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user