2021-07-25 09:12:40 +08:00
|
|
|
|
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
|
|
|
|
|
<?php $this->need('header.php'); ?>
|
|
|
|
|
|
|
|
|
|
<div class="col mt-5" id="main" role="main">
|
2021-09-26 10:15:20 +08:00
|
|
|
|
<article>
|
2021-08-14 11:05:26 +08:00
|
|
|
|
<?php if ($this->fields->headPic !=''): ?>
|
|
|
|
|
<img src=<?php $this->fields->headPic(); ?> class="img-fluid mx-auto d-block shadow rounded mb-3" alt="<?php $this->title(); ?>">
|
|
|
|
|
<?php endif; ?>
|
2021-09-26 10:15:20 +08:00
|
|
|
|
<h1 class="font-weight-bold post-title"><?php $this->title() ?></h1>
|
2021-08-04 12:02:35 +08:00
|
|
|
|
<div>
|
2021-08-04 20:25:56 +08:00
|
|
|
|
<span class="text-gray">
|
2021-08-06 10:05:43 +08:00
|
|
|
|
<i class="far fa-calendar-alt ml-1 mr-1"></i>
|
2021-09-26 10:15:20 +08:00
|
|
|
|
<time class="lately" datetime="<?php $this->date('c'); ?>" pubdate>Lately</time> |
|
|
|
|
|
<time datetime="<?php $this->date('c'); ?>"><?php $this->date('Y-m-d D h:iA'); ?></time>
|
2021-10-07 12:09:41 +08:00
|
|
|
|
<?php if ($this->fields->pubPlace != ''): ?>
|
|
|
|
|
<br>
|
|
|
|
|
<i class="fas fa-map-marker-alt ml-1 mr-1"></i>
|
|
|
|
|
<?php echo $this->fields->pubPlace; ?>
|
|
|
|
|
<?php endif; ?>
|
2021-08-04 20:25:56 +08:00
|
|
|
|
</span>
|
|
|
|
|
</div>
|
2021-08-03 20:45:41 +08:00
|
|
|
|
<hr>
|
2021-09-26 10:15:20 +08:00
|
|
|
|
<?php $date1=date_create(date('c',$this->date->timeStamp)); $date2=date_create(date('c')); $days=date_diff($date1,$date2); ?>
|
2021-08-07 23:57:27 +08:00
|
|
|
|
<?php if ($this->options->oldPosts == 'able' && $days->format('%a') > 365): ?>
|
|
|
|
|
<div class="alert alert-primary shadow mb-5" role="alert">
|
|
|
|
|
这是一篇发布于 <?php echo $days->format('%a'); ?> 天以前的旧文。其中的部分内容可能已经过时。
|
|
|
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
|
|
|
<span aria-hidden="true" class="text-white">×</span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<?php endif; ?>
|
2021-09-26 10:15:20 +08:00
|
|
|
|
<div class="post-content">
|
2021-07-25 09:12:40 +08:00
|
|
|
|
<?php $this->content(); ?>
|
|
|
|
|
</div>
|
|
|
|
|
</article>
|
2021-08-04 12:02:35 +08:00
|
|
|
|
<hr>
|
|
|
|
|
<span>
|
2021-08-06 10:05:43 +08:00
|
|
|
|
<i class="fa fa-copyright ml-1 mr-1"></i>
|
2021-08-04 12:02:35 +08:00
|
|
|
|
<a class="badge badge-default" rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons BY-SA 4.0</a>
|
|
|
|
|
</span>
|
|
|
|
|
<span>
|
2021-08-06 10:05:43 +08:00
|
|
|
|
<i class="fa fa-folder text-info ml-1 mr-1"></i>
|
2021-08-04 12:02:35 +08:00
|
|
|
|
<?php foreach($this->categories as $categories): ?>
|
|
|
|
|
<a href="<?php print($categories['permalink']) ?>" class="badge badge-info"><?php print($categories['name']) ?></a>
|
|
|
|
|
<?php endforeach;?>
|
|
|
|
|
</span>
|
|
|
|
|
<?php if (count($this->tags) > 0): ?>
|
|
|
|
|
<span>
|
2021-08-06 10:05:43 +08:00
|
|
|
|
<i class="fa fa-tags text-success ml-1 mr-1"></i>
|
2021-08-04 12:02:35 +08:00
|
|
|
|
<?php foreach($this->tags as $tags): ?>
|
|
|
|
|
<a href="<?php print($tags['permalink']) ?>" class="badge badge-success"><?php print($tags['name']) ?></a>
|
|
|
|
|
<?php endforeach;?>
|
|
|
|
|
</span>
|
|
|
|
|
<?php endif;?>
|
|
|
|
|
<?php if ($this->commentsNum > 0): ?>
|
|
|
|
|
<span>
|
2021-08-06 10:05:43 +08:00
|
|
|
|
<i class="fa fa-comments ml-1 mr-1"></i>
|
2021-08-04 12:02:35 +08:00
|
|
|
|
<span class="badge badge-secondary"><?php echo $this->commentsNum?> 条评论</span>
|
|
|
|
|
</span>
|
|
|
|
|
<?php endif; ?>
|
2021-08-03 20:45:41 +08:00
|
|
|
|
<!-- 暂时找不到好的办法让这个很好地兼容 Bootstrap 的写法 -->
|
|
|
|
|
<!-- <ul class="post-near">
|
|
|
|
|
<li>上一篇: <?php #$this->thePrev('%s','没有了'); ?></li>
|
|
|
|
|
<li>下一篇: <?php #$this->theNext('%s','没有了'); ?></li>
|
|
|
|
|
</ul> -->
|
2021-07-25 09:12:40 +08:00
|
|
|
|
<?php $this->need('comments.php'); ?>
|
|
|
|
|
</div><!-- end #main-->
|
|
|
|
|
|
|
|
|
|
<?php $this->need('footer.php'); ?>
|