Skip to content

Instantly share code, notes, and snippets.

@sashtown
Created November 9, 2012 19:21
Show Gist options
  • Save sashtown/4047645 to your computer and use it in GitHub Desktop.
Save sashtown/4047645 to your computer and use it in GitHub Desktop.
Kirby: Video post template
<article>
<div class="video">
<?php if($article->video() == 'youtube'): ?>
<iframe src="http://www.youtube.com/embed/<?php echo $article->video_id(); ?>" frameborder="0" allowfullscreen></iframe>
<?php else: ?>
<iframe src="http://player.vimeo.com/video/<?php echo $article->video_id(); ?>" frameborder="0" allowfullscreen></iframe>
<?php endif ?>
</div>
<?php echo kirbytext($article->text()) ?>
<footer class="meta"> <!-- Your fancy article meta markup --> </footer>
</article>
<!-- YouTube -->
Title: Awesome video
----
Date: 01.01.2013
----
Video: youtube
----
Video_ID: Ug6XAw6hzaw
----
Text: Lorem ipsum dolor sit amet, consectetuer adipiscing elit...
<!-- Vimeo -->
Title: Another awesome video
----
Date: 02.01.2013
----
Video: vimeo
----
Video_ID: 48111032
----
Text: Lorem ipsum dolor sit amet, consectetuer adipiscing elit...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment