Skip to content

Commit

Permalink
fix: image was full-width on web but stretched (closes # #178)
Browse files Browse the repository at this point in the history
Thanks to @davidnjoy for alerting of this
  • Loading branch information
tycrek committed Dec 25, 2022
1 parent 50b71d8 commit 73631d0
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions views/view.pug
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@ html
.w-full.h-full.flex.justify-center.items-center.text-center
.bg-viewer.rounded-24
h4.mx-4.mt-6.mb-4.text-3xl.font-main!=title
figure.block.mx-10.my-4.flex.flex-col.align-items-center
if fileIs.video
video.res-media(controls loop muted playsinline preload='metadata')&attributes(resourceAttr)
else if fileIs.image
img.res-media(decoding='async')&attributes(resourceAttr)
else if fileIs.audio
audio.res-media(controls loop preload='metadata')&attributes(resourceAttr)
else
code!=mimetype
figure.mx-10.my-4.flex.flex-col.align-items-center.justify-center
.flex.justify-center
if fileIs.video
video.res-media(controls loop muted playsinline preload='metadata')&attributes(resourceAttr)
else if fileIs.image
img.res-media(decoding='async')&attributes(resourceAttr)
else if fileIs.audio
audio.res-media(controls loop preload='metadata')&attributes(resourceAttr)
else
code!=mimetype
figcaption
br
span.text-2xl Uploaded by #[strong!=uploader]
Expand Down

0 comments on commit 73631d0

Please sign in to comment.