mirror of
https://github.com/nikdoof/website-hugo.git
synced 2025-12-13 13:22:22 +00:00
25 lines
715 B
HTML
25 lines
715 B
HTML
{{ $img := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) }}
|
|
{{ $width := .Get "width" }}
|
|
{{ $height := .Get "height" }}
|
|
{{ $zone := .Get "zone" }}
|
|
{{ $title := .Get "title" }}
|
|
{{ $class := .Get "class" }}
|
|
{{- with .Parent -}}
|
|
<div>
|
|
{{ 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 }}px" height="{{ $height }}px" {{ if $title }}
|
|
alt="{{ $title }}" {{ end }}>
|
|
{{ if $title }}
|
|
<figcaption class="is-size-6">
|
|
<small>
|
|
{{ $title }}
|
|
</small>
|
|
</figcaption>
|
|
{{ end }}
|
|
</figure>
|
|
</div>
|
|
{{- with .Parent -}}
|
|
</div>
|
|
{{ end }} |