-
Notifications
You must be signed in to change notification settings - Fork 30
/
index.php
80 lines (72 loc) · 2.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
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
/**
* Bigfa by <a href="https://jozhn.com">Jozhn</a>
*
* @package Bigfa
* @author Jozhn
* @version 2.0
* @link https://jozhn.com
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php if(isset($_GET['load_type']) and $_GET['load_type'] == 'ajax'): ?>
<?php while($this->next()): ?>
<article class="block--list" itemscope="itemscop" itemtype="http://schema.org/BlogPosting">
<div class="block-content">
<h2 class="block-title" itemprop="headline">
<a itemtype="url" href="<?php $this->permalink() ?>">
<?php $this->title() ?>
</a>
</h2>
<div class="block-snippet" itemprop="about">
<?php $this->excerpt(80,'...'); ?>
</div>
<div class="block-postMeta">
<a href="<?php $this->permalink() ?>" rel="category tag"><?php $this->category(','); ?></a>
<span class="middotDivider"></span>
<time itemprop="datePublished" datetime="<?php $this->date('Y-m-d H:i:s'); ?>"><?php $this->date('Y-m-d H:i:s');?></time>
</div>
</div>
<?php if(thumb($this->cid,1)!=null): ?>
<a class="block-image" aria-label="<?php $this->title() ?>" href="<?php $this->permalink() ?>" style="background-image: url(<?php echo thumb($this->cid,1); ?>);"></a>
<?php endif; ?>
</article>
<?php endwhile; ?>
<?php return; ?>
<?php endif ?>
<?php
$this->need('header.php');
?>
<div class="layoutMultiColumn-container u-paddingTop50">
<div class="layoutMultiColumn layoutMultiColumn--primary">
<div class="widget-title u-xs-hide">
最新文章
</div>
<div class="blockGroup" id="blockGroup">
<?php while ($this->next()): ?>
<article class="block--list" itemscope="itemscope" itemtype="http://schema.org/Article">
<div class="block-content">
<h2 class="block-title" itemprop="headline">
<a href="<?php $this->permalink() ?>"><?php $this->title() ?></a>
</h2>
<div class="block-snippet" itemprop="about">
<?php $this->excerpt(80,'...'); ?>
</div>
<div class="block-postMeta">
<a href="<?php $this->permalink() ?>" rel="category tag"><?php $this->category(','); ?></a>
<span class="middotDivider"></span>
<time itemprop="datePublished" datetime="<?php $this->date('Y-m-d H:i:s'); ?>"><?php $this->date('Y-m-d');?></time>
</div>
</div>
<?php if(thumb($this->cid,1)!=null): ?>
<a class="block-image" aria-label="<?php $this->title() ?>" href="<?php $this->permalink() ?>" style="background-image: url(<?php echo thumb($this->cid,1); ?>);"></a>
<?php endif; ?>
</article>
<?php endwhile; ?>
</div>
<div class="block-more">
<button id="show-more" onclick ="load_more_post()" class="button button--primary button--small">加载更多</button>
</div>
</div>
<?php if(!is_mobile()): $this->need('sidebar.php'); endif;?>
</div>
<?php $this->need('footer.php'); ?>