<?php
namespace core_next;
?>
<!doctype html>
<html lang="zh">
<?php

get_template_part('template/views/header'); ?>
<body>
<div id="core-next-app">
    <app-header></app-header>
    <div class="body-warp">
        <main class="container">
            <div class="main-warp author-warp">
                <?php
                $user_id = get_the_author_meta('ID');
                $user = get_user_by('ID', $user_id);
                $user_data['user_description'] = $user->description ?: '这个人很懒，签名都没写';
                $user_data['author_name'] = WordPress::getUserDisplayName($user_id);
                $user_data['avatar_url']=  Theme::getUserAvatar($user->user_email);
                $user_data['user_url'] = $user->user_url;
                Options::echoJSData('author_info', json_encode($user_data));
                //echo Template::getTemplateHtml('author-header', $user_data);
                ?>
                <app-author></app-author>
            </div>
            <aside>
                <?php dynamic_sidebar('author_sidebar'); ?>
            </aside>
        </main>
        <?php get_template_part('template/module/footer'); ?>
    </div>
</div>
<?php get_template_part('template/module/body-end'); ?>
</body>
<?php wp_footer(); ?>
</html>