mirror of
https://github.com/nikdoof/website-hugo.git
synced 2025-12-14 22:12:23 +00:00
Updated for image size problem
bimage short code and index.md updated
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
{{ $width := .Get "width" }}
|
||||
{{ $height := .Get "height" }}
|
||||
{{ $zone := .Get "zone" }}
|
||||
{{ $img = $img.Resize (print (default "1264x" $width) " webp") }}
|
||||
{{ $title := .Get "title" }}
|
||||
{{ $class := .Get "class" }}
|
||||
{{- with .Parent -}}
|
||||
@@ -10,7 +9,7 @@
|
||||
{{ end }}
|
||||
<div style="display: block; margin-left: auto; margin-right: auto; width: {{ $zone }}%;">
|
||||
<figure class="image{{ if $class }} {{ $class }}{{ end }}">
|
||||
<img src="{{ $img.RelPermalink }}" width="{{ $width }}" height="{{ $height }}" {{ if $title }}
|
||||
<img src="{{ $img.RelPermalink }}" width="{{ $width }}px" height="{{ $height }}px" {{ if $title }}
|
||||
alt="{{ $title }}" {{ end }}>
|
||||
{{ if $title }}
|
||||
<figcaption class="is-size-6">
|
||||
|
||||
Reference in New Issue
Block a user