Skip to content

Instantly share code, notes, and snippets.

@lenagroeger
Created October 1, 2015 00:19
Show Gist options
  • Save lenagroeger/28cb1d61d9aa47ef03c9 to your computer and use it in GitHub Desktop.
Save lenagroeger/28cb1d61d9aa47ef03c9 to your computer and use it in GitHub Desktop.
var tikTok = new TikTok({
el: 'welcome-tik-tok',
title: 'Welcome to Tik Tok',
entries: [
{
date: '2009-06-03',
title: 'Hey there',
body: 'Tik Tok lets you create a simple, mobile-friendly, vertical timeline easily. Just give it some timeline data and it will do the rest. This example will walk you through some of the features of Tik Tok, all with some cute kitten pictures.'
},
{
date: '2009-07-10',
title: 'Some HTML content',
body: 'Each entry is at the very least a <code>date</code>, but will probably include a <code>title</code> and possibly a <code>body</code>. You can use any <abbr title="Hypertext Markup Language">HTML</abbr> you want in these fields.'
},
{ date: '2010-01-13',
title: 'Images',
body: 'You can add an image with the <code>media</code> field. Just put in a URL and Tik Tok will do the rest.',
media: 'https://placekitten.com/g/1200/350'
},
{
date: '2010-10-03',
title: 'Or just use a single image',
media: 'https://placekitten.com/g/1200/500',
source: 'You can use just a <code>media</code> URL, and no <code>body</code> and the media will take up the full space on any screen size.'
},
{
date: '2012-01-03',
title: 'YouTube',
body: 'The <code>media</code> field supports multiple sources and embeds them appropriately. You can use a YouTube embed URL, such as <code>https://www.youtube.com/embed/4IP_E7efGWE</code>.',
media: 'https://www.youtube.com/embed/4IP_E7efGWE',
source: 'Videos of kittens are even better.'
},
{
date: '2012-04-03',
title: 'Other embeds',
body: 'Tik Tok also supports other embeds, like SoundCloud, or a URL with the word <em>embed</em> in it. You can also force a certain handling with the <code>type</code> field.',
media: 'https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/153891564&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false',
source: 'Space cats!'
},
]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment