-
Notifications
You must be signed in to change notification settings - Fork 5
/
page.files.php
116 lines (115 loc) · 8.57 KB
/
page.files.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?php
/**
* 文章归档
*
* @package custom
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
$this->need('header.php');
?>
<body>
<div class="content index width mx-auto px3 my4">
<header id="header">
<a href="<?php $this->options->siteUrl();?>">
<div id="logo" style="background-image: url(<?php if($this->options->logoimg): ?><?php $this->options->logoimg();?><?php else : ?><?php $this->options->themeUrl('images/logo.png'); ?><?php endif; ?>);"></div>
<div id="title">
<h1 style="color:#2bbc8a;margin:1rem;font-size:36px;line-height:42px;"><?php $this->title() ?></h1>
</div>
</a>
<div id="nav">
<ul style ="padding-inline-start:0px;">
<li class="icon"><a href="#"><i class="fa fa-bars fa-2x"></i></a></li>
<li style ="padding:0px;margin:0px;"><b><a href="<?php $this->options->siteUrl();?>">首页</a></b></li>
<li style ="padding:0 0 0 5px;margin:0px;"><b><a href="<?php $this->options->siteUrl();?>music/" target="_blank" title="网易云音乐">音乐</a></b></li>
<?php $this->widget('Widget_Metas_Category_List')->to($categorys);while($categorys->next()):?>
<li style ="padding:0 0 0 5px;margin:0px;"><b><a href="<?php $categorys->permalink(); ?>"><?php $categorys->name(); ?></a></b></li>
<?php endwhile;?>
<?php $this->widget('Widget_Contents_Page_List')->parse('<li style ="padding:0 0 0 5px;margin:0px;"><b><a href="{permalink}">{title}</a></b></li>'); ?>
<li class="tooltip" data-msg="随机访问一位“十年之约”博友!" style ="padding:0 0 0 5px;margin:0px;"><b><a href="https://foreverblog.cn/go.html" rel="nofollow" target="_blank">虫洞</a></b></li>
<li class="tooltip" data-msg="随机访问一位“开往”博友!" style ="padding:0 0 0 5px;margin:0px;"><b><a href="https://www.travellings.cn/go.html" rel="nofollow" target="_blank">开往</a></b></li>
</ul>
</div>
</header>
<section id="wrapper" class="home">
<h3 class="panel" style="color:#2bbc8a;">站点统计</h3>
<?php Typecho_Widget::widget('Widget_Stat')->to($stat); ?>
<table width="100%" style="border: 1px solid #333;" summary="《<?php $this->options->title(); ?>》博客统计">
<tbody>
<tr>
<td width="18%" align="center" style="border-right: 1px dashed #333;border-bottom: 1px dashed #333;">分类:<br></td>
<td colspan="3" align="left" style="border-bottom: 1px dashed #333;word-break:break-all;"><small>( 共<b style="font-size:18px;margin:0 5px 5px 5px;"><?php $stat->categoriesNum();?></b>类 )</small><br/>“折腾”: <?php fenleinum(1); ?> 篇; “杂记”: <?php fenleinum(3); ?> 篇; “读书”: <?php fenleinum(55); ?> 篇; “饭碗”: <?php fenleinum(48); ?> 篇</td>
</tr>
<tr>
<td width="18%" align="center" style="border-right: 1px dashed #333;border-bottom: 1px dashed #333;">运行:</td>
<td width="30%" align="left" style="border-right: 1px dashed #333;border-bottom: 1px dashed #333;"> <?php echo $this->options->zmki_time?round((time() - strtotime($this->options->zmki_time)) / 86400, 0) . '':'0'; ?> 天</td>
<td width="18%" align="center" style="border-right: 1px dashed #333;border-bottom: 1px dashed #333;">更新:</td>
<td width="30%" align="left" style="border-bottom: 1px dashed #333;"> <?php echo get_last_update();?></td>
</tr>
<tr>
<td width="18%" align="center" style="border-right: 1px dashed #333;border-bottom: 1px dashed #333;">周更:</td>
<td width="30%" align="left" style="border-right: 1px dashed #333;border-bottom: 1px dashed #333;"> <?php echo getNumPosts(7); ?> 篇</td>
<td width="18%" align="center" style="border-right: 1px dashed #333;border-bottom: 1px dashed #333;">月更:</td>
<td width="30%" align="left" style="border-bottom: 1px dashed #333;"> <?php echo getNumPosts(30); ?> 篇</td>
</tr>
<tr>
<td width="18%" align="center" style="border-right: 1px dashed #333;border-bottom: 1px dashed #333;">文章:</td>
<td width="30%" align="left" style="border-right: 1px dashed #333;border-bottom: 1px dashed #333;"> <?php $stat->publishedPostsNum();?> 篇</td>
<td width="18%" align="center" style="border-right: 1px dashed #333;border-bottom: 1px dashed #333;">标签:</td>
<td width="30%" align="left" style="border-bottom: 1px dashed #333;"> <?php echo tagCount();?> 个</td>
</tr>
<tr>
<?php if($this->user->hasLogin()): ?>
<td width="18%" align="center" style="border-right: 1px dashed #333;border-bottom: 1px dashed #333;">附件:</td>
<td width="30%" align="left" style="border-right: 1px dashed #333;border-bottom: 1px dashed #333;"> <?php echo userstat($this->user->uid,'attachment'); ?> 个</td>
<?php else: ?>
<td width="18%" align="center" style="border-right: 1px dashed #333;border-bottom: 1px dashed #333;">页面:</td>
<td width="30%" align="left" style="border-right: 1px dashed #333;border-bottom: 1px dashed #333;"> <?php $stat->publishedPagesNum();?> 页</td>
<?php endif; ?>
<td width="18%" align="center" style="border-right: 1px dashed #333;border-bottom: 1px dashed #333;">浏览:</td>
<td width="30%" align="left" style="border-bottom: 1px dashed #333;"> <?php echo theAllViews();?> 阅</td>
</tr>
<tr>
<td width="18%" align="center" style="border-bottom: 1px dashed #333;border-right: 1px dashed #333;">评论:</td>
<td width="30%" align="left" style="border-bottom: 1px dashed #333;border-right: 1px dashed #333;"> <?php $stat->publishedCommentsNum();?> 评</td>
<td width="18%" align="center" style="border-bottom: 1px dashed #333;border-right: 1px dashed #333;">点赞:</td>
<td width="30%" align="left" style="border-bottom: 1px dashed #333;"> <?php echo agreeCount();?> 赞</td>
</tr>
<tr>
<td colspan="4" align="center"><?php echo allwords(); ?></td>
</tr>
</tbody>
</table>
</section>
<div id="theme-tagcloud" class="tagcloud-wrap">
<h3 class="panel" style="color:#2bbc8a;">标签云集</h3>
<?php $this->widget('Widget_Metas_Tag_Cloud', 'ignoreZeroCount=1')->to($tags); ?>
<?php while($tags->next()): ?>
<a style="font-size:<?php echo(rand(12, 20)); ?>px; text-transform:capitalize;" href="<?php $tags->permalink(); ?>" title="#<?php $tags->name(); ?>#标签共<?php $tags->count(); ?> 篇文章"> <?php $tags->name(); ?> </a>
<?php endwhile; ?>
</div>
<!--内容页下方ads -->
<?php if($this->options->postdownads): ?><?php $this->options->postdownads();?><?php endif; ?>
<section id="wrapper" class="home">
<h3 class="panel" style="color:#2bbc8a;">文章归档</h3>
<?php
$this->widget('Widget_Contents_Post_Recent', 'pageSize=10000')->to($archives);
$year=0; $mon=0; $i=0; $j=0;$output = '';
while($archives->next()):
$year_tmp = date('Y',$archives->created);
$mon_tmp = date('n',$archives->created);
$y=$year; $m=$mon;
if ($mon != $mon_tmp && $mon > 0) $output .= '</ul></li>';
if ($year != $year_tmp && $year > 0) $output .= '</ul>';
if ($mon != $mon_tmp) {
$mon = $mon_tmp;
@$output .= '<div class="item"><h4 class="panel" style="color:#2bbc8a;">' . $year_tmp . ' 年 ' . $mon . ' 月<span style="float:right;"><i class="fa fa-angle-down" aria-hidden="true"></i></span></h4><ul class="post-list" id="post-list">'; //输出年份
}
$output .= '<li class="post-item" style="white-space: nowrap;text-overflow: ellipsis;overflow: hidden;word-break: break-all;max-width:100%;"><div class="meta"><time datetime="'.date('Y-m-d ',$archives->created).'" itemprop="datePublished">'.date('n月j日 ',$archives->created).'</time></div><span style="white-space: nowrap;text-overflow: ellipsis;overflow: hidden;word-break: break-all;width:780px;max-width:98%;"><a href="'.$archives->permalink .'" title="">'. $archives->title .'</a></span><span class="metatj"><a href="'.$archives->permalink .'#comments" title="">('. $archives->commentsNum.')</a></span></li>'; //输出文章日期和标题以及所属分类
endwhile;
$output .= '</ul></div>';
echo $output;
?>
</section>
</div>
<?php $this->need('footer.php'); ?>
<div>