<% page.cover = false; %>

<div class="post-title">
    <h1 class="post-title__text">
        <%= page.title || theme.meta.title %>
    </h1>
    <div class="post-title__meta">
        <%- partial('_meta/date') %>
        <%- partial('_meta/categories') %> 
        <%- partial('_plugins/statistics/index', {position: 'page'}) %> 
    </div>
</div>

<% if (theme.meta.toc.enable && page.toc !== false) { %>
    <aside class="post-side">
        <div class="post-side__toc">
            <%- toc(page.content, {list_number: (theme.meta.toc.list_number || false), max_depth: 6, min_depth: 2}) %>
        </div>
    </aside>
    <a class="btn-toc button" id="btn-toc" tabindex="0">
        <svg viewBox="0 0 1024 1024" width="32" height="32" xmlns="http://www.w3.org/2000/svg">
            <path d="M128 256h64V192H128zM320 256h576V192H320zM128 544h64v-64H128zM320 544h576v-64H320zM128 832h64v-64H128zM320 832h576v-64H320z" fill="currentColor"></path>
        </svg>
    </a>
    <div class="toc-menus" id="toc-menus">
        <div class="toc-title"><%= __('post.toc') %></div>
        <%- toc(page.content, {list_number: (theme.meta.toc.list_number || false), max_depth: 6, min_depth: 2}) %>
    </div>
<% } %>

<article class="post<% if (theme.meta.toc.enable && page.toc !== false) { %> post__with-toc<% } %> content-card">
    <div class="post__header"><%- partial('_meta/thumbnail') %><%- partial('_meta/expire') %></div>
    <div class="post__content">
        <%- page.content %>
    </div>
    <%- partial('_meta/copyright') %> 
    <%- partial('_meta/updated') %> 
    <%- partial('_meta/tags') %> 
</article>

<% if (post.prev || post.next) { %>
    <div class="nav">
        <div class="nav__prev">
            <% if (post.prev) { %>
                <a href="<%= url_for(post.prev.path) %>" class="nav__link">
                    <div>
                        <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M589.088 790.624L310.464 512l278.624-278.624 45.248 45.248L400.96 512l233.376 233.376z" fill="#808080"></path></svg>
                    </div>
                    <div>
                        <div class="nav__label">
                            <%= __('post.prev') %>
                        </div>
                        <div class="nav__title">
                            <%= post.prev.title || theme.meta.title %>
                        </div>
                    </div>
                </a>
            <% } %>
        </div>
        <div class="nav__next">
            <% if (post.next) { %>
                <a href="<%= url_for(post.next.path) %>" class="nav__link">
                    <div>
                        <div class="nav__label">
                            <%= __('post.next') %>
                        </div>
                        <div class="nav__title">
                            <%= post.next.title || theme.meta.title %>
                        </div>
                    </div>
                    <div>
                        <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M434.944 790.624l-45.248-45.248L623.04 512l-233.376-233.376 45.248-45.248L713.568 512z" fill="#808080"></path></svg>
                    </div>
                </a>
            <% } %>
        </div>
    </div>
<% } %>

<% if (theme.comments.use && page.comments !== false) { %>
    <div class="post__comments<% if (theme.meta.toc.enable && page.toc !== false) { %> post__with-toc<% } %> content-card" id="comment">
        <%- partial('_plugins/comments/placeholder') %>
    </div>
<% } %>

