diff options
| author | 2024-07-21 14:22:08 +0200 | |
|---|---|---|
| committer | 2024-07-21 14:22:08 +0200 | |
| commit | 027a93facc73b78e3c3747ab796f4a14b1b4936f (patch) | |
| tree | 51838cd9fdf607ad46fdfa77a9424fdd8f5cd98d /web/template/status_header.tmpl | |
| parent | [bugfix] update common get target account / status doing refresh async (#3124) (diff) | |
| download | gotosocial-027a93facc73b78e3c3747ab796f4a14b1b4936f.tar.xz | |
[feature/frontend] Respect `prefers-reduced-motion` for avatars, headers, and emojis (#3118)
* [feature/frontend] Respect `prefers-reduced-motion` for avatars, headers, and emojis
* go fmt
* fix tests
* use static version of instance thumbnail when appropriate
* use prefers-reduced-motion
* simplify account conversion a bit
* fix c&p error
Diffstat (limited to 'web/template/status_header.tmpl')
| -rw-r--r-- | web/template/status_header.tmpl | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/web/template/status_header.tmpl b/web/template/status_header.tmpl index 8946a1030..01b73aea0 100644 --- a/web/template/status_header.tmpl +++ b/web/template/status_header.tmpl @@ -32,13 +32,23 @@ title="Open remote profile (opens in a new window)" > {{- end }} - <img + <picture class="avatar" aria-hidden="true" - src="{{- .Avatar -}}" - alt="Avatar for {{ .Username -}}" - title="Avatar for {{ .Username -}}" > + {{- if .AvatarAttachment }} + <source + srcset="{{- .AvatarStatic -}}" + type="{{- .AvatarAttachment.PreviewMIMEType -}}" + media="(prefers-reduced-motion: reduce)" + /> + {{- end }} + <img + src="{{- .Avatar -}}" + alt="Avatar for {{ .Username -}}" + title="Avatar for {{ .Username -}}" + > + </picture> <div class="author-strap"> <span class="displayname text-cutoff"> {{- if .DisplayName -}} |
