post.html.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?php if (!defined('HTMLY')) die('HTMLy'); ?>
  2. <article class="post <?php if ($p->type == 'post') {echo 'format-standard';} else { echo 'format-' . $p->type;} ?> hentry single">
  3. <header class="entry-header">
  4. <?php if (login()) { echo tab($p); } ?>
  5. <?php if (!empty($p->link)) {?>
  6. <div class="post-link"><h1 class="entry-title"><a target="_blank" href="<?php echo $p->link;?>"><?php echo $p->title;?></a></h1></div>
  7. <?php } else { ?>
  8. <h1 class="entry-title"><?php echo $p->title;?></h1>
  9. <?php } ?>
  10. </header><!-- .entry-header -->
  11. <?php if (!empty($p->image)):?>
  12. <a class="post-thumbnail" href="<?php echo $p->url;?>"><img alt="<?php echo $p->title;?>" src="<?php echo $p->image;?>" width="100%"/></a>
  13. <?php endif;?>
  14. <div class="entry-content">
  15. <div class="content">
  16. <div class="clearfix text-formatted field field--name-body">
  17. <div class="content post-<?php echo $p->date;?>">
  18. <?php if (!empty($p->quote)):?>
  19. <blockquote><?php echo $p->quote;?></blockquote>
  20. <?php endif;?>
  21. <?php if (!empty($p->video)):?>
  22. <span class="embed-youtube"><iframe width="100%" height="315px" class="embed-responsive-item" src="https://www.youtube.com/embed/<?php echo get_video_id($p->video); ?>" frameborder="0" allowfullscreen></iframe></span>
  23. <?php endif; ?>
  24. <?php if (!empty($p->audio)):?>
  25. <span class="embed-soundcloud"><iframe width="100%" height="200px" class="embed-responsive-item" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<?php echo $p->audio;?>&amp;auto_play=false&amp;visual=true"></iframe></span>
  26. <?php endif; ?>
  27. <?php echo $p->body;?>
  28. <hr>
  29. <style>.related p {margin-top:0;margin-bottom:0.5em;} .related ul {margin-left:1em;}</style>
  30. <div class="related">
  31. <p><strong><?php echo i18n("Related_posts");?></strong></p>
  32. <?php echo get_related($p->related);?>
  33. </div>
  34. </div>
  35. </div>
  36. </div>
  37. <div class="author-info">
  38. <div class="author-avatar">
  39. <a href="<?php echo $p->authorUrl;?>"><img alt="<?php $author->name;?>" src="<?php echo $p->authorAvatar;?>" class="avatar avatar-42" height="42" width="42" /></a>
  40. </div><!-- .author-avatar -->
  41. <div class="author-description">
  42. <h2 class="author-title"><span class="author-heading"><?php echo i18n('Author');?>:</span> <?php echo $author->name;?></h2>
  43. <?php echo $author->about;?>
  44. </div><!-- .author-description -->
  45. </div><!-- .author-info -->
  46. </div><!-- .entry-content -->
  47. <footer class="entry-footer">
  48. <span class="byline"><span class="author vcard"><a href="<?php echo $p->authorUrl;?>"><img alt="<?php echo $p->authorName;?>" title="<?php echo $p->authorName;?>" src="<?php echo $p->authorAvatar;?>" class="avatar avatar-49 grav-hashed grav-hijack" height="49" width="49"/></a><span class="screen-reader-text">Author </span> <a class="url fn n" href="<?php echo $p->authorUrl;?>"><?php echo $p->authorName;?></a></span></span>
  49. <span class="posted-on"><span class="screen-reader-text">Posted on </span><a href="<?php echo $p->url;?>" rel="bookmark"><time class="entry-date published"><?php echo format_date($p->date) ?></time></a></span>
  50. <span class="cat-links"><span class="screen-reader-text"><?php echo i18n('Category');?> </span><?php echo $p->category;?></span>
  51. <span class="tags-links"><span class="screen-reader-text">Tags </span><?php echo $p->tag;?></span>
  52. <?php if (disqus_count()) { ?>
  53. <span class="comments-link"><a href="<?php echo $p->url ?>#disqus_thread"> <?php echo i18n('Comments');?></a></span>
  54. <?php } elseif (facebook()) { ?>
  55. <span class="comments-link"><a href="<?php echo $p->url ?>#comments"><span><fb:comments-count href=<?php echo $p->url ?>></fb:comments-count> <?php echo i18n('Comments');?></span></a></span>
  56. <?php } ?>
  57. </footer><!-- .entry-footer -->
  58. </article><!-- #post-## -->
  59. <?php if (disqus()): ?>
  60. <?php echo disqus($p->title, $p->url) ?>
  61. <?php endif; ?>
  62. <?php if (disqus_count()): ?>
  63. <?php echo disqus_count() ?>
  64. <?php endif; ?>
  65. <?php if (facebook() || disqus()): ?>
  66. <div class="comments-area" id="comments">
  67. <h2 class="comments-title"><?php echo i18n('Comments');?> “<?php echo $p->title;?>”</h2>
  68. <?php if (facebook()): ?>
  69. <div class="fb-comments" data-href="<?php echo $p->url ?>" data-numposts="<?php echo config('fb.num') ?>" data-colorscheme="<?php echo config('fb.color') ?>"></div>
  70. <?php endif; ?>
  71. <?php if (disqus()): ?>
  72. <div id="disqus_thread"></div>
  73. <?php endif; ?>
  74. </div>
  75. <?php endif; ?>
  76. <nav role="navigation" class="navigation post-navigation">
  77. <h2 class="screen-reader-text">Post navigation</h2>
  78. <div class="nav-links">
  79. <?php if (!empty($prev)): ?>
  80. <div class="nav-previous"><a rel="prev" href="<?php echo($prev['url']); ?>"><span aria-hidden="true" class="meta-nav"><?php echo i18n('Prev');?></span> <span class="screen-reader-text">Previous post:</span> <span class="post-title"><?php echo($prev['title']); ?></span></a></div>
  81. <?php endif;?>
  82. <?php if (!empty($next)): ?>
  83. <div class="nav-next"><a rel="next" href="<?php echo($next['url']); ?>"><span aria-hidden="true" class="meta-nav"><?php echo i18n('Next');?></span> <span class="screen-reader-text">Next post:</span> <span class="post-title"><?php echo($next['title']); ?></span></a></div>
  84. <?php endif;?>
  85. </div>
  86. </nav>