Commit 9e37c2f9 authored by Peidong Xie's avatar Peidong Xie 💬
Browse files

Merge branch 'dev' into 'master'

更新报名链接,优化特殊纪念日代码

See merge request !9
parents d8541226 0c1f75b9
Pipeline #2558 canceled with stage
in 4 minutes and 4 seconds
......@@ -109,5 +109,5 @@
console.log('\x1b[43m虽然不知道为什么有人会想在主页上按F12?\x1b[0m')
console.log('\x1b[34m来都来了……不如入个伙吧……\x1b[0m');
console.log('\x1b[34m一键直达招新表格↓\x1b[0m')
console.log('{{ site.socials.CRM }}L959mSD')
console.log('https://table.nju.edu.cn/dtable/forms/175053ee-02fe-41b1-8dff-5e3adb6cc2e3/')
</script>
\ No newline at end of file
......@@ -9,19 +9,28 @@
<!--[if lte IE 9]><link rel="stylesheet" href="{{ "assets/css/ie9.css" | relative_url }}" /><![endif]-->
<!--[if lte IE 8]><link rel="stylesheet" href="{{ "assets/css/ie8.css" | relative_url }}" /><![endif]-->
<script>
// 彩蛋
document.addEventListener('keypress', (event) => {
if (event && event.key === 'Enter') location.pathname = '/bonus';
});
</script>
<script>
/*特殊纪念日黑白页面*/
// 特殊纪念日黑白页面
var days = [
[12, 13], // 南京大屠杀死难者国家公祭日
[2020, 4, 4], // 抗击新冠肺炎疫情哀悼日
];
var today = new Date();
var year = today.getFullYear();
var month = today.getMonth();
var month = today.getMonth() + 1;
var date = today.getDate();
if ((month==11 && date==13) || (year==2020 && month==3 && date==4)) {
var style = document.createElement("style");
style.type = "text/css";
var isSpecial = days.some((day) => {
if (day.length === 3) return year === day[0] && month === day[1] && date === day[2];
if (day.length === 2) return month === day[0] && date === day[1];
return false;
});
if (isSpecial) {
window.addEventListener('load', () => {
var memorial = 'html { \
filter: grayscale(100%); \
-webkit-filter: grayscale(100%); \
......@@ -30,15 +39,17 @@
-o-filter: grayscale(100%); \
filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); \
-webkit-filter: grayscale(1); \
}'
try{
   style.appendChild(document.createTextNode(memorial));
}catch(ex){
style.styleSheet.cssText = memorial;//针对IE
}';
var style = document.createElement('style');
style.type = "text/css";
try {
style.appendChild(document.createTextNode(memorial));
} catch (ex) {
style.styleSheet.cssText = memorial; // 针对IE
}
var hpage = document.getElementsByTagName("html")[0];
document.getElementsByTagName("body")[0].style.background = "rgb(42,42,42)";
hpage.appendChild(style);
document.querySelector('html').appendChild(style);
document.querySelector('body').style.background = 'rgb(42,42,42)';
});
}
</script>
</head>
\ No newline at end of file
......@@ -62,6 +62,6 @@ image: assets/images/recruiment.jpg
<div>
<h3>报名通道</h3>
<p>扫描下方二维码,或者直接点击<a href="{{ site.socials.CRM }}L959mSD">报名链接</a></p>
<p>扫描下方二维码,或者直接点击<a href="https://table.nju.edu.cn/dtable/forms/175053ee-02fe-41b1-8dff-5e3adb6cc2e3/">报名链接</a></p>
<img src="assets/images/hiring_qrcode.png">
</div>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment