This repository has been archived by the owner on Sep 2, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy patharchive.php
73 lines (73 loc) · 4.05 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<div class="mdui-card mdr-breadcrumbs">
<span class="mdui-chip-icon"><i class="mdui-icon material-icons"></i></span>
<span class="mdui-chip-title mdui-p-l-0">
<a href="<?php $this->options->siteUrl(); ?>"><?= _t('首页') ?></a> »
<?php $this->archiveTitle([
'category' => _t('分类「%s」下的文章'),
'search' => _t('包含关键字「%s」的文章'),
'tag' => _t('标签「%s」下的文章'),
'date' => _t('在「%s」发布的文章'),
'author' => _t('作者「%s」发布的文章')
], '', ''); ?>
</span>
</div>
<?php if ($this->have()) : ?>
<?php while ($this->next()) : ?>
<?php if (mdrIsStatus($this) && !$this->hidden) : /* Status Post */ ?>
<article class="mdr-post mdui-card mdui-shadow-0 status post<?php if ($this->options->PjaxOption && $this->hidden) : ?> protected<?php endif; ?>">
<div class="tag"><i class="mdui-icon material-icons"></i></div>
<div class="time mdui-text-right">
<i class="mdui-icon material-icons mdr-icon-info"></i> <?php $this->date(); ?>
</div>
<article class="inner">
<span class="mdui-typo">
<?php $this->content(); ?>
</span>
</article>
</article>
<?php else : /* Normal Post */ ?>
<article class="mdr-post mdui-card mdui-hoverable post<?php if ($this->options->PjaxOption && $this->hidden) : ?> protected<?php endif; ?>">
<a href="<?php $this->permalink() ?>">
<?php if (!$this->hidden && postThumb($this)) : /* If theres thumb */ ?>
<div class="mdui-card-media">
<?= postThumb($this); ?>
</div>
<?php endif; ?>
<div class="mdui-card-primary mdui-p-b-0">
<div class="mdui-card-primary-title"><?php $this->title() ?></div>
</div>
<div class="mdui-card-content mdui-p-b-1 mdui-typo">
<?php if ($this->options->PjaxOption && $this->hidden) : ?>
<?= _t('这篇文章受密码保护,输入密码才能看哦') ?>
<?php else : ?>
<?php $this->excerpt(200, ''); ?>
<?php endif; ?>
</div>
<div class="mdui-card-content mdui-p-t-1">
<div class="mdui-card-primary-subtitle">
<div class="mdui-card-primary-subtitle">
<i class="mdui-icon material-icons mdr-icon-info"></i>
<?php $this->date(); ?>
<i class="mdui-icon material-icons mdr-icon-info"></i>
<?php $this->category(' ', false); ?>
<i class="mdui-icon material-icons mdr-icon-info"></i>
<?php $this->commentsNum(_t('暂无评论'), _t('%d 条评论')); ?>
<i class="mdui-icon material-icons mdr-icon-info"></i>
<?php Postviews($this); ?>
</div>
</div>
</div>
</a>
</article>
<?php endif; ?>
<?php endwhile; ?>
<?php else : ?>
<div class="error-page">
<div class="mdui-typo-display-1">404 Not Found</div>
<p><?= _t('没有找到你想要的结果') ?></p>
</div>
<?php endif; ?>
<?php $this->pageNav('', _t('查看更多'), 0, '', array('wrapClass' => 'ajaxload mdui-p-a-0')); ?>
<?php $this->need('footer.php'); ?>