{include file="header.tpl"}

<!-- 文章前自定义数据钩子 -->
{display_custom_data position='before_post' page_type=$mod}

<article class="article-content">
    <header class="article-header">
        <h1 class="article-title">{$post.title nofilter}</h1>
        <div class="post-meta">
            <span><i class="fas fa-user me-1"></i>{$post.author}</span>
            <span><i class="fas fa-folder me-1"></i>{$post.category}</span>
            <span><i class="fas fa-calendar me-1"></i>{$post.create_time|date_format:'Y-m-d H:i'}</span>
            {if $post.update_time != $post.create_time}
            <span><i class="fas fa-edit me-1"></i>{$post.update_time|date_format:'Y-m-d H:i'}</span>
            {/if}
            <span><i class="fas fa-eye me-1"></i>{$post.views} 阅读</span>
        </div>
    </header>
    
    <div class="article-body">
        {* 文章顶部广告 *}
        {if $config.ads.post_top.enabled}
        <div class="post-ad top-ad" style="margin-bottom: 2rem; text-align: center;">
            {$config.ads.post_top.content}
        </div>
        {/if}

        {$post.content nofilter}

        {* 文章底部广告 *}
        {if $config.ads.post_bottom.enabled}
        <div class="post-ad bottom-ad" style="margin-top: 2rem; text-align: center;">
            {$config.ads.post_bottom.content}
        </div>
        {/if}
    </div>
</article>

<!-- 文章后自定义数据钩子 -->
{display_custom_data position='after_post' page_type=$mod}

{include file="footer.tpl"}