twitterchiver/viewer: fix GIFs; large images

This commit is contained in:
Luke Granger-Brown 2020-10-22 02:05:24 +00:00
parent d9c5f3f74d
commit bb33b8fae0

View file

@ -82,7 +82,7 @@ a:hover {
margin-top: 8px;
display: grid;
grid-template-columns: 50% 50%;
grid-template-rows: 50% 50%;
grid-template-rows: max-content;
grid-auto-flow: dense;
}
.media-item:only-child,
@ -139,6 +139,14 @@ a:hover {
{{end}}
{{end}}
</video>
{{else if eq $entity.type "gif"}}
<video autoplay muted poster="{{rewriteURL $entity.media_url_https}}" class="media-video">
{{with bestVariant $entity.video_info.variants}}
{{if .}}
<source src="{{rewriteURL .url}}" type="video/mp4">
{{end}}
{{end}}
</video>
{{else}}
<a href="{{$entity.expanded_url}}" class="media-link">
<img src="{{rewriteURL $entity.media_url_https}}" class="media-img">