main.html.php 5.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?php if (!defined('HTMLY')) die('HTMLy'); ?>
  2. <?php if (!empty($breadcrumb)): ?>
  3. <div class="breadcrumb"><?php echo $breadcrumb ?></div>
  4. <?php endif; ?>
  5. <?php if (!empty($category)): ?>
  6. <div class="section">
  7. <div class="section-inner">
  8. <div class="content">
  9. <div class="item">
  10. <h2 class="title"><?php echo $category->title;?></h2>
  11. <span class="social-navigation feed-link"><a href="<?php echo $category->url;?>/feed"><i class="fa fa-rss"></i></a></span>
  12. <div class="text-left">
  13. <?php echo $category->body; ?>
  14. </div><!--//desc-->
  15. </div><!--//item-->
  16. </div><!--//content-->
  17. </div>
  18. </div>
  19. <?php endif; ?>
  20. <?php $teaserType = config('teaser.type'); $readMore = config('read.more');?>
  21. <?php foreach ($posts as $p): ?>
  22. <section class="post section" itemprop="blogPost" itemscope="itemscope" itemtype="http://schema.org/BlogPosting">
  23. <div class="section-inner">
  24. <div class="content">
  25. <div class="item">
  26. <?php if (!empty($p->image)) { ?>
  27. <div class="featured featured-image">
  28. <a href="<?php echo $p->url ?>"><img itemprop="image" src="<?php echo $p->image; ?>" alt="<?php echo $p->title ?>"/></a>
  29. </div>
  30. <?php } ?>
  31. <?php if (!empty($p->video)) { ?>
  32. <div class="featured featured-video embed-responsive embed-responsive-16by9">
  33. <iframe class="embed-responsive-item" src="https://www.youtube.com/embed/<?php echo get_video_id($p->video); ?>" frameborder="0" allowfullscreen></iframe>
  34. </div>
  35. <?php } ?>
  36. <?php if (!empty($p->audio)) { ?>
  37. <div class="featured featured-audio embed-responsive embed-responsive-16by9">
  38. <iframe 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>
  39. </div>
  40. <?php } ?>
  41. <?php if (!empty($p->quote)) { ?>
  42. <div class="featured featured-quote">
  43. <blockquote class="quote"><i class="fa fa-quote-left"></i> <?php echo $p->quote ?> <i class="fa fa-quote-right"></i></blockquote>
  44. </div>
  45. <?php } ?>
  46. <div class="info text-left">
  47. <?php if (!empty($p->link)) { ?>
  48. <h2 class="title" itemprop="headline"><a target="_blank" href="<?php echo $p->link ?>"><?php echo $p->title;?> <i class="fa fa-external-link"></i></a></h2>
  49. <?php } else {?>
  50. <h2 class="title" itemprop="headline"><a href="<?php echo $p->url;?>"><?php echo $p->title;?></a></h2>
  51. <?php } ?>
  52. <p class="meta">
  53. <span class="date" itemprop="datePublished"><?php echo format_date($p->date) ?></span> - <?php echo i18n("Posted_in");?>
  54. <span itemprop="articleSection"><?php echo $p->category;?></span> <?php echo i18n("by");?>
  55. <span class="author" itemprop="author"><a href="<?php echo $p->authorUrl;?>"><?php echo $p->authorName;?></a></span>
  56. <?php if (disqus_count()) { ?>
  57. - <span><i class="fa fa-comments"></i> <a href="<?php echo $p->url ?>#disqus_thread"> <?php echo i18n("Comments");?></a></span>
  58. <?php } elseif (facebook()) { ?>
  59. - <i class="fa fa-comments"></i> <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>
  60. <?php } ?>
  61. <?php if (authorized($p)) { echo ' - <span><a href="'. $p->url .'/edit?destination=post">Edit</a></span>'; } ?>
  62. </p>
  63. </div>
  64. <div class="desc text-left post-<?php echo $p->date;?>" itemprop="articleBody">
  65. <?php echo get_teaser($p->body, $p->url);?>
  66. <?php if ($teaserType === 'trimmed'):?>[...]<?php endif;?>
  67. </div><!--//desc-->
  68. <div style="position:relative;">
  69. <?php if ($teaserType === 'trimmed'):?>
  70. <span class="more"><a class="btn btn-cta-secondary" href="<?php echo $p->url;?>"><?php echo $readMore; ?></a></span>
  71. <?php endif;?>
  72. <span class="share pull-right">
  73. <a target="_blank" class="first" href="https://www.facebook.com/sharer.php?u=<?php echo $p->url ?>&t=<?php echo $p->title ?>"><i class="fab fa-facebook"></i></a>
  74. <a target="_blank" href="https://twitter.com/share?url=<?php echo $p->url ?>&text=<?php echo $p->title ?>"><i class="fab fa-twitter"></i></a>
  75. </span>
  76. <div style="clear:both;"></div>
  77. </div>
  78. </div><!--//item-->
  79. </div><!--//content-->
  80. </div><!--//section-inner-->
  81. </section><!--//section-->
  82. <?php endforeach; ?>
  83. <?php if (!empty($pagination['prev']) || !empty($pagination['next'])): ?>
  84. <div class="pagination"><?php echo $pagination['html'];?></div>
  85. <?php endif; ?>
  86. <?php if (disqus_count()): ?>
  87. <?php echo disqus_count() ?>
  88. <?php endif; ?>