-
Notifications
You must be signed in to change notification settings - Fork 0
/
footer.php
334 lines (311 loc) · 11 KB
/
footer.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
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
?>
<div id="side-button">
<ul>
<li id="go-top" class="am-icon-btn am-icon-arrow-up"></li>
<li id="go-bottom" class="am-icon-btn am-icon-arrow-down"></li>
<!--侧滑评论所需开始-->
<?php if ($this->is('post')||$this->is('page')) : ?>
<li id="ex-comment" class="am-icon-btn am-icon-comments"></li>
<?php endif; ?>
<!--侧滑评论所需结束-->
</ul>
</div>
<!-- footer -->
<footer class="am-footer am-footer-default">
<div class="am-footer-miscs ">
<?=printFriends($this->options->friendlink);?>
</div>
<div class="am-footer-miscs ">
<!--尊重以下网站版权是每一个合法公民应尽的义务,请不要去除以下版权。-->
<p>
CopyRight©<?=date("Y");?> <a href="<?=$this->options ->siteUrl();?>"><?php $this->options->title();?></a> Powered by <a href="http://typecho.org/" title="Typecho" target="_blank" rel="nofollow">Typecho</a> Theme By <a id="rightdetail" href="http://www.tongleer.com" target="_blank" title="同乐儿">Tongleer</a>
</p>
</div>
<div style="display:none;"><?=$this->options->foot_count;?></div>
</footer>
<?php if($this->options->is_pjax=='y'){?>
<!--pjax刷新开始-->
<style>
.pjax_loading {position: fixed;top: 45%;left: 45%;display: none;z-index: 999999;width: 124px;height: 124px;background: url('<?php $this->options->themeUrl('assets/images/pjax_loading.gif'); ?>') 50% 50% no-repeat;}
.pjax_loading1 {position: fixed;top: 0;left: 0;z-index: 999999;display: none;width: 100%;height: 100%;opacity: .2}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.pjax/2.0.1/jquery.pjax.min.js"></script>
<script type="text/javascript" language="javascript">
$(function() {
$(document).pjax('a[target!=_blank]', '#content', {fragment:'#content', timeout:6000});
$(document).on('submit', 'form[target!=_blank]', function (event) {
$.pjax.submit(event, '#content', {fragment:'#content', timeout:6000});
});
$(document).on('pjax:send', function() {
$(".pjax_loading,.pjax_loading1").css("display", "block");
});
$(document).on('pjax:complete', function() {
$(".pjax_loading,.pjax_loading1").css("display", "none");
$("#side-button ul #ex-comment").remove();
if($("#exist-comment").val()){
$("#side-button ul").append('<li id="ex-comment" class="am-icon-btn am-icon-comments"></li>');
if(window.location.href.indexOf("#comment-")>-1) {
$("#post-comments").addClass("comment-open");
}
$("#ex-comment").click(function() {
$("#post-comments").toggleClass("comment-open");
});
}
if(window.location.href.indexOf("comment")!=-1){
$("#submitComment").attr("type","button");
$("#submitComment").text("浏览器后退后继续评论");
$("#submitComment").attr("onClick","window.history.go(-1);");
}
if(window.location.href.indexOf("logout")!=-1){
location.href="<?=$this->options ->siteUrl();?>";
}
window.TypechoComment = {
dom : function (id) {
return document.getElementById(id);
},
create : function (tag, attr) {
var el = document.createElement(tag);
for (var key in attr) {
el.setAttribute(key, attr[key]);
}
return el;
},
reply : function (cid, coid) {
var comment = this.dom(cid), parent = comment.parentNode,
response = this.dom('<?php echo $this->respondId(); ?>'), input = this.dom('comment-parent'),
form = 'form' == response.tagName ? response : response.getElementsByTagName('form')[0],
textarea = response.getElementsByTagName('textarea')[0];
if (null == input) {
input = this.create('input', {
'type' : 'hidden',
'name' : 'parent',
'id' : 'comment-parent'
});
form.appendChild(input);
}
input.setAttribute('value', coid);
if (null == this.dom('comment-form-place-holder')) {
var holder = this.create('div', {
'id' : 'comment-form-place-holder'
});
response.parentNode.insertBefore(holder, response);
}
comment.appendChild(response);
this.dom('cancel-comment-reply-link').style.display = '';
if (null != textarea && 'text' == textarea.name) {
textarea.focus();
}
return false;
},
cancelReply : function () {
var response = this.dom('<?php echo $this->respondId(); ?>'),
holder = this.dom('comment-form-place-holder'), input = this.dom('comment-parent');
if (null != input) {
input.parentNode.removeChild(input);
}
if (null == holder) {
return true;
}
this.dom('cancel-comment-reply-link').style.display = 'none';
holder.parentNode.insertBefore(response, holder);
return false;
}
};
var event = document.addEventListener ? {
add: 'addEventListener',
triggers: ['scroll', 'mousemove', 'keyup', 'touchstart'],
load: 'DOMContentLoaded'
} : {
add: 'attachEvent',
triggers: ['onfocus', 'onmousemove', 'onkeyup', 'ontouchstart'],
load: 'onload'
}, added = false;
document[event.add](event.load, function () {
var r = document.getElementById('<?php echo $this->respondId(); ?>'),
input = document.createElement('input');
input.type = 'hidden';
input.name = '_';
input.value = (function () {
var _CSn = '9'//'JTK'
+'44'//'x'
+'R'//'R'
+//'q0'
'b'+'RrD'//'RrD'
+'4e'//'7'
+//'o6O'
'02b'+'e'//'lq'
+//'u'
'u'+//'H'
'57a'+'b1'//'B'
+/* 'lFg'//'lFg' */''+//'v'
'18'+//'Z9'
'Z9'+//'c18'
'6'+/* 'ID'//'ID' */''+//'75o'
'3'+'1'//'KRN'
+/* '4E3'//'4E3' */''+'426'//'jIn'
+//'L'
'L'+//'Ui'
'0a'+'2'//'7a'
+'0'//'gKh'
+'2'//'cY'
+/* 'FTc'//'FTc' */''+//'x'
'8a'+'b'//'J'
+'d'//'CD'
, _cHLK = [[3,4],[4,7],[10,11],[17,19],[23,24]];
for (var i = 0; i < _cHLK.length; i ++) {
_CSn = _CSn.substring(0, _cHLK[i][0]) + _CSn.substring(_cHLK[i][1]);
}
return _CSn;
})();
if (null != r) {
var forms = r.getElementsByTagName('form');
if (forms.length > 0) {
function append() {
if (!added) {
forms[0].appendChild(input);
added = true;
}
}
for (var i = 0; i < event.triggers.length; i ++) {
var trigger = event.triggers[i];
document[event.add](trigger, append);
window[event.add](trigger, append);
}
}
}
});
});
});
</script>
<div class="pjax_loading"></div>
<div class="pjax_loading1"></div>
<!--pjax刷新结束-->
<?php }?>
<?php if($this->options->is_play=='y'){?>
<!--音乐播放器开始-->
<link href="https://apps.bdimg.com/libs/fontawesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"/>
<link rel="stylesheet" href="<?php $this->options->themeUrl('assets/smusic/css/smusic.css'); ?>"/>
<div class="grid-music-container f-usn" id="music">
<a id="hidemusic" href="#" onClick="doAct();"><i class="fa fa-music suo"></i></a>
<div class="m-music-play-wrap">
<div class="u-cover"></div>
<div class="m-now-info">
<h1 class="u-music-title"><strong>标题</strong><small>歌手</small></h1>
<div class="m-now-controls">
<div class="u-control u-process">
<span class="buffer-process"></span>
<span class="current-process"></span>
</div>
<div class="u-control u-time">00:00/00:00</div>
<div class="u-control u-volume">
<div class="volume-process" data-volume="0.50">
<span class="volume-current"></span>
<span class="volume-bar"></span>
<span class="volume-event"></span>
</div>
<a class="volume-control"></a>
</div>
</div>
<div class="m-play-controls">
<a class="u-play-btn prev" title="上一曲"></a>
<a class="u-play-btn ctrl-play play" title="暂停"></a>
<a class="u-play-btn next" title="下一曲"></a>
<a class="u-play-btn mode mode-list <?php if($this->options->is_play_defaultMode==1){?>current<?php }?>" title="列表循环"></a>
<a class="u-play-btn mode mode-random <?php if($this->options->is_play_defaultMode==2){?>current<?php }?>" title="随机播放"></a>
<a class="u-play-btn mode mode-single <?php if($this->options->is_play_defaultMode==3){?>current<?php }?>" title="单曲循环"></a>
</div>
</div>
</div>
<div class="f-cb"> </div>
<div class="m-music-list-wrap" style="display:none;"></div>
<div class="m-music-lyric-wrap" style="display:none;">
<div class="inner">
<ul class="js-music-lyric-content">
<li class="eof">暂无歌词...</li>
</ul>
</div>
</div>
</div>
<script>
function doAct(){
var s=document.getElementById('hidemusic');
var t = document.getElementById('music'),
c = s.className;
if(c != null && c.indexOf('more') > -1){
s.className = c.replace('more', '');
t.className = t.className.replace('grid-music-container-active', '');
}else{
s.className = c + ' more';
t.className = t.className + ' grid-music-container-active';
var t=setTimeout("doAct()",5000);
}
}
</script>
<script src="<?php $this->options->themeUrl('assets/smusic/js/smusic.js'); ?>"></script>
<script>
var musicList = <?=$this->options->playjson;?>;
new SMusic({
musicList : musicList,
autoPlay : <?=$this->options->is_play_auto;?>, /*是否自动播放*/
defaultMode : <?=$this->options->is_play_defaultMode;?>, /*默认播放模式,随机*/
callback : function (obj) { /*返回当前播放歌曲信息*/
console.log(obj);
}
});
</script>
<!--音乐播放器结束-->
<?php }?>
<script src="<?php $this->options->themeUrl('assets/js/jquery.ias.min.js'); ?>" type="text/javascript"></script>
<!--[if lt IE 9]>-->
<script src="https://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="<?php $this->options->themeUrl('assets/js/amazeui.ie8polyfill.min.js'); ?>"></script>
<!--[endif]-->
<script src="<?php $this->options->themeUrl('assets/js/amazeui.widgets.helper.min.js'); ?>" type="text/javascript"></script>
<script src="<?php $this->options->themeUrl('assets/js/amazeui.min.js'); ?>" type="text/javascript"></script>
<script src="<?php $this->options->themeUrl('assets/js/app.js'); ?>"></script>
<script>
/*侧滑评论所需开始*/
$(function() {
if(window.location.href.indexOf("#comment-")>-1) {
$("#post-comments").addClass("comment-open");
}
$("#ex-comment").click(function() {
$("#post-comments").toggleClass("comment-open");
});
});
/*侧滑评论所需结束*/
/*goToTop*/
$(function(){
$("#go-top").hide();
$(window).scroll(function(){
if($(this).scrollTop() > 100){
$('#go-top').fadeIn();
}else{
$('#go-top').fadeOut();
}
});
$('#go-top').click(function(){
$('html ,body').animate({scrollTop: 0}, 300);
return false;
});
});
/*goToBottom*/
$(function(){
$(window).scroll(function(){
if($(this).scrollTop() > (document.body.scrollHeight - 1000)) {
$('#go-bottom').fadeOut();
}else{
$('#go-bottom').fadeIn();
}
});
$('#go-bottom').click(function(){
$('html ,body').animate({scrollTop: document.body.scrollHeight}, 300);
return false;
});
});
</script>
<?php $this->footer(); ?>
</body>
</html>