-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive.php
executable file
·54 lines (44 loc) · 2.45 KB
/
archive.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<div class="col-mb-12 col-8" id="main" role="main">
<h3 class="archive-title"><?php $this->archiveTitle([
'category' => _t('分类 %s 下的文章'),
'search' => _t('包含关键字 %s 的文章'),
'tag' => _t('标签 %s 下的文章'),
'author' => _t('%s 发布的文章')
], '', ''); ?></h3>
<?php if ($this->have()): ?>
<?php while ($this->next()): ?>
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
<h2 class="post-title" itemprop="name headline"><a itemprop="url"
href="<?php $this->permalink() ?>"><?php $this->title() ?></a>
</h2>
<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>
<?php if (date('Y-m-d', $this->created) !== date('Y-m-d', $this->modified)) : ?>
<li>
<?php _e('更新于: '); ?><time datetime="<?php echo date(c, $this->modified); ?>" itemprop="dateModified"><?php echo date('Y-m-d', $this->modified); ?></time>
</li>
<?php endif; ?>
<li><?php _e('分类: '); ?><?php $this->category(','); ?></li>
<li itemprop="interactionCount"><a
href="<?php $this->permalink() ?>#comments">评论</a>
</li>
</ul>
</article>
<?php endwhile; ?>
<?php else: ?>
<article class="post">
<h2 class="post-title"><?php _e('没有找到内容'); ?></h2>
</article>
<?php endif; ?>
<?php $this->pageNav('« 前一页', '后一页 »'); ?>
</div><!-- end #main -->
<?php $this->need('sidebar.php'); ?>
<?php $this->need('footer.php'); ?>