/
index.php
80 lines (73 loc) · 2.88 KB
/
index.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
74
75
76
77
78
79
80
<?php
/**
* 一套超级简洁的Typecho主题
*
* @package Tuuu Theme
* @author 王松_Tuuu
* @version 1.0.0
* @link http://www.hackersb.cn
*/
?>
<!--header-->
<?php include('header.php'); ?>
<!--header end-->
<!--main-->
<div class="site-main">
<div class="site-content">
<div class="blog-area">
<?php while($this->next()): ?>
<article class="post">
<div class="post-thumbnail" style="background-image: url(<?php
if (isset($this->fields->bg)){
echo $this->fields->fieldName;
} else {
$rand_num = rand(1,10);
$this->options->themeUrl("img/${rand_num}.jpg");
}
?>);">
<header class="entry-header">
<div class="layout-fixed">
<div class="entry-meta">
<span class="cat-links">
<?php $this->category(''); ?>
</span>
</div>
<h1 class="entry-title">
<a href="<?php $this->permalink() ?>"><?php $this->title() ?></a>
</h1>
<div class="entry-meta">
<span class="entry-date">
<i class="icon-clock"></i>
<a href="#"><?php $this->date('Y-m-d'); ?></a>
</span>
<span class="comment-link">
<i class="icon-comment"></i>
<a href="#"><?php $this->commentsNum('%d'); ?> 条评论</a>
</span>
<span class="author">
<i class="icon-user-outline"></i>
<a href="<?php $this->author->permalink(); ?>"><?php $this->author(); ?></a>
</span>
</div>
</div>
</header>
</div>
</article>
<?php endwhile; ?>
</div>
<div class="layout-fixed">
<div class="navigation">
<div class="nav-previous">
<?php $this->pageLink('<span class="meta-nav">←</span>上一页'); ?>
</div>
<div class="nav-next">
<?php $this->pageLink('下一页<span class="meta-nav">→</span>','next'); ?>
</div>
</div>
</div>
</div>
</div>
<!--main end-->
<!--footer-->
<?php include('footer.php'); ?>
<!--footer end-->