-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive.php
287 lines (283 loc) · 9.06 KB
/
archive.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
$this->need('header.php');
?>
<script type="text/javascript">
$(function(){
/*鼠标移入和移出事件*/
$('.menu li').hover(function(){
$(this).find('.two').show();
/*鼠标移入和移出事件*/
$('.two li').hover(function(){
var content=$(this).find('.hide li:first small').text();
if(content != null && content.length != 0){
$(this).find('.hide').show();
}
},function(){
$(this).find('.hide').hide();
});
},function(){
$(this).find('.two').hide();
});
});
</script>
<style>
#nav ul.menu li ul{
position: relative;
top: 0px;
background: #fff;
border: 1px solid #eee;
border-radius: 0 0 3px 3px;
}
#nav ul.menu li ul li{
position: relative;
}
#nav ul.menu li ul li .hide{
position: relative;
top: 0px;
left: 0px;
border: 1px solid #eee;
border-radius: 0 0 3px 3px;
}
.two,.hide{
display:none;
}
</style>
<style>
a{
color:#000;
}
.boxes {
width: 180px;
}
.boxes .box {
height: 60px;
color: #eee;
line-height: 60px;
text-align: center;
font-weight: bold;
transition: all .2s ease;
}
.boxes .box img{
width:100%;
height:100%;
}
.boxes .box:hover {
font-size: 250%;
transform: rotate(360deg);
}
.cat-nav{
width:0.9;
margin:0px auto 10px auto;
background-color:#eeeeee;
}
.cat-nav button{
background-color:#eeeeee;
font-size:90%;
}
@media screen and (max-width: 0.9;) {
.cat-nav {width: 100%;}
}
</style>
<div class="am-g am-g-fixed" style="word-wrap:break-word;">
<div class="am-u-md-9 am-u-md-push-3">
<div class="cat-nav am-round" data-am-sticky="{top:60}">
<div data-am-widget="tabs">
<ul class="am-tabs-nav">
<li><a class="am-btn am-radius" href="<?=$this->options ->siteUrl();?>"><small>全部</small></a></li>
<li id="nav" class="am-dropdown" data-am-dropdown>
<a class="am-dropdown-toggle am-btn am-radius" data-am-dropdown-toggle><small>更多</small><span class="am-icon-caret-down"></span></a>
<ul class="am-dropdown-content menu">
<!--
<?php $this->widget('Widget_Metas_Category_List')->to($cats); ?>
<?php while ($cats->next()): ?>
<li><a href="<?php $cats->permalink()?>" title="<?php $cats->name()?>"><small><?php $cats->name()?></small></a></li>
<?php endwhile; ?>
-->
<?php
$this->widget('Widget_Metas_Category_List')->to($categories);
while($categories->next()){
if($categories->parent!=0){
continue;
}
?>
<li>
<a href="<?php echo $categories->permalink;?>" title="<?php echo $categories->name;?>"><small><?php echo $categories->name;?></small></a>
<ul class="two">
<?php
$children = $categories->getAllChildren($categories->mid);
foreach ($children as $mid) {
$child = $categories->getCategory($mid);
?>
<li>
<a href="<?php echo $child['permalink'];?>" title="<?php echo $child['name'];?>"><small><?php echo $child['name']; ?></small></a>
<ul class="hide">
<?php
$threecate = $categories->getAllChildren($child['mid']);
foreach ($threecate as $three) {
?>
<li><a href="<?php echo $three['permalink'];?>" title="<?php echo $three['name'];?>"><small><?php echo $three['name']; ?></small></a></li>
<?php
}
?>
</ul>
</li>
<?php
}
?>
</ul>
</li>
<?php
}
?>
</ul>
</li>
<li>
<form class="am-fr" id="search-header" method="post" action="<?php $this->options ->siteUrl(); ?>" name="search-header">
<input class="am-form-field am-round am-input-sm" type="text" name="s" placeholder="搜文章" />
</form>
</li>
</ul>
</div>
</div>
<section id="content" class="am-u-md-12">
<?php if ($this->have()): ?>
<ul class="am-list">
<?php while($this->next()): ?>
<li class="am-g am-list-item-desced am-list-item-thumbed am-list-item-thumb-left tleajaxpage" style="background-color:#fff;margin-bottom:10px;">
<div <?php if(isMobile()){?>class="am-u-sm-3 am-list-thumb"<?php }else{?>class="am-u-sm-2 am-list-thumb"<?php }?>>
<a href="<?php $this->author->permalink(); ?>" rel="author">
<img class="am-circle" src="<?=$this->options->headImgUrl;?>"/>
</a>
</div>
<div <?php if(isMobile()){?>class="am-u-sm-9 am-list-main"<?php }else{?>class="am-u-sm-10 am-list-main"<?php }?> style="margin-bottom:5px;">
<h3 class="am-list-item-hd">
<a href="<?php $this->permalink(); ?>" class="">
<?php $this->title(); ?>
</a>
</h3>
<small class="am-list-item-text"><?php $this->date('Y年m月d日 H:i'); ?> 来自 <?php $this->category(','); ?> <?php $this->tags(',', true, ''); ?></small>
<div>
<small>
<?php $this->excerpt(140, '...'); ?>
</small>
</div>
<?php
$thumb=showThumb($this);
$youku='player.youku.com';
$miaopai='miaopai.com';
$douyin='aweme.snssdk.com';
if(count($thumb)<9&&count($thumb)!=0){
if(strpos($thumb[0],$youku)===false&&strpos($thumb[0],$miaopai)===false&&strpos($thumb[0],$douyin)===false){
?>
<ul class="am-avg-sm-3" data-am-widget="gallery" data-am-gallery="{ pureview: true }">
<li><img src="<?=$thumb[0];?>" alt="" width="180" /></li>
</ul>
<?php
}else if(strpos($thumb[0],'player.youku.com')){
?>
<iframe height="400" width="100%" src="<?=$thumb[0];?>" frameborder="0" "allowfullscreen"></iframe>
<?php
}else if(strpos($thumb[0],'miaopai.com')){
?>
<video src="<?=$thumb[0];?>" controls="controls"></video>
<?php
}
}else if(count($thumb)>=9){
?>
<ul class="am-avg-sm-3 boxes" data-am-widget="gallery" data-am-gallery="{ pureview: true }">
<?php
for($i=0;$i<count($thumb);$i++){
if(strpos($thumb[$i],$youku)===false&&strpos($thumb[$i],$miaopai)===false&&strpos($thumb[$i],$douyin)===false){
?>
<li class="box box-1"><img src="<?=$thumb[$i];?>" alt="" /></li>
<?php
}
}
?>
</ul>
<?php
}
?>
</div>
<ul class="am-avg-sm-3" style="text-align:center;">
<li style="border-right:1px solid #ddd;border-top:1px solid #ddd;"><a class="am-list-item-text" href="<?php $this->permalink(); ?>">阅读 <?php get_post_view($this); ?></a></li>
<li style="border-right:1px solid #ddd;border-top:1px solid #ddd;"><a class="am-list-item-text" href="<?php $this->permalink(); ?>#comments">评论 <?php $this->commentsNum('0', '1', '%d'); ?></a></li>
<li style="border-top:1px solid #ddd;"><a class="am-list-item-text" href="https://service.weibo.com/share/share.php?url=<?php $this->permalink(); ?>&title=<?php echo $this->title(); ?>" onclick="window.open(this.href, 'share', 'width=550,height=335');return false;" >分享 <span class="am-icon-share-square-o"></span></a></li>
</ul>
</li>
<?php endwhile; ?>
</ul>
<div class="am-pagination blog-pagination">
<li class="am-pagination-next"><?php $this->pageLink('上一页'); ?></li>
<li class="am-pagination-prev"><?php $this->pageLink('下一页','next'); ?></li>
</div>
<?php if($this->options->is_ajax_page=='y'){?>
<!--ajax分页加载-->
<script>
$(function(){
var ias = $.ias({
container: "#content", /*包含所有文章的元素*/
item: ".tleajaxpage", /*文章元素*/
pagination: ".am-pagination", /*分页元素*/
next: ".am-pagination a.next", /*下一页元素*/
});
ias.extension(new IASTriggerExtension({
text: '<div class="cat-nav am-round"><small></small></div>', /*此选项为需要点击时的文字*/
offset: false, /*设置此项后,到 offset+1 页之后需要手动点击才能加载,取消此项则一直为无限加载*/
}));
ias.extension(new IASSpinnerExtension());
ias.extension(new IASNoneLeftExtension({
text: '<div class="cat-nav am-round"><small></small></div>', /*加载完成时的提示*/
}));
});
</script>
<?php }?>
<?php else: ?>
<style>
.page-main{
background-color:#fff;
margin:0px auto 0px auto;
}
@media screen and (max-width: 960px) {
.page-main {width: 100%;}
}
</style>
<section class="page-main">
<div class="admin-content">
<div class="admin-content-body">
<div class="am-cf am-padding am-padding-bottom-0">
<div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">404</strong> / <small>That’s an error</small></div>
</div>
<hr>
<div class="am-g">
<div class="am-u-sm-12">
<h2 class="am-text-center am-text-xxxl am-margin-top-lg">404. Not Found</h2>
<p class="am-text-center">没有找到你要的页面</p>
<pre class="page-404">
.----.
_.'__ `.
.--($)($$)---/#\
.' @ /###\
: , #####
`-..__.-' _.-\###/
`;_: `"'
.'"""""`.
/, ya ,\\
// 404! \\
`-._______.-'
___`. | .'___
(______|______)
</pre>
</div>
</div>
</div>
</div>
<!-- content end -->
</section>
<?php endif; ?>
</section>
</div>
<?php $this->need('sidebar.php'); ?>
</div>
<?php $this->need('footer.php'); ?>