forked from newraina/typecho-theme-NexTPisces
-
Notifications
You must be signed in to change notification settings - Fork 0
/
footer.php
130 lines (118 loc) · 4.99 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
<?php if (!defined('__TYPECHO_ROOT_DIR__')) {
exit;
}
?>
<footer id="footer" class="footer">
<div class="footer-inner">
<div class="copyright">
©
<span itemprop="copyrightYear"><?php echo date('Y'); ?></span>
<span class="with-love">
<i class="icon-next-heart fa fa-heart"></i>
</span>
<span class="author" itemprop="copyrightHolder">
<?php if ($this->options->next_name) {
$this->options->next_name();
} else {
$this->options->title();
}
?>
</span>
</div>
<div class="powered-by">
<a class="theme-link" href="http://www.typecho.org" target="_blank">Typecho</a>
</div>
<div class="theme-info">
主题 -
<a class="theme-link" href="https://github.com/newraina/typecho-theme-NexTPisces" target="_blank">
NexT.Pisces
</a>
</div>
</div>
</footer>
<div class="back-to-top"></div>
</div>
<script src="<?php $this->options->themeUrl('/vendors/jquery/index.js'); ?>"></script>
<script src="<?php $this->options->themeUrl('/vendors/fastclick/lib/fastclick.min.js'); ?>"></script>
<script src="<?php $this->options->themeUrl('/vendors/jquery_lazyload/jquery.lazyload.js'); ?>"></script>
<script src="<?php $this->options->themeUrl('/vendors/velocity/velocity.min.js'); ?>"></script>
<script src="<?php $this->options->themeUrl('/vendors/velocity/velocity.ui.min.js'); ?>"></script>
<script src="<?php $this->options->themeUrl('/vendors/fancybox/source/jquery.fancybox.pack.js'); ?>"></script>
<script src="<?php $this->options->themeUrl('/dist/js/main.min.js'); ?>"></script>
<?php if ($this->is('post')): ?>
<script src="<?php $this->options->themeUrl('/dist/js/postNeed.min.js'); ?>"></script>
<script id="sidebar.nav">
$(document).ready(function () {
var html = $('html');
var TAB_ANIMATE_DURATION = 200;
var hasVelocity = $.isFunction(html.velocity);
$('.sidebar-nav li').on('click', function () {
var item = $(this);
var activeTabClassName = 'sidebar-nav-active';
var activePanelClassName = 'sidebar-panel-active';
if (item.hasClass(activeTabClassName)) {
return;
}
var currentTarget = $('.' + activePanelClassName);
var target = $('.' + item.data('target'));
hasVelocity ?
currentTarget.velocity('transition.slideUpOut', TAB_ANIMATE_DURATION, function () {
target
.velocity('stop')
.velocity('transition.slideDownIn', TAB_ANIMATE_DURATION)
.addClass(activePanelClassName);
}) :
currentTarget.animate({opacity: 0}, TAB_ANIMATE_DURATION, function () {
currentTarget.hide();
target
.stop()
.css({'opacity': 0, 'display': 'block'})
.animate({opacity: 1}, TAB_ANIMATE_DURATION, function () {
currentTarget.removeClass(activePanelClassName);
target.addClass(activePanelClassName);
});
});
item.siblings().removeClass(activeTabClassName);
item.addClass(activeTabClassName);
});
$('.post-toc a').on('click', function (e) {
e.preventDefault();
var targetSelector = NexT.utils.escapeSelector(this.getAttribute('href'));
var offset = $(targetSelector).offset().top;
hasVelocity ?
html.velocity('stop').velocity('scroll', {
offset: offset + 'px',
mobileHA: false
}) :
$('html, body').stop().animate({
scrollTop: offset
}, 500);
});
// Expand sidebar on post detail page by default, when post has a toc.
NexT.motion.middleWares.sidebar = function () {
var $tocContent = $('.post-toc-content');
if (CONFIG.sidebar === 'post') {
if ($tocContent.length > 0 && $tocContent.html().trim().length > 0) {
NexT.utils.displaySidebar();
}
}
};
});
</script>
<?php endif; ?>
<?php if ($this->is('page', 'archive') || $this->is('archive')): ?>
<script id="motion.page.archive">
$('.archive-year').velocity('transition.slideLeftIn');
</script>
<?php endif; ?>
<script>
$(function () {
$("#posts").find('img').lazyload({
placeholder: "<?php $this->options->themeUrl('/images/loading.gif');?>",
effect: "fadeIn"
});
});
</script>
<?php $this->footer(); ?>
</body>
</html>