mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-19 12:35:31 -04:00
make optimize-image more function-like
....instead of relying on $.Scratch
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
<p class="image">
|
||||
<amp-img
|
||||
{{- with .Get "alt" }} alt="{{ . | safeHTML }}" title="{{ . | safeHTML }}"{{ else }}
|
||||
{{- with .Inner }} alt="{{ . | markdownify | plainify | safeHTML }}" title="{{ . | markdownify | plainify | safeHTML }}"{{ end }}{{ end }}
|
||||
{{- with .Inner }} alt="{{ . | $.Page.RenderString | plainify | safeHTML }}" title="{{ . | $.Page.RenderString | plainify | safeHTML }}"{{ end }}{{ end }}
|
||||
src="{{ $optimized.Permalink }}"
|
||||
width="{{ .Scratch.Get "displayWidth" }}"
|
||||
height="{{ .Scratch.Get "displayHeight" }}"
|
||||
width="{{ $optimized.Width }}"
|
||||
height="{{ $optimized.Height }}"
|
||||
layout="intrinsic">
|
||||
</amp-img>
|
||||
</p>
|
||||
|
Reference in New Issue
Block a user