Use max-width css instead of width html attribute

Fixes #111
This commit is contained in:
Zed 2020-03-09 02:02:16 +01:00
parent 0582e2ea95
commit b3d1fb4491

View file

@ -28,14 +28,14 @@
#end if #end if
#if tweet.photos.len > 0: #if tweet.photos.len > 0:
#for photo in tweet.photos: #for photo in tweet.photos:
<img src="https://${hostname}${getPicUrl(photo)}" width="250" /> <img src="https://${hostname}${getPicUrl(photo)}" style="max-width:250px;" />
#end for #end for
#elif tweet.video.isSome: #elif tweet.video.isSome:
<img src="https://${hostname}${getPicUrl(get(tweet.video).thumb)}" width="250" /> <img src="https://${hostname}${getPicUrl(get(tweet.video).thumb)}" style="max-width:250px;" />
#elif tweet.gif.isSome: #elif tweet.gif.isSome:
#let thumb = &"https://{hostname}{getPicUrl(get(tweet.gif).thumb)}" #let thumb = &"https://{hostname}{getPicUrl(get(tweet.gif).thumb)}"
#let url = &"https://{hostname}{getGifUrl(get(tweet.gif).url)}" #let url = &"https://{hostname}{getGifUrl(get(tweet.gif).url)}"
<video poster="${thumb}" autoplay muted loop width="250"> <video poster="${thumb}" autoplay muted loop style="max-width:250px;">
<source src="${url}" type="video/mp4"</source></video> <source src="${url}" type="video/mp4"</source></video>
#end if #end if
#end proc #end proc