forked from BigCoke233/adams
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
48 lines (48 loc) · 2.13 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
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Theme Adams | 一款移植自 Wordpress 的简洁主题
*
* @package Adams
* @author Eltrac
* @version 1.0.0
* @link https://guhub.cn
*/
$this->need('header.php');
?>
<!-- Post List -->
<section class="posts main-load">
<div class="container">
<div class="post-list">
<?php if ($this->have()): ?>
<?php while($this->next()): ?>
<article class="meta" itemscope="" itemtype="http://schema.org/BlogPosting">
<header>
<a href="<?php $this->permalink(); ?>" itemprop="url"><h2 itemprop="name headline"><?php $this->title(); ?></h2></a>
</header>
<main>
<?php if($this->fields->banner && $this->fields->banner!=''){ ?>
<a href="<?php $this->permalink(); ?>" class="thumb" style="background-image: url('<?php $this->fields->banner(); ?>');"></a>
<?php };?>
<p itemprop="articleBody">
<?php $this->excerpt(200); ?>
</p>
</main>
<footer>
<span class="time"><time datetime="<?php $this->date('c'); ?>" itemprop="datePublished" pubdate><?php $this->date('Y-m-d'); ?></time>published</span>
<span class="hr"></span>
<span class="comments"><?php $this->commentsNum('No comment', '1 comment', '%d comments'); ?></span>
</footer>
</article>
<?php endwhile; else: ?>
<article class="meta">
<h3 style="font-size: 3em;margin: 0 0 20px;color: #000;">Sorry!</h3>
<p>Nothing found what you needed.</p>
</article>
<?php endif; ?>
<nav class="reade_more">
<?php $this->pageNav('«', '»'); ?>
</nav>
</div>
</div>
</section>
<?php $this->need('footer.php'); ?>