-
Notifications
You must be signed in to change notification settings - Fork 38
/
page-indexII.php
52 lines (50 loc) · 2.09 KB
/
page-indexII.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
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php
/**
* 首页 二
*
* @package custom
*/
$this->need('header.php');
?>
<div class="container-fluid">
<div class="row">
<div id="main" class="col-12 clearfix" role="main">
<article class="posti" itemscope itemtype="http://schema.org/BlogPosting">
<div id="postTorTree">
<div id="indexIITor">
<?php $this->widget('Widget_Metas_Tag_Cloud', 'sort=count&ignoreZeroCount=1&desc=1')->to($tags); ?>
<?php while ($tags->next()) : ?>
<span><a href="<?php $tags->permalink(); ?>"><?php $tags->name(); ?></a></span>
<?php endwhile; ?>
</div>
</div>
<div id="indexIIList">
<?php
$this->widget('Widget_Contents_Post_Recent', 'pageSize=896006')->to($obj);
$year = $mon = $i = $j = 0;
$output = '';
while ($obj->next()) {
$catHTML = '';
$year_tmp = date('Y', $obj->created);
$mon_tmp = date('m', $obj->created);
$y = $year;
$m = $mon;
if ($year != $year_tmp && $year > 0) $output .= '</ul>';
if ($year != $year_tmp) {
$year = $year_tmp;
$output .= '<h4>' . $year . '</h4><ul>';
}
foreach ($obj->categories as $key => $c) {
$catHTML .= ' <a href="' . $c['permalink'] . '">#' . $c['name'] . '</a>';
}
$output .= '<li>' . '<a href="' . $obj->permalink . '">' . $obj->title . '</a><span>' . date('n.j', $obj->created) . $catHTML . '</span></li>';
}
echo $output;
?>
</div>
</article>
</div>
</div>
</div>
<?php $this->need('footer.php'); ?>