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/page_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/page_header.tmpl')
-rw-r--r-- | web/template/page_header.tmpl | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/web/template/page_header.tmpl b/web/template/page_header.tmpl index e605b349f..388587aaf 100644 --- a/web/template/page_header.tmpl +++ b/web/template/page_header.tmpl @@ -57,11 +57,20 @@ Instance Logo {{- with . }} <a aria-label="{{- .instance.Title -}}. Go to instance homepage" href="/" class="nounderline"> - <img - src="{{- .instance.Thumbnail -}}" - alt="{{- template "thumbnailDescription" . -}}" - title="{{- template "thumbnailDescription" . -}}" - /> + <picture> + {{- if .instance.ThumbnailStatic }} + <source + srcset="{{- .instance.ThumbnailStatic -}}" + type="{{- .instance.ThumbnailStaticType -}}" + media="(prefers-reduced-motion: reduce)" + /> + {{- end }} + <img + src="{{- .instance.Thumbnail -}}" + alt="{{- template "thumbnailDescription" . -}}" + title="{{- template "thumbnailDescription" . -}}" + /> + </picture> <h1>{{- .instance.Title -}}</h1> </a> {{- if .showStrap }} |