-
Notifications
You must be signed in to change notification settings - Fork 15
/
archive.php
68 lines (64 loc) · 3.15 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
<div><?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<div class="wrapper"><!-- #wrapper start -->
<div class="container">
<div class="row"><!-- #row start -->
<div class="col-md-8"><!-- #md-8 start -->
<div class="main"><!-- #main start -->
<div class="bread">
<div class="crumbs_patch">
<a href="<?php $this->options->siteUrl(); ?>">Home</a> »
<?php if ($this->is('index')): ?><!-- 页面为首页时 -->
Index
<?php elseif ($this->is('post')): ?><!-- 页面为文章单页时 -->
<?php $this->category(); ?> » <?php $this->title() ?>
<?php else: ?><!-- 页面为其他页时 -->
<?php $this->archiveTitle(' » ','',''); ?>
<?php endif; ?>
</div>
</div>
<div class="boxcont"><!-- article start -->
<?php if ($this->have()): ?>
<article class="post">
<header class="post-head">
<h3 class="post-title"><?php $this->archiveTitle(array(
'category' => _t('分类 %s 下的文章'),
'search' => _t('包含关键字 %s 的文章'),
'tag' => _t('标签 %s 下的文章'),
'author' => _t('%s 发布的文章')
), '', ''); ?></h3>
</header>
</article>
<?php while($this->next()): ?>
<article class="post">
<header class="post-head">
<h3 class="post-title"> <a href="<?php $this->permalink() ?>"><?php $this->title() ?></a></h3>
<span style="color: #aaa">发布于</span> <time datetime="<?php $this->date('c') ?>" class="post-time"><?php $this->date('Y年m月d日'); ?></time>
</header>
<section class="post-content">
<?php $this->excerpt('200', '...') ?>
</section>
<footer class="post-foot-warp">
<ul class="post-tag fl">
<li><span class="glyphicon glyphicon-tags" aria-hidden="true"></span><?php $this->tags('</li><li>', true, '<a>None</a>') ?></li>
</ul>
<a href="<?php $this->permalink() ?>" class="post-foot-link fr">阅读更多</a>
</footer>
</article>
<?php endwhile; ?>
</div> <!-- article end -->
<nav class="page-nav"><?php $this->pageNav('«', '»'); ?></nav>
</div><!-- #main end -->
</div><!-- #md-8 end -->
<?php else: ?>
<div class="post">
<div class="post-head">
<h3 class="post-title"><?php _e('并没有找到你要的'); ?></h3>
</div>
</div>
</div><!-- #main end -->
</div><!-- #md-8 end -->
</div><!-- #md-8 end -->
<?php endif; ?>
<?php $this->need('sidebar.php'); ?>
<?php $this->need('footer.php'); ?></div>