summaryrefslogtreecommitdiff
path: root/web/template
diff options
context:
space:
mode:
Diffstat (limited to 'web/template')
-rw-r--r--web/template/status_attachment.tmpl8
1 files changed, 8 insertions, 0 deletions
diff --git a/web/template/status_attachment.tmpl b/web/template/status_attachment.tmpl
index d04f11d5d..6f5041229 100644
--- a/web/template/status_attachment.tmpl
+++ b/web/template/status_attachment.tmpl
@@ -29,6 +29,10 @@
height="{{- .Meta.Small.Height -}}"
data-blurhash-hash="{{- .Blurhash -}}"
data-sensitive="{{- .Sensitive -}}"
+ {{- if or (ne .Meta.Focus.X 0.0) (ne .Meta.Focus.Y 0.0) }}
+ data-object-position="{{ objectPosition .Meta.Focus.X .Meta.Focus.Y }}"
+ {{- else }}
+ {{- end }}
/>
{{- else }}
<img
@@ -69,6 +73,10 @@
data-blurhash-height="{{- .Item.Meta.Small.Height -}}"
data-blurhash-hash="{{- .Item.Blurhash -}}"
data-blurhash-aspect="{{- .Item.Meta.Small.Aspect -}}"
+ {{- if or (ne .Item.Meta.Focus.X 0.0) (ne .Item.Meta.Focus.Y 0.0) }}
+ data-blurhash-object-position="{{ objectPosition .Item.Meta.Focus.X .Item.Meta.Focus.Y }}"
+ {{- else }}
+ {{- end }}
></div>
{{- end }}
</summary>