1
Fork 0
theorangeone.net-legacy/layouts/_default/_markup/render-image.html
Jake Howard 822198a7df
Add noreferrer to image tags
This doesn't cover the magical div ones, but it's a start
2021-02-06 23:09:10 +00:00

16 lines
538 B
HTML

{{ $destination := .Destination }}
{{ $resource := .Page.Resources.GetMatch $destination }}
{{ if $resource }}
{{ $destination = ($resource.Resize "1500x").RelPermalink }}
{{ end }}
<figure class="text-center">
<a href="{{ $destination | safeURL }}" target="_blank">
<img src="{{ $destination | safeURL }}" alt="{{ .Text | plainify }}" style='max-width: {{ default "90" .Title }}%;' referrerpolicy="no-referrer"/>
</a>
<figcaption class="text-center">
<small>{{ .Text | markdownify }}</small>
</figcaption>
</figure>