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.
19 lines
685 B
19 lines
685 B
mixin renderSticker (sticker, options = { })
|
|
if sticker && sticker.encoded
|
|
div(
|
|
title= `:${sticker.slug}:`,
|
|
data-sticker-id= sticker._id,
|
|
data-sticker-slug= sticker.slug,
|
|
onclick= 'return dtp.app.showStickerMenu(event);',
|
|
).chat-sticker.uk-text-center
|
|
case sticker.encoded.type
|
|
when 'video/mp4'
|
|
video(playsinline, autoplay, muted, loop)
|
|
source(src=`/sticker/${sticker._id}/media`)
|
|
when 'image/png'
|
|
img(src=`/sticker/${sticker._id}/media`)
|
|
when 'image/jpg'
|
|
img(src=`/sticker/${sticker._id}/media`)
|
|
|
|
if !options.hideSlug
|
|
.uk-text-small.uk-text-muted :#{sticker.slug}: |