mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 15:31:52 +00:00
chore: unify variable naming conventions
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
{{ define "inline-image-simple" -}}
|
{{ define "RenderImageSimple" -}}
|
||||||
<img class="my-0 rounded-md" loading="lazy" alt="{{ .alt }}" src="{{ .src }}" />
|
<img class="my-0 rounded-md" loading="lazy" alt="{{ .alt }}" src="{{ .src }}" />
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{ define "inline-image-responsive" -}}
|
{{ define "RenderImageResponsive" -}}
|
||||||
<img
|
<img
|
||||||
class="my-0 rounded-md" loading="lazy" decoding="async" fetchpriority="low" alt="{{ .alt }}"
|
class="my-0 rounded-md" loading="lazy" decoding="async" fetchpriority="low" alt="{{ .alt }}"
|
||||||
srcset="
|
srcset="
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
/>
|
/>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{ define "inline-image-caption" -}}
|
{{ define "RenderImageCaption" -}}
|
||||||
{{- with .caption }}
|
{{- with .caption }}
|
||||||
<figcaption>{{ . | markdownify }}</figcaption>
|
<figcaption>{{ . | markdownify }}</figcaption>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@@ -33,18 +33,18 @@
|
|||||||
|
|
||||||
<figure>
|
<figure>
|
||||||
{{- if $isRemote }}
|
{{- if $isRemote }}
|
||||||
{{ template "inline-image-simple" (dict "src" $url.String "alt" $altText) }}
|
{{ template "RenderImageSimple" (dict "src" $url.String "alt" $altText) }}
|
||||||
{{- else if $resource }}
|
{{- else if $resource }}
|
||||||
{{- $isSVG := eq $resource.MediaType.SubType "svg" }}
|
{{- $isSVG := eq $resource.MediaType.SubType "svg" }}
|
||||||
{{- $shouldOptimize := and (not $disableImageOptimization) (not $isSVG) }}
|
{{- $shouldOptimize := and (not $disableImageOptimization) (not $isSVG) }}
|
||||||
{{- if $shouldOptimize }}
|
{{- if $shouldOptimize }}
|
||||||
{{ template "inline-image-responsive" (dict "resource" $resource "alt" $altText) }}
|
{{ template "RenderImageResponsive" (dict "resource" $resource "alt" $altText) }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{ template "inline-image-simple" (dict "src" $resource.RelPermalink "alt" $altText) }}
|
{{ template "RenderImageSimple" (dict "src" $resource.RelPermalink "alt" $altText) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{ template "inline-image-simple" (dict "src" $url.String "alt" $altText) }}
|
{{ template "RenderImageSimple" (dict "src" $url.String "alt" $altText) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{ template "inline-image-caption" (dict "caption" $caption) }}
|
{{ template "RenderImageCaption" (dict "caption" $caption) }}
|
||||||
</figure>
|
</figure>
|
||||||
|
|||||||
Reference in New Issue
Block a user