| @@ 33-103 (lines=71) @@ | ||
| 30 | ||
| 31 | </header> |
|
| 32 | ||
| 33 | <?php if ($posts): ?> |
|
| 34 | <?php foreach ($posts as $post): ?> |
|
| 35 | <article class="hentry"> |
|
| 36 | <header class="entry-header page-header"> |
|
| 37 | <h2 class="entry-title"><?= Html::a(Html::encode($post->title), $post->url) ?></h2> |
|
| 38 | ||
| 39 | <?php $updated = new \DateTime($post->modified, new DateTimeZone(Yii::$app->timeZone)) ?> |
|
| 40 | <div class="entry-meta"> |
|
| 41 | <span class="entry-date"> |
|
| 42 | <span aria-hidden="true" class="glyphicon glyphicon-time"></span> |
|
| 43 | <a rel="bookmark" href="<?= $post->url ?>"> |
|
| 44 | <time datetime="<?= $updated->format('c') ?>" class="entry-date"> |
|
| 45 | <?= Yii::$app->formatter->asDate($post->date) ?> |
|
| 46 | </time> |
|
| 47 | </a> |
|
| 48 | </span> |
|
| 49 | <span class="byline"> |
|
| 50 | <span class="author vcard"> |
|
| 51 | <span aria-hidden="true" class="glyphicon glyphicon-user"></span> |
|
| 52 | <a rel="author" href="<?= $post->postAuthor->url ?>" class="url fn"> |
|
| 53 | <?= $post->postAuthor->display_name ?> |
|
| 54 | </a> |
|
| 55 | </span> |
|
| 56 | </span> |
|
| 57 | <span class="comments-link"> |
|
| 58 | <span aria-hidden="true" class="glyphicon glyphicon-comment"></span> |
|
| 59 | <a title="<?= Yii::t( |
|
| 60 | 'writesdown', 'Comment on {postTitle}', |
|
| 61 | ['postTitle' => $post->title] |
|
| 62 | ) ?>" href="<?= $post->url ?>#respond"><?= Yii::t('writesdown', 'Leave a comment') ?></a> |
|
| 63 | </span> |
|
| 64 | </div> |
|
| 65 | </header> |
|
| 66 | <div class="entry-summary"> |
|
| 67 | <?= $post->excerpt ?>... |
|
| 68 | </div> |
|
| 69 | <footer class="footer-meta"> |
|
| 70 | <?php $tags = $post->getTerms() |
|
| 71 | ->innerJoinWith([ |
|
| 72 | 'taxonomy' => function ($query) { |
|
| 73 | /** @var $query \yii\db\ActiveQuery */ |
|
| 74 | return $query->from(['taxonomy' => Taxonomy::tableName()]); |
|
| 75 | }, |
|
| 76 | ]) |
|
| 77 | ->where(['taxonomy.name' => 'tag']) |
|
| 78 | ->all() ?> |
|
| 79 | ||
| 80 | <?php if ($tags): ?> |
|
| 81 | <h3> |
|
| 82 | <?php foreach ($tags as $tag): ?> |
|
| 83 | <?= Html::a($tag->name, $tag->url, ['class' => 'btn btn-xs btn-success']) . "\n" ?> |
|
| 84 | <?php endforeach ?> |
|
| 85 | </h3> |
|
| 86 | <?php endif; ?> |
|
| 87 | ||
| 88 | </footer> |
|
| 89 | </article> |
|
| 90 | <?php endforeach ?> |
|
| 91 | <nav id="archive-pagination"> |
|
| 92 | <?= LinkPager::widget([ |
|
| 93 | 'pagination' => $pages, |
|
| 94 | 'activePageCssClass' => 'active', |
|
| 95 | 'disabledPageCssClass' => 'disabled', |
|
| 96 | 'options' => [ |
|
| 97 | 'class' => 'pagination', |
|
| 98 | ], |
|
| 99 | ]) ?> |
|
| 100 | ||
| 101 | </nav> |
|
| 102 | <?php endif ?> |
|
| 103 | ||
| 104 | </div> |
|
| 105 | ||
| @@ 34-104 (lines=71) @@ | ||
| 31 | ||
| 32 | </header> |
|
| 33 | ||
| 34 | <?php if ($posts): ?> |
|
| 35 | <?php foreach ($posts as $post): ?> |
|
| 36 | <article class="hentry"> |
|
| 37 | <header class="entry-header page-header"> |
|
| 38 | <h2 class="entry-title"><?= Html::a(Html::encode($post->title), $post->url) ?></h2> |
|
| 39 | ||
| 40 | <?php $updated = new \DateTime($post->modified, new DateTimeZone(Yii::$app->timeZone)) ?> |
|
| 41 | <div class="entry-meta"> |
|
| 42 | <span class="entry-date"> |
|
| 43 | <span aria-hidden="true" class="glyphicon glyphicon-time"></span> |
|
| 44 | <a rel="bookmark" href="<?= $post->url ?>"> |
|
| 45 | <time datetime="<?= $updated->format('c') ?>" class="entry-date"> |
|
| 46 | <?= Yii::$app->formatter->asDate($post->date) ?> |
|
| 47 | </time> |
|
| 48 | </a> |
|
| 49 | </span> |
|
| 50 | <span class="byline"> |
|
| 51 | <span class="author vcard"> |
|
| 52 | <span aria-hidden="true" class="glyphicon glyphicon-user"></span> |
|
| 53 | <a rel="author" href="<?= $post->postAuthor->url ?>" class="url fn"> |
|
| 54 | <?= $post->postAuthor->display_name ?> |
|
| 55 | </a> |
|
| 56 | </span> |
|
| 57 | </span> |
|
| 58 | <span class="comments-link"> |
|
| 59 | <span aria-hidden="true" class="glyphicon glyphicon-comment"></span> |
|
| 60 | <a title="<?= Yii::t( |
|
| 61 | 'writesdown', |
|
| 62 | 'Comment on {postTitle}', |
|
| 63 | ['postTitle' => $post->title] |
|
| 64 | ) ?>" href="<?= $post->url ?>#respond"><?= Yii::t('writesdown', 'Leave a comment') ?></a> |
|
| 65 | </span> |
|
| 66 | </div> |
|
| 67 | </header> |
|
| 68 | <div class="entry-summary"> |
|
| 69 | <?= $post->excerpt ?>... |
|
| 70 | </div> |
|
| 71 | <footer class="footer-meta"> |
|
| 72 | <?php $tags = $post->getTerms() |
|
| 73 | ->innerJoinWith([ |
|
| 74 | 'taxonomy' => function ($query) { |
|
| 75 | /** @var $query \yii\db\ActiveQuery */ |
|
| 76 | return $query->from(['taxonomy' => Taxonomy::tableName()]); |
|
| 77 | }, |
|
| 78 | ]) |
|
| 79 | ->where(['taxonomy.name' => 'tag']) |
|
| 80 | ->all() ?> |
|
| 81 | ||
| 82 | <?php if ($tags): ?> |
|
| 83 | <h3> |
|
| 84 | <?php foreach ($tags as $tag): ?> |
|
| 85 | <?= Html::a($tag->name, $tag->url, [ |
|
| 86 | 'class' => 'btn btn-xs btn-success', |
|
| 87 | ]) . "\n" ?> |
|
| 88 | <?php endforeach ?> |
|
| 89 | </h3> |
|
| 90 | <?php endif; ?> |
|
| 91 | ||
| 92 | </footer> |
|
| 93 | </article> |
|
| 94 | <?php endforeach ?> |
|
| 95 | <nav id="archive-pagination"> |
|
| 96 | <?= LinkPager::widget([ |
|
| 97 | 'pagination' => $pages, |
|
| 98 | 'activePageCssClass' => 'active', |
|
| 99 | 'disabledPageCssClass' => 'disabled', |
|
| 100 | 'options' => ['class' => 'pagination'], |
|
| 101 | ]) ?> |
|
| 102 | </nav> |
|
| 103 | <?php endif ?> |
|
| 104 | ||
| 105 | </div> |
|
| 106 | ||
| @@ 32-101 (lines=70) @@ | ||
| 29 | <?php endif ?> |
|
| 30 | </header> |
|
| 31 | ||
| 32 | <?php if ($posts): ?> |
|
| 33 | <?php foreach ($posts as $post): ?> |
|
| 34 | <article class="hentry"> |
|
| 35 | <header class="entry-header page-header"> |
|
| 36 | <h2 class="entry-title"><?= Html::a(Html::encode($post->title), $post->url) ?></h2> |
|
| 37 | ||
| 38 | <?php $updated = new \DateTime($post->modified, new DateTimeZone(Yii::$app->timeZone)) ?> |
|
| 39 | <div class="entry-meta"> |
|
| 40 | <span class="entry-date"> |
|
| 41 | <span aria-hidden="true" class="glyphicon glyphicon-time"></span> |
|
| 42 | <a rel="bookmark" href="<?= $post->url ?>"> |
|
| 43 | <time datetime="<?= $updated->format('c') ?>" class="entry-date"> |
|
| 44 | <?= Yii::$app->formatter->asDate($post->date) ?> |
|
| 45 | </time> |
|
| 46 | </a> |
|
| 47 | </span> |
|
| 48 | <span class="byline"> |
|
| 49 | <span class="author vcard"> |
|
| 50 | <span aria-hidden="true" class="glyphicon glyphicon-user"></span> |
|
| 51 | <a rel="author" href="<?= $post->postAuthor->url ?>" class="url fn"> |
|
| 52 | <?= $post->postAuthor->display_name ?> |
|
| 53 | </a> |
|
| 54 | </span> |
|
| 55 | </span> |
|
| 56 | <span class="comments-link"> |
|
| 57 | <span aria-hidden="true" class="glyphicon glyphicon-comment"></span> |
|
| 58 | <a title="<?= Yii::t( |
|
| 59 | 'writesdown', 'Comment on {postTitle}', |
|
| 60 | ['postTitle' => $post->title] |
|
| 61 | ) ?>" href="<?= $post->url ?>#respond"><?= Yii::t('writesdown', 'Leave a comment') ?></a> |
|
| 62 | </span> |
|
| 63 | </div> |
|
| 64 | </header> |
|
| 65 | <div class="entry-summary"> |
|
| 66 | <?= $post->excerpt ?>... |
|
| 67 | </div> |
|
| 68 | <footer class="footer-meta"> |
|
| 69 | <?php $tags = $post->getTerms() |
|
| 70 | ->innerJoinWith([ |
|
| 71 | 'taxonomy' => function ($query) { |
|
| 72 | /** @var $query \yii\db\ActiveQuery */ |
|
| 73 | return $query->from(['taxonomy' => Taxonomy::tableName()]); |
|
| 74 | }, |
|
| 75 | ]) |
|
| 76 | ->where(['taxonomy.name' => 'tag']) |
|
| 77 | ->all() ?> |
|
| 78 | ||
| 79 | <?php if ($tags): ?> |
|
| 80 | <h3> |
|
| 81 | <?php foreach ($tags as $tag): ?> |
|
| 82 | <?= Html::a($tag->name, $tag->url, [ |
|
| 83 | 'class' => 'btn btn-xs btn-success', |
|
| 84 | ]) . "\n" ?> |
|
| 85 | <?php endforeach ?> |
|
| 86 | </h3> |
|
| 87 | <?php endif; ?> |
|
| 88 | ||
| 89 | </footer> |
|
| 90 | </article> |
|
| 91 | <?php endforeach ?> |
|
| 92 | <nav id="archive-pagination"> |
|
| 93 | <?= LinkPager::widget([ |
|
| 94 | 'pagination' => $pages, |
|
| 95 | 'activePageCssClass' => 'active', |
|
| 96 | 'disabledPageCssClass' => 'disabled', |
|
| 97 | 'options' => ['class' => 'pagination'], |
|
| 98 | ]) ?> |
|
| 99 | </nav> |
|
| 100 | <?php endif ?> |
|
| 101 | ||
| 102 | </div> |
|
| 103 | ||
| @@ 31-101 (lines=71) @@ | ||
| 28 | ||
| 29 | </header> |
|
| 30 | ||
| 31 | <?php if ($posts): ?> |
|
| 32 | <?php foreach ($posts as $post): ?> |
|
| 33 | <article class="hentry"> |
|
| 34 | <header class="entry-header page-header"> |
|
| 35 | <h2 class="entry-title"><?= Html::a(Html::encode($post->title), $post->url) ?></h2> |
|
| 36 | ||
| 37 | <?php $updated = new \DateTime($post->modified, new DateTimeZone(Yii::$app->timeZone)) ?> |
|
| 38 | <div class="entry-meta"> |
|
| 39 | <span class="entry-date"> |
|
| 40 | <span aria-hidden="true" class="glyphicon glyphicon-time"></span> |
|
| 41 | <a rel="bookmark" href="<?= $post->url ?>"> |
|
| 42 | <time datetime="<?= $updated->format('c') ?>" class="entry-date"> |
|
| 43 | <?= Yii::$app->formatter->asDate($post->date) ?> |
|
| 44 | </time> |
|
| 45 | </a> |
|
| 46 | </span> |
|
| 47 | <span class="byline"> |
|
| 48 | <span class="author vcard"> |
|
| 49 | <span aria-hidden="true" class="glyphicon glyphicon-user"></span> |
|
| 50 | <a rel="author" href="<?= $post->postAuthor->url ?>" class="url fn"> |
|
| 51 | <?= $post->postAuthor->display_name ?> |
|
| 52 | </a> |
|
| 53 | </span> |
|
| 54 | </span> |
|
| 55 | <span class="comments-link"> |
|
| 56 | <span aria-hidden="true" class="glyphicon glyphicon-comment"></span> |
|
| 57 | <a title="<?= Yii::t( |
|
| 58 | 'writesdown', |
|
| 59 | 'Comment on {postTitle}', |
|
| 60 | ['postTitle' => $post->title] |
|
| 61 | ) ?>" href="<?= $post->url ?>#respond"><?= Yii::t('writesdown', 'Leave a comment') ?></a> |
|
| 62 | </span> |
|
| 63 | </div> |
|
| 64 | </header> |
|
| 65 | <div class="entry-summary"> |
|
| 66 | <?= $post->excerpt ?>... |
|
| 67 | </div> |
|
| 68 | <footer class="footer-meta"> |
|
| 69 | <?php $tags = $post->getTerms() |
|
| 70 | ->innerJoinWith([ |
|
| 71 | 'taxonomy' => function ($query) { |
|
| 72 | /** @var $query \yii\db\ActiveQuery */ |
|
| 73 | return $query->from(['taxonomy' => Taxonomy::tableName()]); |
|
| 74 | }, |
|
| 75 | ]) |
|
| 76 | ->where(['taxonomy.name' => 'tag']) |
|
| 77 | ->all() ?> |
|
| 78 | ||
| 79 | <?php if ($tags): ?> |
|
| 80 | <h3> |
|
| 81 | <?php foreach ($tags as $tag): ?> |
|
| 82 | <?= Html::a($tag->name, $tag->url, [ |
|
| 83 | 'class' => 'btn btn-xs btn-success', |
|
| 84 | ]) . "\n" ?> |
|
| 85 | <?php endforeach ?> |
|
| 86 | </h3> |
|
| 87 | <?php endif; ?> |
|
| 88 | ||
| 89 | </footer> |
|
| 90 | </article> |
|
| 91 | <?php endforeach ?> |
|
| 92 | <nav id="archive-pagination"> |
|
| 93 | <?= LinkPager::widget([ |
|
| 94 | 'pagination' => $pages, |
|
| 95 | 'activePageCssClass' => 'active', |
|
| 96 | 'disabledPageCssClass' => 'disabled', |
|
| 97 | 'options' => ['class' => 'pagination'], |
|
| 98 | ]) ?> |
|
| 99 | </nav> |
|
| 100 | <?php endif ?> |
|
| 101 | ||
| 102 | </div> |
|
| 103 | ||