-
Notifications
You must be signed in to change notification settings - Fork 27
/
index.php
41 lines (38 loc) · 1.69 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
<?php
/**
* 一套简洁的,带自适应的主题
*
* @package Mirages
* @author Hran
* @version 1.2.0
* @link http://hran.me
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
$this->need('header.php');
?>
<div id="index" role="main">
<?php while($this->next()): ?>
<article itemscope itemtype="http://schema.org/BlogPosting">
<div class="post" id="index-post">
<a href="<?php $this->permalink() ?>"><h2 class="post-title" itemprop="headline"><?php $this->title() ?></h2></a>
<div class="post-info">
<span itemprop="datePublished"><?php $this->date('F j, Y'); ?> on </span>
<span itemprop="categoryPublished"><?php $this->category(','); ?></span>
<?php $parsed = parse_url($this->permalink);?>
<?php if(strlen($this->options->disqusShortName) > 0):?>
<span class="comments"><a href="<?php $this->permalink() ?>#disqus_thread" data-disqus-identifier="<?= $parsed['path'];?>">评论</a></a></span>
<?php elseif(strlen($this->options->duoshuoShortName) > 0):?>
<span class="comments"><a href="<?php $this->permalink() ?>#comments"><span class="ds-thread-count" data-thread-key="<?php echo $this->cid;?>" data-count-type="comments"></span></a></span>
<?php else:?>
<span class="comments"><a href="<?php $this->permalink() ?>#comments"><?php $this->commentsNum('评论', '1 条评论', '%d 条评论'); ?></a></span>
<?php endif?>
</div>
<div class="post-content" itemprop="description">
<p><?php $this->content("Continue Reading..."); ?></p>
</div>
</div>
</article>
<?php endwhile; ?>
<?php $this->pageNav('«', '»'); ?>
</div><!-- end #main-->
<?php $this->need('footer.php'); ?>