This repository has been archived by the owner on May 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.php
49 lines (48 loc) · 2.29 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
<?php
/**
* 一款简洁并专注于显示文字内容的 Material Design 风格 Typecho 主题,基于 <a href="https://www.mdui.org/">MDUI</a>
*
* @package materiality-typecho-theme
* @author EAimTY
* @version 4.8.10
* @link https://www.eaimty.com/
*/
?>
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<?php while ($this->next()): ?>
<div class="mdui-card mdui-hoverable mdui-m-y-3">
<div class="mdui-card-primary">
<div class="mdui-card-primary-title"><a class="mdui-text-color-theme-accent" href="<?php $this->permalink(); ?>"><?php $this->title(); ?></a></div>
<div class="mdui-card-primary-subtitle mdui-text-color-theme-text">
<?php $this->date(); ?>
<?php if (!empty($this->options->article) && in_array('author', $this->options->article)): ?>
<span> |</span><i class="mdui-icon materiality-icons"></i><a href="<?php $this->author->permalink(); ?>"><?php $this->author(); ?></a>
<?php endif; ?>
<?php if ($this->category && !empty($this->options->article) && in_array('category', $this->options->article)): ?>
<span> | </span><i class="mdui-icon materiality-icons"></i><?php $this->category(', '); ?>
<?php endif; ?>
</div>
</div>
<div class="mdui-card-content mdui-typo"><?php if (!empty($this->options->feature) && in_array('pangu', $this->options->feature)) echo "<pangu>"; ?><?php $this->content(); ?><?php if (!empty($this->options->feature) && in_array('pangu', $this->options->feature)) echo "</pangu>"; ?></div>
<div class="mdui-card-actions">
<a class="mdui-btn mdui-ripple mdui-text-color-theme-accent" href="<?php $this->permalink(); ?>">继续阅读</a>
</div>
</div>
<?php endwhile; ?>
<?php ob_start(); ?>
<div class="mdui-m-y-3 page-nav">
<?php $this->pageNav('', '', 2, '...', [
'itemTag' => '',
'textTag' => 'span',
'currentClass' => 'mdui-btn-active',
'prevClass' => 'mdui-icon materiality-icons',
'nextClass' => 'mdui-icon materiality-icons',
'wrapTag' => 'div',
'wrapClass' => 'mdui-btn-group'
]); ?>
</div>
<?php $pageNavHTML = ob_get_contents(); ?>
<?php ob_end_clean(); ?>
<?php getPageNav($pageNavHTML, ceil($this->getTotal())); ?>
<?php $this->need('footer.php'); ?>