forked from ihewro/typecho-theme-leaf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive-time.php
53 lines (45 loc) · 1.25 KB
/
archive-time.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
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php
/**
* archive-time
*
* @package custom
*/
$this->need('header.php'); ?>
<div id="pjax-container">
<style>
#screen{
display:none;
}
</style>
<div id="screen">
<div id="mark">
<div class="layer" data-depth="0.20">
<img id="cover" />
</div>
</div>
</div>
<div class="footer-clear archive">
<?php
$this->widget('Widget_Contents_Post_Recent', 'pageSize=10000')->to($archives);
$year=0; $i=0; $j=0;
$output = '';
while($archives->next()):
$year_tmp = date('Y',$archives->created);
$y=$year;
if ($year != $year_tmp && $year > 0) $output .= '';
if ($year != $year_tmp) {
$year = $year_tmp;
$output .= '<h2 class="archive-year">'. $year .'</h2>';
}
$output .= '<li><a class="transition archive-iterm" href="'.$archives->permalink .'"><h3 class="archive-title">'. $archives->title .'</h3><p class="archive-date">'.date('F jS ',$archives->created).'</p></a></li>';
endwhile;
$output .= '';
echo $output;
?>
<!-- footer -->
<?php $this->need('footer.php'); ?>
</div>
</div>
<!-- menu -->
<?php $this->need('menu.php'); ?>