mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-22 22:45:42 -06:00
Merge pull request #339 from nunocoracao/336-bug-image-zoom-level-too-low
🐛 Image zoom level too low
This commit is contained in:
commit
3e7df21899
4 changed files with 15 additions and 1 deletions
|
@ -15,7 +15,9 @@ enableCodeCopy = true
|
|||
# mainSections = ["section1", "section2"]
|
||||
# robots = ""
|
||||
|
||||
#defaultBackgroundImage = "IMAGE.jpg" # used as default for background images
|
||||
# disableImageOptimization = false
|
||||
|
||||
# defaultBackgroundImage = "IMAGE.jpg" # used as default for background images
|
||||
|
||||
[header]
|
||||
layout = "basic" # valid options: basic, fixed
|
||||
|
|
|
@ -15,6 +15,8 @@ enableCodeCopy = true
|
|||
mainSections = ["docs"]
|
||||
# robots = ""
|
||||
|
||||
disableImageOptimization = false
|
||||
|
||||
defaultBackgroundImage = "/img/iceland.jpg"
|
||||
|
||||
[header]
|
||||
|
|
|
@ -137,6 +137,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||
| `showLikes` | _Not set_ | Whether or not articles and list likes are displayed. This requires firebase integrations to be enabled, look below. |
|
||||
| `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. |
|
||||
| `defaultBackgroundImage` | _Not set_ | Default background image for both `background` homepage layout and `background` hero style |
|
||||
| `header.layout` | `"basic"` | Defines the header for the entire site, supported values are `basic` and `fixed`. |
|
||||
| `footer.showMenu` | `true` | Show/hide the footer menu, which can be configured in the `[[footer]]` section of the `config/_default/menus.en.toml` file. |
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
|
||||
{{ if .Get "default" }}
|
||||
{{ template "_internal/shortcodes/figure.html" . }}
|
||||
{{ else }}
|
||||
|
@ -21,6 +22,13 @@
|
|||
{{ with $resource }}
|
||||
<figure {{ with $class }}class="{{ . }}"{{ end }}>
|
||||
{{ with $href }}<a href="{{ . }}">{{ end }}
|
||||
{{ if $disableImageOptimization }}
|
||||
<img
|
||||
class="my-0 rounded-md"
|
||||
src="{{ .RelPermalink }}"
|
||||
alt="{{ $altText }}"
|
||||
/>
|
||||
{{ else }}
|
||||
<img
|
||||
class="my-0 rounded-md"
|
||||
srcset="
|
||||
|
@ -31,6 +39,7 @@
|
|||
src="{{ (.Resize "660x").RelPermalink }}"
|
||||
alt="{{ $altText }}"
|
||||
/>
|
||||
{{ end }}
|
||||
{{ if $href }}</a>{{ end }}
|
||||
{{ with $caption }}<figcaption>{{ . | markdownify }}</figcaption>{{ end }}
|
||||
</figure>
|
||||
|
|
Loading…
Reference in a new issue