添加 纪念日自动变灰
This commit is contained in:
parent
917517c1b0
commit
4c49b61be0
@ -324,6 +324,7 @@
|
|||||||
<span class="uptext"><i class="fad fa-wrench"></i> 星期进度条显示错误</span>
|
<span class="uptext"><i class="fad fa-wrench"></i> 星期进度条显示错误</span>
|
||||||
<span class="uptext"><i class="fad fa-wrench"></i> 移动端动画及细节</span>
|
<span class="uptext"><i class="fad fa-wrench"></i> 移动端动画及细节</span>
|
||||||
<span class="uptext"><i class="fad fa-wrench"></i> Js 文件优化</span>
|
<span class="uptext"><i class="fad fa-wrench"></i> Js 文件优化</span>
|
||||||
|
<span class="uptext"><i class="fad fa-undo-alt"></i> <a href="./old/" style="color:#efefef">返回旧版站点</a></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
30
js/main.js
30
js/main.js
@ -13,12 +13,6 @@ iziToast.settings({
|
|||||||
iconColor: '#efefef',
|
iconColor: '#efefef',
|
||||||
});
|
});
|
||||||
|
|
||||||
iziToast.info({
|
|
||||||
icon: 'fad fa-vial',
|
|
||||||
title: '新版站点试运行',
|
|
||||||
message: '还存在亿些小问题 ~ <a href="./old/" style="color:#efefef">返回旧版</a>'
|
|
||||||
});
|
|
||||||
|
|
||||||
//控制台输出
|
//控制台输出
|
||||||
/*
|
/*
|
||||||
let date = '2021-09-27 21:32'
|
let date = '2021-09-27 21:32'
|
||||||
@ -319,4 +313,26 @@ document.oncontextmenu = function () {
|
|||||||
message: '为了浏览体验,本站禁用右键'
|
message: '为了浏览体验,本站禁用右键'
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//自动变灰
|
||||||
|
var myDate = new Date;
|
||||||
|
var mon = myDate.getMonth() + 1;
|
||||||
|
var date = myDate.getDate();
|
||||||
|
var days = ['4.4', '5.12', '7.7', '9.9', '9.18', '12.13'];
|
||||||
|
for (var day of days) {
|
||||||
|
var d = day.split('.');
|
||||||
|
if (mon == d[0] && date == d[1]) {
|
||||||
|
document.write(
|
||||||
|
'<style>html{-webkit-filter:grayscale(100%);-moz-filter:grayscale(100%);-ms-filter:grayscale(100%);-o-filter:grayscale(100%);filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);_filter:none}</style>'
|
||||||
|
)
|
||||||
|
$("#change").html("Silence in silence");
|
||||||
|
$("#change1").html("今天是国家纪念日,全站已切换为黑白模式");
|
||||||
|
iziToast.info({
|
||||||
|
timeout: 14000,
|
||||||
|
icon: 'fad fa-candle-holder',
|
||||||
|
title: '今天是国家纪念日',
|
||||||
|
message: '历史不会忘记,人民永远铭记!'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -96,8 +96,8 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="navigation__item">
|
<li class="navigation__item">
|
||||||
<a href="https://lab.imsyy.top/" target="_blank" class="blog-button">
|
<a href="https://imsyy.top/" class="blog-button">
|
||||||
<div>实验</div>
|
<div>前往新版</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
Reference in New Issue
Block a user