-
Notifications
You must be signed in to change notification settings - Fork 4
/
page-articles.php
49 lines (45 loc) · 2.19 KB
/
page-articles.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
/**
* 归档页
*
* @package custom
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
$this->need('header.php'); ?>
<div class="page-wrap">
<div class="page-wrap-content">
<div class="post-single-wrap sticky-parent">
<div class="single-content wp-content">
<div class="wrap wrap-center">
<div class="wrap_float">
<section
class="articles-list <?php if ($this->options->bcool_animate !== "close" || !empty($this->options->bcool_animate)) : ?>animate__animated animate__<?php $this->options->bcool_animate() ?><?php endif; ?>">
<?php
$stat = Typecho_Widget::widget('Widget_Stat');
$this->widget('Widget_Contents_Post_Recent', 'pageSize=' . $stat->publishedPostsNum)->to($archives);
$year = 0;
$mon = 0;
$i = 0;
$j = 0;
$output = '<section>';
while ($archives->next()) {
$year_tmp = date('Y', $archives->created);
if ($year != $year_tmp) {
$year = $year_tmp;
$output .= '<h2>' . $year . '</h2>';
}
if ($this->options->PjaxOption && $archives->hidden) {
$output .= '<div class="post"><a href="' . $archives->permalink . '"><div class="post-row"><time>' . date('M j', $archives->created) . '</time><h3>' . $archives->title . '</h3></div></a></div>';
} else {
$output .= '<div class="post"><a href="' . $archives->permalink . '"><div class="post-row"><time>' . date('M j', $archives->created) . '</time><h3>' . $archives->title . '</h3></div></a></div>';
}
}
$output .= '</section>';
echo $output;
?>
</section>
</div>
</div>
</div>
</div>
<?php $this->need('footer.php'); ?>