Complete meta info (post.php)
This commit is contained in:
parent
4d9660e46b
commit
2f2d0bca1b
39
post.php
39
post.php
|
@ -6,17 +6,46 @@
|
|||
<h1 class="font-weight-bold post-title" itemprop="name headline">
|
||||
<a itemprop="url" href="<?php $this->permalink() ?>"><?php $this->title() ?></a>
|
||||
</h1>
|
||||
<ul class="post-meta">
|
||||
<li itemprop="author" itemscope itemtype="http://schema.org/Person"><?php _e('作者: '); ?><a itemprop="name" href="<?php $this->author->permalink(); ?>" rel="author"><?php $this->author(); ?></a></li>
|
||||
<li><?php _e('时间: '); ?><time datetime="<?php $this->date('c'); ?>" itemprop="datePublished"><?php $this->date(); ?></time></li>
|
||||
<li><?php _e('分类: '); ?><?php $this->category(','); ?></li>
|
||||
</ul>
|
||||
<div>
|
||||
<i class="far fa-calendar-alt"></i> <time datetime="<?php $this->date('c'); ?>" itemprop="datePublished"><?php $this->date('Y-m-d D h:i a'); ?></time>
|
||||
<?php if ($this->user->hasLogin()): ?>
|
||||
<a class="badge badge-primary" href="<?php $this->options->siteUrl();?>admin/write-post.php?cid=<?php $this->cid();?>">
|
||||
<i class="far fa-edit"></i>
|
||||
<?php _e('编辑'); ?>
|
||||
</a>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="post-content" itemprop="articleBody">
|
||||
<?php $this->content(); ?>
|
||||
</div>
|
||||
<!--<p itemprop="keywords" class="post-tags"><?php _e('标签: '); ?><?php $this->tags(', ', true, 'none'); ?></p>-->
|
||||
</article>
|
||||
<hr>
|
||||
<span>
|
||||
<i class="fa fa-copyright"></i>
|
||||
<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>
|
||||
<i class="fa fa-folder text-info"></i>
|
||||
<?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>
|
||||
<i class="fa fa-tags text-success"></i>
|
||||
<?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>
|
||||
<i class="fa fa-comments"></i>
|
||||
<span class="badge badge-secondary"><?php echo $this->commentsNum?> 条评论</span>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
<!-- 暂时找不到好的办法让这个很好地兼容 Bootstrap 的写法 -->
|
||||
<!-- <ul class="post-near">
|
||||
<li>上一篇: <?php #$this->thePrev('%s','没有了'); ?></li>
|
||||
|
|
Loading…
Reference in New Issue