添加 纪念日自动变灰

This commit is contained in:
底层用户 2021-12-13 14:43:50 +08:00
parent 917517c1b0
commit 4c49b61be0
3 changed files with 26 additions and 9 deletions

View File

@ -324,6 +324,7 @@
<span class="uptext"><i class="fad fa-wrench"></i>&nbsp;星期进度条显示错误</span>
<span class="uptext"><i class="fad fa-wrench"></i>&nbsp;移动端动画及细节</span>
<span class="uptext"><i class="fad fa-wrench"></i>&nbsp;Js&nbsp;文件优化</span>
<span class="uptext"><i class="fad fa-undo-alt"></i>&nbsp;<a href="./old/" style="color:#efefef">返回旧版站点</a></span>
</div>
</div>
</div>

View File

@ -13,12 +13,6 @@ iziToast.settings({
iconColor: '#efefef',
});
iziToast.info({
icon: 'fad fa-vial',
title: '新版站点试运行',
message: '还存在亿些小问题 ~ <a href="./old/" style="color:#efefef">返回旧版</a>'
});
//控制台输出
/*
let date = '2021-09-27 21:32'
@ -319,4 +313,26 @@ document.oncontextmenu = function () {
message: '为了浏览体验,本站禁用右键'
});
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&nbsp;in&nbsp;silence");
$("#change1").html("今天是国家纪念日,全站已切换为黑白模式");
iziToast.info({
timeout: 14000,
icon: 'fad fa-candle-holder',
title: '今天是国家纪念日',
message: '历史不会忘记,人民永远铭记!'
});
}
}

View File

@ -96,8 +96,8 @@
</a>
</li>
<li class="navigation__item">
<a href="https://lab.imsyy.top/" target="_blank" class="blog-button">
<div>实验</div>
<a href="https://imsyy.top/" class="blog-button">
<div>前往新版</div>
</a>
</li>
</ul>