storify.pug
- Storify stories¶
View source code on GithubEmbed stories¶
mixin storify(user, slug)
- if ("border" in attributes)
- border = attributes.border;
- delete attributes.border;
- else
- border = false;
- if ("post_title" in attributes)
- post_title = attributes.post_title;
delete attributes.post_title;
- else
- post_title = slug.replace("-", " ")
- if ("alt" in attributes)
- alt = attributes.alt;
- delete attributes.alt;
- else
- alt = true;
.storify
iframe(src=`https://storify.com/${user}/${slug}/embed?border=${border}`
width="100%" height="750" frameborder="no" allowtransparency="true")
script(src=`https://storify.com/${user}/${slug}.js?border=${border}`)
- if (alt)
noscript
| [
a(href=`https://storify.com/${user}/${slug}` target="__blank") View the story "#{post_title}" on Storify
| ]
-
+storify
(user, slug)(border=false, post_title=null, width="100%", height="750")¶ Embed a story from Storify.
Arguments: - user (string) – Story publisher username.
- slug (string) – Story identificator. You can obtain it from a story page url.
- border (bool, optional) – Specify
border
parameter value insrc
endpoint of includediframe
. As defaultfalse
. - post_title (string, optional) – Post title used if
alt
istrue
. Note that if user browser supportsiframe
tags, this title will not be shown. If you don’t pass this parameter, this will be calculated fromslug
usingslug.replace("-", " ")
. As defaultnull
.
Usage¶
+storify("journalstarnews", "2018-lincoln-marathon")(alt=false)
<div class="storify">
<iframe src="https://storify.com/journalstarnews/2018-lincoln-marathon/embed?border=false" width="100%" height="750" frameborder="no" allowtransparency="true"></iframe>
<script src="https://storify.com/journalstarnews/2018-lincoln-marathon.js?border=false"></script>
</div>