diff options
| author | Eltrac Koalar <hi@guhub.cn> | 2022-08-18 16:48:40 +0800 |
|---|---|---|
| committer | Eltrac Koalar <hi@guhub.cn> | 2022-08-18 16:48:40 +0800 |
| commit | c47f6f02ad4a7b93189882133b4f7c8c85733131 (patch) | |
| tree | 604a6101ee9032208e153d872604e4421bfc0014 /single.php | |
| parent | f7c53629966ec0cc8f9d557ea6d0d3182d8029a5 (diff) | |
:file_folder: Perf: 文章和独立页面统一用同一文件嵌套
Diffstat (limited to 'single.php')
| -rw-r--r-- | single.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/single.php b/single.php new file mode 100644 index 0000000..2efd279 --- /dev/null +++ b/single.php @@ -0,0 +1,30 @@ +<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?> +<?php $this->need('includes/header.php'); ?> + +<div class="col-12" id="main" role="main"> + <article class="post post-atpage" itemscope itemtype="http://schema.org/BlogPosting"> + <div class="post-header"> + <h1 class="post-title post-title-atpage<?php if($this->is('page')): ?> page-title-atpage<?php endif; ?>" itemprop="name headline"><?php $this->title() ?></h1> + <?php if($this->is('post')): ?> + <ul class="post-meta post-meta-atpage"> + <li><time datetime="<?php $this->date('c'); ?>" itemprop="datePublished"><?php $this->date(); ?></time></li> + <li><?php $this->category(','); ?></li> + <?php if($this->user->hasLogin()):?> + <li><a href="<?php $this->options->adminUrl(); ?>write-post.php?cid=<?php echo $this->cid;?>" no-pjax>编辑</a></li> + <?php endif ?> + </ul> + <?php endif; ?> + </div> + <div class="post-content" itemprop="articleBody"> + <?php $this->content(); ?> + </div> + + <?php if ($this->is('post') && $this->tags): ?> + <p itemprop="keywords" class="tags-list post-tags-list"><span class="tags-title iconfont"></span> <?php $this->tags(' ', true, ''); ?></p> + <?php endif; ?> + </article> + + <?php $this->need('includes/comments.php'); ?> +</div> + +<?php $this->need('includes/footer.php'); ?>
\ No newline at end of file |
