forked from Tokinx/Adams
-
Notifications
You must be signed in to change notification settings - Fork 0
/
footer.php
executable file
·121 lines (117 loc) · 5.04 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
<footer class="footer">
<section class="container">
<?php wp_nav_menu(['container' => false, 'theme_location' => 'footer_nav', 'depth' => 0]); ?>
<div style="display: flex;justify-content: space-between;">
<div class='left'>
<span>© <?= date('Y') ?> <a href="<?= get_bloginfo('url') ?>"><?= get_bloginfo('name') ?></a></span>
<?php if (get_option('zh_cn_l10n_icp_num')) { ?>
<span> . <a href="https://beian.miit.gov.cn/" target="_blank"><?= get_option('zh_cn_l10n_icp_num') ?></a></span>
<?php } ?>
</div>
<div class='right'>
<span>Theme by <a href="https://biji.io" target="_blank">Adams</a></span>
</div>
</div>
</section>
</footer>
<div class="setting_tool iconfont">
<a class="back2top" style="display:none;"><i class="czs-arrow-up-l"></i></a>
<?php if (!is_home() && !is_front_page()) { ?>
<a class="home" href="<?php bloginfo('url'); ?>"><i class="czs-home-l"></i></a>
<?php } ?>
<a class="sosearch"><i class="czs-search-l"></i></a>
<a class="socolor"><i class="czs-clothes-l"></i></a>
<div class="s">
<form method="get" action="<?php bloginfo('url'); ?>" class="search">
<input class="search-key" name="s" autocomplete="off" placeholder="输入关键词..." type="text" value="" required="required">
</form>
</div>
<div class="c">
<ul>
<li class="color undefined">默认</li>
<li class="color sepia">护眼</li>
<li class="color night">夜晚</li>
<li class="hr"></li>
<li class="font serif">Serif</li>
<li class="font sans">Sans</li>
</ul>
</div>
</div>
<?php wp_footer(); ?>
<script data-no-instant>
(function ($) {
<?php if ( is_user_logged_in() ) { ?>
$('#wpadminbar').attr('data-no-instant', '')
<?php } ?>
$.extend({
adamsOverload: function () {
$(".post_article a").attr("rel", "external");
$("a[rel='external']:not([href^='#']),a[rel='external nofollow']:not([href^='#'])").attr("target", "_blank");
$("a.vi,.gallery a,.attachment a").attr("rel", "");
<?php if(!get_theme_mod('biji_setting_viewimage')){ ?>
$.viewImage({
'target': '.gallery a,.gallery img,.attachment a,.post_article img,.post_article a,a.vi',
'exclude': '.readerswall img,.gallery a img,.attachment a img'
});
<?php } if(!get_theme_mod('biji_setting_lately')){ ?>
Lately({
'target': '.commentmetadata a:first-child,.infos time,.post-list time'
});
<?php } if(!get_theme_mod('biji_setting_prettify')){ ?>
prettyPrint();
<?php }?>
$('ul.links li a').each(function () {
if ($(this).parent().find('.bg').length === 0) {
$(this).parent().append('<div class="bg" style="background-image:url(https://www.google.com/s2/favicons?domain=' + $(this).attr("href") + ')"></div>')
}
});
// * Safari
if (navigator.vendor.indexOf("Apple") > -1) {
$("[srcset]").each((index, img) => {
img.outerHTML = img.outerHTML;
});
}
<?php if(!get_theme_mod('biji_setting_placard')){ ?>
if ($('.placard').length) {
$.get("https://v1.hitokoto.cn", (data) => {
$('.placard').text(data.hitokoto);
});
}
<?php }?>
}
});
})(jQuery);
<?php if (get_theme_mod('biji_setting_footInfo')) {
echo get_theme_mod('biji_setting_footInfo') . "\n";
}
if(!get_theme_mod('biji_setting_pjax')){ ?>
InstantClick.on('change', function (isInitialLoad) {
jQuery.adamsOverload();
if (isInitialLoad === false) {
// support MathJax
if (typeof MathJax !== 'undefined') MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
// support google code prettify
if (typeof prettyPrint !== 'undefined') prettyPrint();
// support 百度统计
if (typeof _hmt !== 'undefined') _hmt.push(['_trackPageview', location.pathname + location.search]);
// support google analytics
if (typeof ga !== 'undefined') ga('send', 'pageview', location.pathname + location.search);
}
});
InstantClick.on('wait', function () {
// pjax href click
});
InstantClick.on('fetch', function () {
// pjax begin
});
InstantClick.on('receive', function () {
// pjax end
});
InstantClick.init('mousedown');
<?php } else {?>
jQuery.adamsOverload();
<?php }?>
</script>
<!--网站效率:<?php timer_stop(4); ?>秒内查询了<?= get_num_queries(); ?>次数据库-->
</body>
</html>