<?php echo $post->author->profile->bio; ?> <em class="r-quote"></em> </div> <div class="monthHot-artle"> <div class="tit"> <span>当月热门文章</span> </div> <div class="list"> <ul> <?php $posts = \hass\post\models\Post::find()->where(["author_id" => $post->author->id])->orderBy(["views" => SORT_DESC])->limit(5)->all(); ?> <?php $i = 1; ?> <?php foreach ($posts as $post) { ?> <li class="<?php echo $i == 1 ? "first" : ""; ?> "><a href="<?php echo \yii\helpers\Url::to(\hass\base\helpers\Util::getEntityUrl($post));
<?php $i++; ?> <?php } ?> </div> </div> <!-- /评论最多 --> <!-- 查看最多 --> <div class="sidebar-box white animate-onscroll"> <h3>查看最多</h3> <div class="week-hot" style="display: block;"> <?php $items = \hass\post\models\Post::findOrderByViews(); ?> <?php $i = 1; ?> <?php foreach ($items as $item) { ?> <a href="<?php echo \yii\helpers\Url::to(\hass\base\helpers\Util::getEntityUrl($item)); ?> " target="_blank" title=""> <span><?php echo $i; ?>