mirror of https://github.com/jpanther/congo.git
integrate in single.html
parent
fade430e88
commit
a6fde7cba9
|
@ -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 }}
|
||||||
|
|
Loading…
Reference in New Issue