-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
51 lines (47 loc) · 1.76 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
/**
* Theme for typecho - http://typecho.org
*
* @package Sonate for Typecho
* @author insomnux
* @version 1.0
* @link https://github.com/insomnux/sonate-for-typecho
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
$this->need('header.php');
?>
<main>
<section id="content">
<?php
$i = 0;
$title_style = array( 'style1', 'style2', 'style3', 'style4', 'style5', 'style6', 'style7', 'style8');
shuffle($title_style);
while($this->next()):
$this_style = $title_style[$i];
$i++;
if ($i >= count($title_style)) {
$i = 0;
}
?>
<article class="posts post-list <?php echo $this_style; ?>" itemscope itemtype="http://schema.org/BlogPosting">
<div class="title-box">
<h2 class="post-title" itemprop="name headline"><a itemprop="url" href="<?php $this->permalink() ?>"><?php $this->title(25,'...') ?></a></h2>
<div class="post-meta"><span><?php _e('Posted by'); ?></span> <a itemprop="name" href="<?php $this->author->permalink(); ?>" rel="author"><?php $this->author(); ?></a>, <span><?php _e('on'); ?></span> <time itemprop="datePublished" datetime="<?php $this->date('c'); ?>"><?php $this->date(); ?></time></div>
<div class="post-cat"><span><?php _e('Category'); ?>:</span> <?php $this->category(',');?></div>
</div><!-- ./.title-box -->
<div class="post-content" itemprop="articleBody"><?php $this->excerpt(350,' ...'); ?><p class="more"><a href="<?php $this->permalink(); ?>"><?php _e('Read more →'); ?></a></p></div>
</article>
<?php
endwhile;
?>
<!-- Page navigation links -->
<div class="pagenav">
<p><?php _e('See more posts'); ?></p>
<?php
$this->pageNav('←', '→', '1','...');
?>
</div>
</section><!-- /#content -->
<?php
$this->need('sidebar.php');
$this->need('footer.php');