You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
2.5 KiB

  1. <!-- <h2 class="subhead"><?php echo $Language->get('Recent posts') ?></h2>-->
  2. <?php foreach ($posts as $Post): ?>
  3. <div class="container">
  4. <div class="box">
  5. <div class="col-lg-12 text-center">
  6. <!-- Plugins Post Begin -->
  7. <?php Theme::plugins('postBegin') ?>
  8. <!-- Post header -->
  9. <header class="post-header">
  10. <!-- Post title -->
  11. <h2 class="post-title">
  12. <hr> <a href="<?php echo $Post->permalink() ?>"><?php echo $Post->title() ?></a></h2>
  13. <h4><small><?php echo $Post->description() ?></small></h4><hr>
  14. </div>
  15. </header>
  16. <!-- Cover Image -->
  17. <?php
  18. if($Post->coverImage()) {
  19. echo '<a href="'.$Post->permalink().'" class="image featured"><img src="'.$Post->coverImage().'" alt="Cover Image"></a>';
  20. }
  21. ?>
  22. <!-- Post content -->
  23. <div class="col-lg-12">
  24. <?php
  25. // Call the method with FALSE to get the first part of the post
  26. echo $Post->content(false)
  27. ?>
  28. </div>
  29. <p>&nbsp;</p>
  30. <div class="col-md-6 text-left">
  31. <!-- Post tag -->
  32. <h5>
  33. <small>
  34. <strong><?php $Language->p('Tags') ?></strong>
  35. <?php
  36. $tags = $Post->tags(true);
  37. foreach($tags as $tagKey=>$tagName) {
  38. echo '&nbsp;|&nbsp <a href="'.HTML_PATH_ROOT.$Url->filters('tag').'/'.$tagKey.'">'.$tagName.'</a>';
  39. }
  40. ?>
  41. </small>
  42. </h5>
  43. <!-- Post date and author -->
  44. <h6>
  45. <small>
  46. <?php
  47. // Get the user who created the post.
  48. $User = $Post->user();
  49. // Default author is the username.
  50. $author = $User->username();
  51. // If the user complete the first name or last name this will be the author.
  52. if( Text::isNotEmpty($User->firstName()) || Text::isNotEmpty($User->lastName()) ) {
  53. $author = $User->firstName().' '.$User->lastName();
  54. }
  55. ?>
  56. <time><?php echo $Post->date() ?></time>&nbsp;|&nbsp
  57. <span class="name"><?php echo $author ?></span>
  58. </small>
  59. </h6>
  60. </div>
  61. <!-- Post read more -->
  62. <div class="col-md-6 text-right">
  63. <?php if($Post->readMore()) { ?>
  64. <a class="btn btn-default btn-lg" href="<?php echo $Post->permalink() ?>"><?php $Language->printMe('Read more') ?></a>
  65. <?php } ?>
  66. </div>
  67. <!-- Plugins Post End -->
  68. <?php Theme::plugins('postEnd') ?>
  69. </div></div>
  70. <?php endforeach; ?>
  71. <!-- Paginator for posts -->
  72. <div class="container">
  73. <div class="col-lg-12 text-center">
  74. <ul class="pager">
  75. <?php
  76. echo Paginator::html();
  77. ?>
  78. </ul>
  79. </div>
  80. </div>