This repository has been archived by the owner on Aug 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathindex.php
79 lines (66 loc) · 2.73 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
<?php
/**
* 一款移植 <a target="_blank" href="https://github.com/imhanjie/gridea-theme-pure">IMHANJIE</a> 设计的主题 <br /> 默认内置 "简约白"、"暗夜黑"、"银光灰"、"墨草绿" 4 种配色方案。
*
* @package Pure
* @author imhanjie,夏目贵志
* @version 0.3
* @link https://xiamuyourenzhang.cn/
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
$this->need('header.php');
?>
<div class="post-list-container">
<div class="post-inner">
<!-- 文章置顶
<span class="sticky-top-flag gt-bg-accent-color-first">置顶</span>
-->
<?php if ($this->is('index') && $this->_currentPage == 1): // 判断是否是首页 分页不输出 - 这段删了就是全站置顶 ?>
<?php if ($this->options->sticky): $this->options->sticky(); // 输出后台设置的手动置顶 ?>
<?php endif; ?>
<?php endif; ?>
<?php while ($this->next()): ?>
<div class="post gt-bg-theme-color-second">
<div class="post-left">
<div>
<a href="<?php $this->permalink(); ?>">
<span class="post-title gt-c-content-color-first"><?php $this->title(); ?></span>
</a>
</div>
<a href="<?php $this->permalink(); ?>">
<div class="gt-post-content post-abstract gt-c-content-color-second">
<p><?php $this->excerpt('180', '...'); ?></p>
</div>
</a>
<div class="post-info">
<time class="post-time gt-c-content-color-first">
发布于 · <?php $this->date(); ?> ·
</time>
<?php _e('# '); ?>
<?php $this->category(' # ', true, 'none'); ?>
<?php if (count($this->tags) > 0): ?>
<?php _e('# '); ?>
<?php $this->tags(' # ', true, 'none'); ?>
<?php endif; ?>
<!-- printTag($this); PHP 自定义标签样式 -->
</div>
</div>
<?php if (yotu($this) == 1): ?>
<a href="<?php $this->permalink(); ?>" class="post-feature-image"
style="background-image: url('<?php showThumbnail($this); ?>')">
</a>
<?php else: ?>
<!-- 不存在 -->
<?php endif; ?>
</div>
<?php endwhile; ?>
</div>
</div>
<div class="pagination-container">
<?php $this->pageLink('上一页'); ?>
当前页码:<?php if ($this->_currentPage > 1) echo $this->_currentPage; else echo 1; ?>
·
总页码:<?php echo ceil($this->getTotal() / $this->parameter->pageSize); ?>
<?php $this->pageLink('下一页', 'next'); ?>
</div>
<?php $this->need('footer.php'); ?>