1
0
mirror of https://github.com/moparisthebest/kaiwa synced 2024-11-22 17:22:22 -05:00
kaiwa/clientapp/templates/includes/embeds.jade

44 lines
1.9 KiB
Plaintext
Raw Normal View History

2014-01-02 05:48:21 -05:00
- if (locals.type === 'photo')
section.embed.active
2014-01-02 03:52:26 -05:00
a.photo(href=locals.original, target="_blank")
img.embedded(width=locals.width, height=locals.height, src=locals.url, alt=locals.title)
-if (locals.title || locals.description)
.description
-if (locals.title)
h3= locals.title
-if (locals.description)
p= locals.description
2014-01-02 05:48:21 -05:00
- else if (locals.type === 'video' && locals.thumbnail_url)
section.embed.active
a.preview(href=locals.original, target="_blank")
2014-01-02 03:52:26 -05:00
img.embedded(width=locals.width, height=locals.height, src=locals.thumbnail_url, alt=locals.title);
-if (locals.title || locals.description)
.description
-if (locals.title)
h3= locals.title
-if (locals.description)
p= locals.description
2014-01-02 05:48:21 -05:00
//- else if (locals.type === 'link' && locals.provider_name === 'Twitter')
section.embed.active
a.twitter(href=locals.original, target="_blank")
-if (locals.thumbnail_url)
img.embedded(width=100, src=locals.thumbnail_url, alt=locals.title)
-if (locals.title || locals.description)
.description
h4= '@' + locals.author_name
p= locals.description
//- else if (locals.type === 'link' && locals.description && locals.thumbnail_url)
section.embed.active
a.link(href=locals.original, target="_blank")
-if (locals.thumbnail_url)
img.embedded(width=locals.thumbnail_width, height=locals.thumbnail_height, src=locals.thumbnail_url, alt=locals.title)
-if (locals.title || locals.description)
.description
-if (locals.title)
h3= locals.title
-if (locals.description)
p= locals.description
//- else if (locals.type === 'rich')
section.embed.active
iframe(width=locals.width, height=300, seamless="seamless", frameborder="no", scolling="no", srcdoc=locals.html, sandbox="allow-scripts allow-same-origin allow-forms")