summaryrefslogtreecommitdiff
path: root/single.php
diff options
context:
space:
mode:
authorEltrac Koalar <hi@guhub.cn>2022-09-18 18:27:14 +0800
committerEltrac Koalar <hi@guhub.cn>2022-09-18 18:27:14 +0800
commite5cfb38f02bc7950b690e93a92b063867f324f2a (patch)
treeba2c8e6f96c843a710ebfd5653bfbb515a27d096 /single.php
parent31511ad67b5a6aa12fa2e7f2fd7e8eef30f80705 (diff)
:heart: Add: 加入文章头图
Diffstat (limited to 'single.php')
-rw-r--r--single.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/single.php b/single.php
index 1e8af1b..516d73b 100644
--- a/single.php
+++ b/single.php
@@ -3,6 +3,11 @@
<div class="col-12" id="main" role="main">
<article class="post post-atpage" itemscope itemtype="http://schema.org/BlogPosting">
+ <?php if($this->fields->thumbnail!=''): ?>
+ <div class="post-thumbnail-atpage">
+ <img class="lazy" data-src="<?php $this->fields->thumbnail(); ?>">
+ </div>
+ <?php endif; ?>
<div class="post-header">
<h1 class="post-title post-title-atpage<?php
if($this->is('post') && $this->fields->showTOC){ ?> post-title-withtoc<?php }