Advertisement
tycrek

Untitled

Oct 28th, 2022
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. html
  2. head
  3. title!=title
  4. include head
  5. if color !== null
  6. style.
  7. .res-media { border-color: #{color}; }
  8.  
  9. // Open Graph (https://ogp.me/)
  10. meta(property='og:type' content=ogtype)
  11. meta(property=urlType content=discordUrl)
  12. .
  13. !{opengraph}
  14.  
  15. // oEmbed (https://oembed.com/)
  16. link(href=oembedUrl title='oEmbed' rel='alternate' type='application/json+oembed')
  17.  
  18. // Direct resource redirect
  19. if viewDirect
  20. style.
  21. * { display: none !important; }
  22. meta(http-equiv='refresh' content=`0; url='${resourceAttr.src}'`)
  23.  
  24. body.font-main.text-secondary.bg-page
  25. .w-full.h-full.flex.justify-center.items-center.text-center
  26. .bg-viewer.rounded-24
  27. h4.mx-4.mt-6.mb-4.text-3xl.font-main!=title
  28. figure.block.mx-10.my-4.flex.flex-col.align-items-center
  29. if fileIs.video
  30. div#video_player(videoUrl=resourceAttr.src)
  31. script.
  32. var player = new Clappr.Player({
  33. source: document.getElementById('video_player').getAttribute('videoUrl'),
  34. parentId: "#video_player",
  35. visibilityEnableIcon: true,
  36. plugins: [ PlaybackRatePlugin, ContextMenuPlugin, ClapprPauseTabVisibility ],
  37. playbackRateConfig: {
  38. defaultValue: 1,
  39. options: [
  40. { value: 0.5, label: '0.5x' },
  41. { value: 1, label: '1x' },
  42. { value: 2, label: '2x' },
  43. { value: 4, label: '4x' },
  44. { value: 8, label: '8x' },
  45. ],
  46. },
  47. });
  48. else if fileIs.image
  49. img.res-media(decoding='async')&attributes(resourceAttr)
  50. else if fileIs.audio
  51. audio.res-media(controls loop preload='metadata')&attributes(resourceAttr)
  52. else
  53. code!=mimetype
  54. figcaption
  55. br
  56. span.text-2xl Uploaded by #[strong!=uploader]
  57. br
  58. span #{timestamp} (#{size})
  59. br
  60. span: a.link(href='#' onclick=`window.location = '${resourceAttr.src}?download=yes'; return false;` download=title) Download
  61. if showAd
  62. .mx-4.mb-8.text-footer: p Image hosted by #[a.link(href='https://github.com/tycrek/ass' target='_blank'): strong ass], the superior self-hosted ShareX server
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement