-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
51 lines (50 loc) · 1.89 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
<?php
/**
* typecho 简洁双栏主题 himk
*
* @package himk
* @author LMS
* @version 2.0.0
* @link https://lms.im/theme/typecho-simple-theme-himk.html
*/
$this->need('header.php'); ?>
<main id="main">
<div class="container">
<div id="content">
<div class="post-lists">
<?php while($this->next()): ?>
<article class="post">
<h2 class="title"><a href="<?php $this->permalink() ?>"><?php $this->title() ?></a></h2>
<div class="post-meta">
<img src="<?php getAvatarByEmail($this->author->mail,30); ?>">
<a itemprop="name" href="<?php $this->author->permalink(); ?>" rel="author"><span><?php $this->author(); ?></span></a>
<span class="post-time"><?php $this->date(); ?></span>
</div>
<div class="entry xentry">
<?php
if (false !== strpos($this->text, '<!--more-->')) {
echo str_replace('<p></br></p>', '', $this->excerpt);
} else {
$str = preg_replace('/<script>.*?<\/script>/is', '', $this->excerpt);
echo '<p>'.Typecho_Common::subStr(strip_tags($str), 0, '120', '...').'</p>';
} ?>
</div>
<div class="post-meta">
<p>
<?php $this->category(' / ');?>
<span class="comments-link"><a href="<?php $this->permalink() ?>#comments" title="查看评论"><?php $this->commentsNum('评论 0', '评论 1', '评论 %d'); ?></a></span>
<span class="read-more"><a href="<?php $this->permalink() ?>" title="详细阅读 <?php $this->title() ?>" rel="bookmark" class="title">全文阅读</a></span>
</p>
</div>
<div id="comment-<?php $this->cid(); ?>" class="entry-comments plus"></div>
</article>
<?php endwhile; ?>
</div>
<nav class="navigation">
<?php $this->pageNav(); ?>
</nav>
</div>
<?php $this->need('sidebar.php'); ?>
</div>
</main>
<?php $this->need('footer.php'); ?>