The current Hugo theme for the beetbox.io website
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
766 B

{{ if resources.Get .context.Params.featured.url }}
<img class="{{ .class | default "fill-wh"}}"
{{ with resources.Get .context.Params.featured.url }}
srcset="
{{ (.Resize "320x q30").RelPermalink }} 320w,
{{ (.Resize "600x q40").RelPermalink }} 600w,
{{ (.Resize "1200x q65").RelPermalink }} 2x"
src="{{ .RelPermalink }}"
{{ end }}
alt="{{ .context.Params.featured.alt }}"
/>
{{ else }}
<img class="{{ .class | default "fill-wh"}}"
{{ with .context.Resources.GetMatch .context.Params.featured.url }}
srcset="
{{ (.Resize "320x q30").RelPermalink }} 320w,
{{ (.Resize "600x q40").RelPermalink }} 600w,
{{ (.Resize "1200x q65").RelPermalink }} 2x"
src="{{ .RelPermalink }}"
alt="{{ .Params.alt }}"
{{ end }}
/>
{{ end }}