<?php 
/**
 * 碎语心情
 * @author WQG www.wqg.life
 * @package custom
 */

if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>


<?php $this->widget('Widget_Archive@myCustomCategory', 'type=category', 'mid=7')->to($categoryPosts); ?>
<div class="col-mb-12 col-8" id="main" role="main">
    <?php if ($categoryPosts->have()): ?>
        <?php while ($categoryPosts->next()): ?>
            <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
                <h2 class="post-title" itemprop="name headline"><a itemprop="url"
                                                                   href="<?php $categoryPosts->permalink() ?>"><?php $categoryPosts->title() ?></a>
                </h2>
                <div class="post-content" itemprop="articleBody">
                    <?php $categoryPosts->content('- 阅读剩余部分 -'); ?>
                </div>
                <ul class="post-meta">
                    <li itemprop="author" itemscope itemtype="http://schema.org/Person"><?php _e('BY: '); ?><a
                            itemprop="name" href="<?php $categoryPosts->author->permalink(); ?>"
                            rel="author"><?php $categoryPosts->author(); ?></a></li>
                    <li><?php _e('时间: '); ?>
                        <time datetime="<?php $categoryPosts->date('c'); ?>"
                              itemprop="datePublished"><?php $categoryPosts->date(); ?></time>
                    </li>
                    <li itemprop="interactionCount"><a
                            href="<?php $categoryPosts->permalink() ?>#comments"><?php $categoryPosts->commentsNum('评论', '1 条评论', '%d 条评论'); ?></a>
                    </li>
                </ul>
            </article>
        <?php endwhile; ?>
    <?php else: ?>
        <article class="post">
            <h2 class="post-title"><?php _e('没有找到内容'); ?></h2>
        </article>
    <?php endif; ?>

    <?php $categoryPosts->pageNav('&laquo; 前一页', '后一页 &raquo;'); ?>
</div><!-- end #main -->


<?php $this->need('sidebar.php'); ?>
<?php $this->need('footer.php'); ?>
