post.html.php 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php if (!defined('HTMLY')) die('HTMLy'); ?>
  2. <article class="post-single">
  3. <header class="post-header">
  4. <div class="breadcrumbs"><?php echo $breadcrumb;?></div>
  5. <?php if(!empty($post->link)) { ?>
  6. <a href="<?php echo $post->link;?>" target="_blank"><h1 class="post-title entry-hint-parent"><?php echo $post->title;?> <svg fill="none" shape-rendering="geometricPrecision" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.5" viewBox="0 0 24 24" width="20"><path d="M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"></path><path d="M15 3h6v6"></path><path d="M10 14L21 3"></path></svg></h1></a>
  7. <?php } else {?>
  8. <h1 class="post-title entry-hint-parent"><?php echo $post->title;?></h1>
  9. <?php } ?>
  10. <div class="post-meta"><span><?php echo format_date($post->date);?></span>&nbsp;·&nbsp;<?php echo $post->readTime;?> min&nbsp;·&nbsp;<a href="<?php echo $post->authorUrl;?>"><?php echo $post->authorName;?></a><?php if (disqus_count()):?>&nbsp;·&nbsp;<a href="<?php echo $post->url ?>#disqus_thread"> <?php echo i18n('Comments');?></a><?php endif;?><?php if (facebook()):?><a href="<?php echo $post->url ?>#comments"><span><fb:comments-count href=<?php echo $post->url ?>></fb:comments-count> <?php echo i18n('Comments');?></span></a><?php endif;?><?php if(authorized($post)):?>&nbsp;·&nbsp;<a href="<?php echo $post->url;?>/edit?destination=post"><?php echo i18n('edit');?></a><?php endif;?>
  11. </div>
  12. </header>
  13. <div class="post-content" id="post-content">
  14. <?php if(!empty($post->image)):?>
  15. <img class="media-wrapper" title="<?php echo $post->title;?>" src="<?php echo $post->image;?>"/>
  16. <?php endif;?>
  17. <?php if(!empty($post->video)):?>
  18. <iframe width="100%" height="315px" class="embed-responsive-item media-wrapper" src="https://www.youtube.com/embed/<?php echo get_video_id($post->video); ?>" frameborder="0" allowfullscreen></iframe>
  19. <?php endif;?>
  20. <?php if(!empty($post->audio)):?>
  21. <iframe width="100%" height="200px" class="embed-responsive-item media-wrapper" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?php echo $post->audio;?>&amp;auto_play=false&amp;visual=true"></iframe>
  22. <?php endif;?>
  23. <?php if(!empty($post->quote)):?>
  24. <blockquote class="quote"><?php echo $post->quote ?></blockquote>
  25. <?php endif;?>
  26. <?php echo $post->body;?>
  27. <div class="related-posts">
  28. <strong><?php echo i18n('related_posts');?></strong>
  29. <?php echo get_related($post->related);?>
  30. </div>
  31. </div>
  32. <footer class="post-footer">
  33. <div class="post-tags">
  34. <?php echo $post->tag;?>
  35. </div>
  36. <?php if (disqus()): ?>
  37. <?php echo disqus($p->title, $p->url) ?>
  38. <?php endif; ?>
  39. <?php if (disqus_count()): ?>
  40. <?php echo disqus_count() ?>
  41. <?php endif; ?>
  42. <?php if (facebook() || disqus()): ?>
  43. <div class="comments-area" id="comments">
  44. <?php if (facebook()): ?>
  45. <div class="fb-comments" data-href="<?php echo $post->url ?>" data-numposts="<?php echo config('fb.num') ?>" data-colorscheme="<?php echo config('fb.color') ?>"></div>
  46. <?php endif; ?>
  47. <?php if (disqus()): ?>
  48. <div id="disqus_thread"></div>
  49. <?php endif; ?>
  50. </div>
  51. <?php endif; ?>
  52. <nav class="paginav">
  53. <?php if (!empty($next)): ?>
  54. <a class="prev" href="<?php echo $next['url'];?>">
  55. <span class="title">« <?php echo i18n('next_post');?></span>
  56. <br>
  57. <span><?php echo $next['title'];?></span>
  58. </a>
  59. <?php endif;?>
  60. <?php if (!empty($prev)): ?>
  61. <a class="next" href="<?php echo $prev['url'];?>">
  62. <span class="title"><?php echo i18n('prev_post');?> »</span>
  63. <br>
  64. <span><?php echo $prev['title'];?></span>
  65. </a>
  66. <?php endif;?>
  67. </nav>
  68. </footer>
  69. </article>