Inspire主题修改记录
[xewqv # Inspire主题修改记录
functions.php
//注释音乐插件以兼容Hermit X插件
//require THEME_DIR . '/modules/player/player.json.php';
//require THEME_DIR . '/modules/player/player.php';
sidebar-left.php
// 注释邮箱和QQ函数
//$sns_mail = object('sns_email');
//$sns_qq = object('sns_instant');
<!--
<div class="info-actions">
<?php if ($sns_mail) : ?>
<div class="item">
<a href="mailto:<?php echo $sns_mail; ?>" rel="nofollow" target="_blank" id="button" class="tips-top" aria-label="<?php echo $sns_mail; ?>"><span class="icon"></span>发送邮件</a>
</div>
<?php endif; ?>
<?php if ($sns_qq) : ?>
<div class="item">
<a href="https://wpa.qq.com/msgrd?v=3&uin=<?php echo $sns_qq; ?>&site=qq&menu=yes" rel="nofollow" target="_blank" id="button" class="tips-top" aria-label="发起QQ即时聊天(<?php echo $sns_qq; ?>)"><span class="icon"></span>即时消息</a>
</div>
<?php endif; ?>
</div>
-->
//删除左侧个人简介中的博客链接,太繁复了
<?php $site_url = get_bloginfo('url'); ?>
<li class="item site"><a href="<?php echo $site_url; ?>"><?php echo substr($site_url,strpos($site_url,'/')+2); ?></a></li>
footer.php
// 注释sitemap入口
<span> / </span>
<span><a href="<?php bloginfo('url'); ?>/sitemap.xml">XML</a></span>
// 注释旧的建站计时函数
<span>Worked in <?php echo floor( (time()-strtotime(object('site_start_date')))/86400 ); ?> day</span>
// 加入新的建站计时js——代码来自LWL的自由天空
// 并在后台-版权信息内添加 <span id="span_dt_dt">
<!--建站时间 start-->
<script language=javascript>
function show_date_time() {
window.setTimeout("show_date_time()", 1000);
BirthDay = new Date("12/23/2016 16:35:01");//月,日,年,小时,分钟,秒
today = new Date();
timeold = (today.getTime() - BirthDay.getTime());
sectimeold = timeold / 1000
secondsold = Math.floor(sectimeold);
msPerDay = 24 * 60 * 60 * 1000
e_daysold = timeold / msPerDay
daysold = Math.floor(e_daysold);
e_hrsold = (e_daysold - daysold) * 24;
hrsold = setzero(Math.floor(e_hrsold));
e_minsold = (e_hrsold - hrsold) * 60;
minsold = setzero(Math.floor((e_hrsold - hrsold) * 60));
seconds = setzero(Math.floor((e_minsold - minsold) * 60));
span_dt_dt.innerHTML = "小站已运行" + daysold + "天" + hrsold + "小时" + minsold + "分" + seconds + "秒";
}
function setzero(i) {
if (i < 10) {
i = "0" + i
}
;
return i;
}
show_date_time();
</script>
<!--建站时间 END-->
// 加入新的建站计时js——代码来自太傅
// 并在后台-版权信息内添加 小站已运行:<span id="htmer_time"></span>
<!--建站时间 start-->
<script language=javascript>
function show_date_time() {
window.setTimeout("show_date_time()", 1000);
BirthDay = new Date("12/23/2016 16:35:01");//月,日,年,小时,分钟,秒
today = new Date();
timeold = (today.getTime() - BirthDay.getTime());
sectimeold = timeold / 1000
secondsold = Math.floor(sectimeold);
msPerDay = 24 * 60 * 60 * 1000
e_daysold = timeold / msPerDay
daysold = Math.floor(e_daysold);
e_hrsold = (e_daysold - daysold) * 24;
hrsold = setzero(Math.floor(e_hrsold));
e_minsold = (e_hrsold - hrsold) * 60;
minsold = setzero(Math.floor((e_hrsold - hrsold) * 60));
seconds = setzero(Math.floor((e_minsold - minsold) * 60));
span_dt_dt.innerHTML = "已运行" + daysold + "天" + hrsold + "小时" + minsold + "分" + seconds + "秒";
}
function setzero(i) {
if (i < 10) {
i = "0" + i
}
;
return i;
}
show_date_time();
</script>
<!--建站时间 END-->
style.css
// 在assets中加入PingFangSS.ttf,并启用cdn
@font-face {
font-family: "PingFang SC";
src: url('assets/pingfangSS.ttf'); /* IE9*/
src: url('https://blog.cofex.net/wp-content/themes/Inspire/assets/pingfangSS.ttf'); /* IE9*/
src: url('assets/pingfangSS.ttf') format('truetype'); /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
src: url('https://blog.cofex.net/wp-content/themes/Inspire/assets/pingfangSS.ttf') format('truetype'); /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
}
后台
// 底部版权信息
Code & Theme By <a href="//www.cssplus.org" rel="external nofollow" target="_blank">Louie</a>
<br>
© 2016-2018 · <a href="http://sstu.cc">有间咖啡馆</a> · All rights reserved.
<div class="beian">
<img src="/wp-content/uploads/2016/12/beianlogo.png" />
<span>
<a target="_blank" rel="external nofollow" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=50011702500312">渝公网安备 50011702500312号</a>
|
<a href="http://www.miitbeian.gov.cn/" rel="external nofollow" target="_blank">渝ICP备17010818号</a>
</span>
</div>
<span id="span_dt_dt"></span><span class="my-face">(●'◡'●)ノ♥</span>
// 自定义css
/* 底部版权信息颜色改为灰色 */
.copyright a {
color: #657786;
}
/* 中间栏向左移动 */
#aside.left {
width: 20%;
}
/* 抖动笑脸 */
/* 并在后台增加 <span class="my-face">(●'◡'●)ノ♥</span> */
.my-face {
animation: my-face 5s infinite ease-in-out;
display: inline-block;
margin: 0 5px
}
@keyframes my-face {
2% {
transform: translate(0, 1.5px) rotate(1.5deg)
}
4% {
transform: translate(0, -1.5px) rotate(-0.5deg)
}
6% {
transform: translate(0, 1.5px) rotate(-1.5deg)
}
8% {
transform: translate(0, -1.5px) rotate(-1.5deg)
}
10% {
transform: translate(0, 2.5px) rotate(1.5deg)
}
12% {
transform: translate(0, -0.5px) rotate(1.5deg)
}
14% {
transform: translate(0, -1.5px) rotate(1.5deg)
}
16% {
transform: translate(0, -0.5px) rotate(-1.5deg)
}
18% {
transform: translate(0, 0.5px) rotate(-1.5deg)
}
20% {
transform: translate(0, -1.5px) rotate(2.5deg)
}
22% {
transform: translate(0, 0.5px) rotate(-1.5deg)
}
24% {
transform: translate(0, 1.5px) rotate(1.5deg)
}
26% {
transform: translate(0, 0.5px) rotate(0.5deg)
}
28% {
transform: translate(0, 0.5px) rotate(1.5deg)
}
30% {
transform: translate(0, -0.5px) rotate(2.5deg)
}
32% {
transform: translate(0, 1.5px) rotate(-0.5deg)
}
34% {
transform: translate(0, 1.5px) rotate(-0.5deg)
}
36% {
transform: translate(0, -1.5px) rotate(2.5deg)
}
38% {
transform: translate(0, 1.5px) rotate(-1.5deg)
}
40% {
transform: translate(0, -0.5px) rotate(2.5deg)
}
42% {
transform: translate(0, 2.5px) rotate(-1.5deg)
}
44% {
transform: translate(0, 1.5px) rotate(0.5deg)
}
46% {
transform: translate(0, -1.5px) rotate(2.5deg)
}
48% {
transform: translate(0, -0.5px) rotate(0.5deg)
}
50% {
transform: translate(0, 0.5px) rotate(0.5deg)
}
52% {
transform: translate(0, 2.5px) rotate(2.5deg)
}
54% {
transform: translate(0, -1.5px) rotate(1.5deg)
}
56% {
transform: translate(0, 2.5px) rotate(2.5deg)
}
58% {
transform: translate(0, 0.5px) rotate(2.5deg)
}
60% {
transform: translate(0, 2.5px) rotate(2.5deg)
}
62% {
transform: translate(0, -0.5px) rotate(2.5deg)
}
64% {
transform: translate(0, -0.5px) rotate(1.5deg)
}
66% {
transform: translate(0, 1.5px) rotate(-0.5deg)
}
68% {
transform: translate(0, -1.5px) rotate(-0.5deg)
}
70% {
transform: translate(0, 1.5px) rotate(0.5deg)
}
72% {
transform: translate(0, 2.5px) rotate(1.5deg)
}
74% {
transform: translate(0, -0.5px) rotate(0.5deg)
}
76% {
transform: translate(0, -0.5px) rotate(2.5deg)
}
78% {
transform: translate(0, -0.5px) rotate(1.5deg)
}
80% {
transform: translate(0, 1.5px) rotate(1.5deg)
}
82% {
transform: translate(0, -0.5px) rotate(0.5deg)
}
84% {
transform: translate(0, 1.5px) rotate(2.5deg)
}
86% {
transform: translate(0, -1.5px) rotate(-1.5deg)
}
88% {
transform: translate(0, -0.5px) rotate(2.5deg)
}
90% {
transform: translate(0, 2.5px) rotate(-0.5deg)
}
92% {
transform: translate(0, 0.5px) rotate(-0.5deg)
}
94% {
transform: translate(0, 2.5px) rotate(0.5deg)
}
96% {
transform: translate(0, -0.5px) rotate(1.5deg)
}
98% {
transform: translate(0, -1.5px) rotate(-0.5deg)
}
0%, 100% {
transform: translate(0, 0) rotate(0deg)
}
}
自定义javascript
//(つェ⊂)我藏好了哦
自动修改title
<script>
var OriginTitile = document.title;
var st;
document.addEventListener('visibilitychange', function () {
if (document.hidden) {
document.title = "(つェ⊂)我藏好了哦";
clearTimeout(st);
console.log('hide');
} else {
document.title = '(*´∇`*) 被你发现啦~ ' + OriginTitile;
console.log('show');
st = setTimeout(function () {
document.title = OriginTitile;
}, 4000);
console.log('endChange=');
}
});
</script>