This repository has been archived by the owner on Sep 2, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
index.php
71 lines (71 loc) · 3.45 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
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* MDr 是一套基于 MDUI 开发的 Typecho 模板
*
* @package MDr
* @author FlyingSky
* @version Petals 0.2 Dev
* @link https://fsky7.com/
*/
$this->need('header.php'); ?>
<?php if ($this->options->sitePic) : ?>
<div class="mdui-card">
<div class="mdui-card-media">
<img src="<?= $this->options->sitePic ?>">
</div>
<div class="mdui-card-primary mdui-p-y-3">
<div class="mdui-card-primary-title"><?php $this->options->title(); ?></div>
<div class="mdui-card-primary-subtitle"><?= $this->options->subTitle ?></div>
</div>
</div>
<?php endif; ?>
<?php while ($this->next()) : ?>
<?php if (mdrIsStatus($this) && !$this->hidden) : /* Status Post */ ?>
<article class="mdui-card mdui-shadow-0 status post<?php if ($this->options->PjaxOption && $this->hidden) : ?> protected<?php endif; ?>">
<div class="tag"><i class="mdui-icon material-icons">message</i></div>
<div class="time mdui-text-right">
<i class="mdui-icon material-icons mdr-icon-info"></i> <?php $this->date(); ?>
</div>
<article class="mdr-post inner">
<span class="mdui-typo">
<?php $this->content(); ?>
</span>
</article>
</article>
<?php else : /* Normal Post */ ?>
<article class="mdr-post mdui-card mdui-hoverable post<?php if ($this->options->PjaxOption && $this->hidden) : ?> protected<?php endif; ?>">
<a href="<?php $this->permalink() ?>">
<?php if (!$this->hidden && postThumb($this)) : /* If theres thumb */ ?>
<div class="mdui-card-media">
<?php echo postThumb($this); ?>
</div>
<?php endif; ?>
<div class="mdui-card-primary mdui-p-b-0">
<div class="mdui-card-primary-title"><?php $this->title() ?></div>
</div>
<div class="mdui-card-content mdui-p-b-1 mdui-typo">
<?php if ($this->options->PjaxOption && $this->hidden)
_e('这篇文章受密码保护,输入密码才能看哦。');
else
$this->excerpt(200, ''); ?>
</div>
<div class="mdui-card-content mdui-p-t-1">
<div class="mdui-card-primary-subtitle">
<div class="mdui-card-primary-subtitle">
<i class="mdui-icon material-icons mdr-icon-info"></i>
<?php $this->date(); ?>
<i class="mdui-icon material-icons mdr-icon-info"></i>
<?php $this->category(' ', false); ?>
<i class="mdui-icon material-icons mdr-icon-info"></i>
<?php $this->commentsNum(_t('暂无评论'), _t('%d 条评论')); ?>
<i class="mdui-icon material-icons mdr-icon-info"></i>
<?php Postviews($this); ?>
</div>
</div>
</div>
</a>
</article>
<?php endif; ?>
<?php endwhile; ?>
<?php $this->pageNav('', _t('查看更多'), 0, '', ['wrapClass' => 'ajaxload hidden mdui-p-a-0']); ?>
<?php $this->need('footer.php'); ?>