integrate in single.html

stereobooster 2023-10-31 18:14:03 +01:00
parent 3ef388f4f6
commit 6f0d70ee36
1 changed files with 3 additions and 19 deletions

View File

@ -15,25 +15,9 @@
</div> </div>
{{ with $feature }} {{ with $feature }}
<div class="prose"> <div class="prose">
<img {{ $altText := $.Params.featureAlt | default $.Params.coverAlt | default "" }}
class="mb-6 -mt-4 rounded-md" {{ $class := "mb-6 -mt-4 rounded-md" }}
{{ if eq .MediaType.SubType "svg" }} {{ partial "pictureDefaults.html" (dict "img" . "alt" $altText "class" $class) }}
src="{{ .RelPermalink }}"
{{ else }}
width="{{ .Width }}"
height="{{ .Height }}"
{{ if lt .Width 660 }}
src="{{ .RelPermalink }}"
{{ else }}
srcset="
{{- (.Resize "330x").RelPermalink }} 330w,
{{- (.Resize "660x").RelPermalink }} 660w,
{{- (.Resize "1024x").RelPermalink }} 1024w,
{{- (.Resize "1320x").RelPermalink }} 2x"
{{ end }}
{{ end }}
alt="{{ $.Params.featureAlt | default $.Params.coverAlt | default "" }}"
/>
{{ with $.Params.coverCaption }} {{ with $.Params.coverCaption }}
<figcaption class="mb-6 -mt-3 text-center">{{ . | markdownify }}</figcaption> <figcaption class="mb-6 -mt-3 text-center">{{ . | markdownify }}</figcaption>
{{ end }} {{ end }}