Created
November 9, 2012 19:21
-
-
Save sashtown/4047645 to your computer and use it in GitHub Desktop.
Kirby: Video post template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 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