post.html.php 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?php if (!defined('HTMLY')) die('HTMLy'); ?>
  2. <article class="post type-post hentry <?php if (!empty($p->image) || !empty ($p->audio) || !empty ($p->video)):?>has-post-thumbnail<?php endif;?>">
  3. <?php if (!empty($p->image)):?>
  4. <div class="post-thumbnail">
  5. <a href="<?php echo $p->url; ?>"><img style="width:100%;" title="<?php echo $p->title; ?>" alt="<?php echo $p->title; ?>" class="attachment-post-thumbnail wp-post-image" src="<?php echo $p->image; ?>"></a>
  6. </div>
  7. <?php endif; ?>
  8. <?php if (!empty($p->audio)):?>
  9. <div class="post-thumbnail">
  10. <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>
  11. </div>
  12. <?php endif; ?>
  13. <?php if (!empty($p->video)):?>
  14. <div class="post-thumbnail">
  15. <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>
  16. </div>
  17. <?php endif; ?>
  18. <?php if (!empty($p->quote)):?>
  19. <div class="post-blockquote">
  20. <blockquote class="quote"><?php echo $p->quote ?></blockquote>
  21. </div>
  22. <?php endif; ?>
  23. <header class="entry-header">
  24. <?php if (login()) { echo tab($p); } ?>
  25. <?php if (!empty($p->link)) {?>
  26. <div class="post-link"><h1 class="entry-title"><a href="<?php echo $p->link ?>" target="_blank"><?php echo $p->title; ?></a></h1></div>
  27. <?php } else { ?>
  28. <h1 class="entry-title"><?php echo $p->title; ?></h1>
  29. <?php } ?>
  30. </header>
  31. <div class="entry-content post-<?php echo $p->date;?>">
  32. <?php echo $p->body; ?>
  33. </div>
  34. <style>.related {padding-bottom:2em;}.related p {margin-top:0;margin-bottom:0.5em;} .related ul {margin-left:1em;}</style>
  35. <div class="related entry-content">
  36. <hr>
  37. <p><strong><?php echo i18n('Related_posts');?></strong></p>
  38. <?php echo get_related($p->related);?>
  39. </div>
  40. <div class="author-info">
  41. <h2 class="author-heading"><?php echo i18n('Published').' '.i18n('by');?></h2>
  42. <div class="author-avatar">
  43. <img width="56" height="56" class="avatar avatar-56" src="<?php echo $author->avatar; ?>" alt="<?php echo $author->name; ?>">
  44. </div><!-- .author-avatar -->
  45. <div class="author-description">
  46. <h3 class="author-title"><?php echo $author->name; ?></h3>
  47. <?php echo $author->about ?>
  48. </div><!-- .author-description -->
  49. </div>
  50. <footer class="entry-footer">
  51. <span class="posted-on">
  52. <a href="<?php echo $p->url;?>" rel="permalink"><time class="entry-date published updated"><?php echo format_date($p->date) ?></time></a>
  53. </span>
  54. <span class="byline">
  55. <span class="author vcard">
  56. <a href="<?php echo $p->authorUrl; ?>"><?php echo $p->authorName; ?></a>
  57. </span>
  58. </span>
  59. <span class="cat-links">
  60. <?php echo $p->category; ?>
  61. </span>
  62. <span class="tags-links">
  63. <?php echo $p->tag; ?>
  64. </span>
  65. <?php if (disqus_count()) { ?>
  66. <span class="comments-link"><a href="<?php echo $p->url ?>#disqus_thread"> <?php echo i18n('Comments');?></a></span>
  67. <?php } elseif (facebook()) { ?>
  68. <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>
  69. <?php } ?>
  70. </footer>
  71. </article>
  72. <?php if (disqus()): ?>
  73. <?php echo disqus($p->title, $p->url) ?>
  74. <?php endif; ?>
  75. <?php if (disqus_count()): ?>
  76. <?php echo disqus_count() ?>
  77. <?php endif; ?>
  78. <?php if (facebook() || disqus()): ?>
  79. <div class="comments-area" id="comments">
  80. <?php if (facebook()): ?>
  81. <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>
  82. <?php endif; ?>
  83. <?php if (disqus()): ?>
  84. <div id="disqus_thread"></div>
  85. <?php endif; ?>
  86. </div>
  87. <?php endif; ?>
  88. <nav role="navigation" class="navigation post-navigation">
  89. <h2 class="screen-reader-text">Post navigation</h2>
  90. <div class="nav-links">
  91. <?php if (!empty($prev)): ?>
  92. <div class="nav-previous" <?php if (!empty($prev['image'])):?>style="background-image: linear-gradient(rgba(0, 0, 0, 0.527),rgba(0, 0, 0, 0.5)), url('<?php echo($prev['image']); ?>');"<?php endif;?>>
  93. <a <?php if (!empty($prev['image'])):?>style="color:#fff;"<?php endif;?> rel="prev" href="<?php echo($prev['url']); ?>">
  94. <span <?php if (!empty($prev['image'])):?>style="color:#fff;"<?php endif;?> aria-hidden="true" class="meta-nav"><?php echo i18n('Prev');?></span>
  95. <span class="screen-reader-text">Previous post:</span>
  96. <span class="post-title"><?php echo($prev['title']); ?></span>
  97. </a>
  98. </div>
  99. <?php endif; ?>
  100. <?php if (!empty($next)): ?>
  101. <div class="nav-next" <?php if (!empty($next['image'])):?>style="background-image: linear-gradient(rgba(0, 0, 0, 0.527),rgba(0, 0, 0, 0.5)), url('<?php echo($next['image']); ?>');"<?php endif;?>>
  102. <a <?php if (!empty($next['image'])):?>style="color:#fff;"<?php endif;?> rel="next" href="<?php echo($next['url']); ?>">
  103. <span <?php if (!empty($next['image'])):?>style="color:#fff;"<?php endif;?> aria-hidden="true" class="meta-nav"><?php echo i18n('Next');?></span>
  104. <span class="screen-reader-text">Next post:</span>
  105. <span class="post-title"><?php echo($next['title']); ?></span>
  106. </a>
  107. </div>
  108. <?php endif; ?>
  109. </div>
  110. </nav>