mirror of https://github.com/tycrek/ass
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.6 KiB
47 lines
1.6 KiB
3 years ago
|
html
|
||
|
head
|
||
|
title!=title
|
||
|
include head
|
||
|
if color !== null
|
||
|
style.
|
||
3 years ago
|
.res-media { border-color: #{color}; }
|
||
3 years ago
|
|
||
|
// Open Graph (https://ogp.me/)
|
||
|
meta(property='og:type' content=ogtype)
|
||
|
meta(property=urlType content=discordUrl)
|
||
|
.
|
||
|
!{opengraph}
|
||
|
|
||
|
// oEmbed (https://oembed.com/)
|
||
|
link(href=oembedUrl title='oEmbed' rel='alternate' type='application/json+oembed')
|
||
|
|
||
3 years ago
|
// Direct resource redirect
|
||
|
if viewDirect
|
||
|
style.
|
||
|
* { display: none !important; }
|
||
|
meta(http-equiv='refresh' content=`0; url='${resourceAttr.src}'`)
|
||
|
|
||
2 years ago
|
body.font-main.bg-page
|
||
3 years ago
|
.w-full.h-full.flex.justify-center.items-center.text-center
|
||
3 years ago
|
.bg-viewer.rounded-24
|
||
2 years ago
|
h4.mx-4.mt-6.mb-4.text-3xl.font-main.text-primary!=title
|
||
2 years ago
|
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
|
||
3 years ago
|
figcaption
|
||
|
br
|
||
2 years ago
|
span.text-2xl.text-primary Uploaded by #[strong!=uploader]
|
||
3 years ago
|
br
|
||
2 years ago
|
span.text-secondary #{timestamp} (#{size})
|
||
3 years ago
|
br
|
||
3 years ago
|
span: a.link(href='#' onclick=`window.location = '${resourceAttr.src}?download=yes'; return false;` download=title) Download
|
||
3 years ago
|
if showAd
|
||
1 year ago
|
.mx-4.mb-8.text-footer.text-secondary: p Image hosted by #[a.link(href='https://github.com/tycrek/ass' target='_blank'): strong ass], the simple self-hosted ShareX server
|