<?php
namespace core_next;
global $paged, $core_next_set, $core_next_expand_set;
if ($core_next_set['home_post_list_cache']) {
    $forced_update = Theme::getCanUpdateCache('home_post_list_cache');
    $post_list = Theme::Cache('home_post_list_query_' . $paged, function () use ($paged) {
        return WordPress::getPostList($paged);
    }, $forced_update);
} else {
    if ($paged == 1 || $paged == 0) {
        $post_list = WordPress::getPostList();
    } else {
        $post_list = WordPress::getPostList($paged);
    }
}
$post_list = Theme::handleRandomThumbnail($post_list);
$arr['plane_name'] = 'div';
$arr['plane_class_name'] = 'post-list';

?>
<div class="post-list-warp">
    <div class="box-title-warp">
        <div class="box-title">最新文章</div>
    </div>
    <?php Template::echoListTemplateHtmlByDOMDocument('post-item', $post_list, $arr, 'home_post_list'); ?>
    <div class="list-footer">
        <el-pagination
                background
                layout="prev, pager, next"
                :page-count="total_page"
                :current-page="now_page"
                :hide-on-single-page="true"
                @current-change="changePage"
                :pager-count="5"
        >
        </el-pagination>
    </div>
</div>