forked from dyedd/lanstar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive.php
55 lines (54 loc) · 2.33 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
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('layout/header.php'); ?>
<div class="container">
<div class="row">
<?php $this->need('layout/left.php'); ?>
<div class="col-xl-7 col-md-6 col-12" id="pjax-container">
<section class="article-info mb-3">
<div class="article-detail">
<?php if ($this->is('category', $category->slug)): ?>
<h1 class="archive-title text-center p-3"><?php $this->archiveTitle(array(
'category' => _t('分类 %s 下的文章'),
'search' => _t('包含关键字 %s 的文章'),
'tag' => _t('标签 %s 下的文章'),
'author' => _t('%s 发布的文章')
), '', ''); ?></h1>
<?php endif; ?>
</div>
<div class="article-cover-inner">
<img src="<?php echo $this->fields->banner ?: utils::getAssets('img/default.jpg'); ?>" alt="cover">
</div>
</section>
<?php if ($this->have()): ?>
<?php $this->need('component/index.article.php'); ?>
<?php else: ?>
<article class="post">
<h2 class="post-title"><?php _e('没有找到内容'); ?></h2>
</article>
<?php endif; ?>
<div class="page-pagination">
<?php
$this->pageNav(
'<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-zuo"></use>
</svg>',
'<svg class="icon" aria-hidden="true">
<use xlink:href="#icon-you"></use>
</svg>',
3, '...', array(
'wrapTag' => 'ul',
'wrapClass' => 'pagination justify-content-center',
'itemTag' => 'li',
'itemClass' => 'page-item',
'linkClass' => 'page-link',
'currentClass' => 'active'
));
?>
</div>
</div>
<?php $this->need('layout/right.php'); ?>
</div>
</div>
<?php $this->need('component/index.footer.php'); ?>
</body>
</html>