mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-22 14:35:43 -06:00
✨ add parameter backgroundImageWidth + english documentation
This commit is contained in:
parent
b755978bae
commit
090fd09ccf
6 changed files with 7 additions and 5 deletions
|
@ -17,6 +17,7 @@ enableCodeCopy = false
|
|||
|
||||
disableImageOptimization = false
|
||||
disableTextInHeader = false
|
||||
# backgroundImageWidth = 1200
|
||||
|
||||
# defaultBackgroundImage = "IMAGE.jpg" # used as default for background images
|
||||
# defaultFeaturedImage = "IMAGE.jpg" # used as default for featured images in all articles
|
||||
|
|
|
@ -176,6 +176,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||
| `robots` | _Not set_ | String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values. |
|
||||
| `disableImageZoom` | `false` | Disables image zoom feature across all the images in the site. |
|
||||
| `disableImageOptimization` | `false` | Disables image resize and optimization features across all the images in the site. |
|
||||
| `backgroundImageWidth` | `1200` | Width (in pixels) to scale background images to. |
|
||||
| `disableTextInHeader` | `false` | Disables text in header, useful for logo based headers. |
|
||||
| `defaultBackgroundImage` | _Not set_ | Default background image for both `background` homepage layout and `background` hero style |
|
||||
| `defaultFeaturedImage` | _Not set_ | Default background image for all `featured` images across articles, will be overridden by a local `featured` image. |
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
style="background-image:url({{ .RelPermalink }});">
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize "1200x" }}
|
||||
{{ with .Resize (print (default "1200" $.Site.Params.backgroundImageWidth) "x") }}
|
||||
<div class="fixed inset-x-0 top-0 h-[800px] single_hero_background nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});">
|
||||
{{ end }}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<div class="w-full h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize "1200x" }}
|
||||
{{ with .Resize (print (default "1200" $.Site.Params.backgroundImageWidth) "x") }}
|
||||
<div class="w-full h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
</figure>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize "1200x" }}
|
||||
{{ with .Resize (print (default "1200" $.Site.Params.backgroundImageWidth) "x") }}
|
||||
<figure>
|
||||
<img class="w-full rounded-lg single_hero_round nozoom" alt="{{ $alt }}" width="{{ .Width }}" height="{{ .Height }}" src="{{ .RelPermalink }}">
|
||||
{{ if $caption }}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<div class="w-full rounded-md h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize "1200x" }}
|
||||
{{ with .Resize (print (default "1200" $.Site.Params.backgroundImageWidth) "x") }}
|
||||
<div class="w-full rounded-md h-36 md:h-56 lg:h-72 single_hero_basic nozoom" style="background-image:url({{ .RelPermalink }});"></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
@ -44,7 +44,7 @@
|
|||
</div>
|
||||
</div>{{ end }}
|
||||
{{ else }}
|
||||
{{ with .Resize "1200x" }}
|
||||
{{ with .Resize (print (default "1200" $.Site.Params.backgroundImageWidth) "x") }}
|
||||
<div class="fixed inset-x-0 top-0 h-[800px] single_hero_background nozoom"
|
||||
style="background-image:url({{ .RelPermalink }});">
|
||||
<div class="absolute inset-0 bg-gradient-to-t from-neutral dark:from-neutral-800 to-transparent mix-blend-normal">
|
||||
|
|
Loading…
Reference in a new issue