2023-10-30 15:56:29 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="zh">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
2023-11-03 16:58:54 +08:00
|
|
|
<title>{{ site.title }}</title>
|
|
|
|
{% if site.service == 1 %}
|
2023-10-31 21:40:41 +08:00
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='painting/css/normalize.css') }}">
|
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='painting/css/animate.min.css') }}">
|
|
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='painting/css/painting.css') }}">
|
2023-10-30 15:56:29 +08:00
|
|
|
{% else %}
|
2023-10-31 21:40:41 +08:00
|
|
|
<link rel="stylesheet" href="painting/css/normalize.css">
|
|
|
|
<link rel="stylesheet" href="painting/css/animate.min.css">
|
|
|
|
<link rel="stylesheet" href="painting/css/painting.css">
|
2023-10-30 15:56:29 +08:00
|
|
|
{% endif %}
|
2023-10-31 18:04:47 +08:00
|
|
|
<script async src="https://umami.7wate.org/script.js"
|
|
|
|
data-website-id="635fec50-bc6c-4ac2-909a-e2a7403438be"></script>
|
2023-10-30 15:56:29 +08:00
|
|
|
</head>
|
|
|
|
<body>
|
2023-10-31 18:04:47 +08:00
|
|
|
<div class="container active animate__animated animate__fadeIn animate__slow" id="tab1">
|
|
|
|
<audio id="bgm" loop>
|
2023-11-03 16:58:54 +08:00
|
|
|
{% if site.service == 1 %}
|
2023-10-31 21:40:41 +08:00
|
|
|
<source src="{{ url_for('static', filename='painting/music/bgm.mp3') }}" type="audio/mpeg">Your browser does
|
|
|
|
not support the audio element.
|
2023-10-31 18:04:47 +08:00
|
|
|
{% else %}
|
2023-10-31 21:40:41 +08:00
|
|
|
<source src="painting/music/bgm.mp3" type="audio/mpeg">Your browser does not support the audio element.
|
2023-10-31 18:04:47 +08:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
</audio>
|
|
|
|
<div class="popup">
|
|
|
|
<div class="notice">
|
|
|
|
<h4>温馨提示</h4>
|
|
|
|
<hr>
|
2023-11-03 16:58:54 +08:00
|
|
|
<p>EndofYear 使用互联网公开的 RSS 数据源,并使用自建的 Umami 服务统计访问量,绝对不会主动获取个人隐私信息。🫣🫣🫣
|
2023-10-31 18:04:47 +08:00
|
|
|
<br>
|
|
|
|
<br>
|
|
|
|
开启方式:小手轻轻点 ~
|
|
|
|
<a href="https://github.com/7Wate/EndOfYear"></a>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="selection">
|
|
|
|
<button value="true" class="allow">开启音乐</button>
|
|
|
|
<button value="false" class="deny">静音进入</button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-10-30 15:56:29 +08:00
|
|
|
<div class="container animate__animated animate__fadeIn animate__slow" id="tab2">
|
|
|
|
<div class="tab2-box">
|
2023-11-03 16:58:54 +08:00
|
|
|
<p class="animate__animated animate__fadeIn animate__delay-1s">亲爱的{{ blog.name }}</p>
|
|
|
|
{% if blog.life == 0 %}
|
2023-10-31 21:40:41 +08:00
|
|
|
<p class="animate__animated animate__fadeIn animate__delay-2s">旧事如梦,一年已过</p>
|
|
|
|
<p class="animate__animated animate__fadeIn animate__delay-2s">贰三年、感谢有你!</p>
|
2023-10-30 15:56:29 +08:00
|
|
|
{% else %}
|
2023-10-31 21:40:41 +08:00
|
|
|
<p class="animate__animated animate__fadeIn animate__delay-2s">今天是我们相识的</p>
|
2023-11-03 16:58:54 +08:00
|
|
|
<p class="animate__animated animate__fadeIn animate__delay-3s">第 <small>{{ blog.life // 365 }}</small> 年
|
|
|
|
<small>{{ blog.life % 365 }}</small> 天</p>
|
2023-10-30 15:56:29 +08:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="container animate__animated animate__fadeIn animate__slow" id="tab3">
|
|
|
|
<div class="tab3-box">
|
|
|
|
<p class="animate__animated animate__fadeInUp animate__delay-1s">这一年你写下了</p>
|
2023-11-03 16:58:54 +08:00
|
|
|
<p class="animate__animated animate__fadeInUp animate__delay-2s"><small>{{ blog.article_count }}</small>
|
2023-10-30 15:56:29 +08:00
|
|
|
篇博文</p>
|
2023-10-31 21:40:41 +08:00
|
|
|
<p class="animate__animated animate__fadeInUp animate__delay-3s">
|
2023-11-03 16:58:54 +08:00
|
|
|
<small>{{ blog.article_word_count }}</small> 个文字</p>
|
2023-10-30 15:56:29 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="container animate__animated animate__fadeIn animate__slow" id="tab4">
|
|
|
|
<div class="tab4-box">
|
2023-11-06 14:20:24 +08:00
|
|
|
<p class="animate__animated animate__fadeInLeft animate__delay-1s"> 其中 </p>
|
|
|
|
<p class="animate__animated animate__fadeInLeft animate__delay-2s"> {{ long_post.title }} </p>
|
|
|
|
<p class="animate__animated animate__fadeInLeft animate__delay-3s"> {{ long_post.content[:50] }}</p>
|
|
|
|
<p class="animate__animated animate__fadeIn animate__delay-4s"> 长似一江春水</p>
|
|
|
|
<p class="animate__animated animate__fadeIn animate__delay-5s"> 永不止息 ~ </p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="container animate__animated animate__fadeIn animate__slow" id="tab5">
|
|
|
|
<div class="tab5-box">
|
2023-11-06 16:24:08 +08:00
|
|
|
<p class="animate__animated animate__fadeInDown animate__delay-1s">在{{ special_post.date }}那天,写下了</p>
|
2023-11-03 16:58:54 +08:00
|
|
|
<p class="animate__animated animate__fadeInDown animate__delay-2s">{{ special_post.title }}</p>
|
|
|
|
<p class="animate__animated animate__fadeInDown animate__delay-3s">{{ special_post.content[:50] }}<small>……</small>
|
2023-10-30 15:56:29 +08:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-11-06 14:20:24 +08:00
|
|
|
<div class="container animate__animated animate__fadeIn animate__slow" id="tab6">
|
|
|
|
<div class="tab6-box">
|
|
|
|
<p class="animate__animated animate__fadeInUp animate__delay-1s">{{ sentiment_post.title }}</p>
|
|
|
|
<p class="animate__animated animate__fadeInUp animate__delay-2s">{{ sentiment_post.content[:50] }}</p>
|
|
|
|
<p class="animate__animated animate__fadeIn animate__delay-3s">如初春的暖阳,宁静而怡人</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="container animate__animated animate__fadeIn animate__slow" id="tab7">
|
|
|
|
<div class="tab7-box">
|
2023-11-03 16:58:54 +08:00
|
|
|
{% for keyword in blog.top_post_keys[0:5] %}
|
2023-11-06 14:20:24 +08:00
|
|
|
<p class="animate__animated animate__fadeIn animate__delay-1s">{{ keyword[0] }}</p>
|
2023-10-30 15:56:29 +08:00
|
|
|
{% endfor %}
|
|
|
|
<p class="animate__animated animate__fadeInDown animate__delay-1s">这些都是<small>你</small>的</p>
|
|
|
|
<p class="animate__animated animate__fadeInDown animate__delay-2s">专属<small>关键词</small></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-11-06 14:20:24 +08:00
|
|
|
<div class="container animate__animated animate__fadeIn animate__slow" id="tab8">
|
|
|
|
<div class="tab8-box">
|
2023-11-03 16:58:54 +08:00
|
|
|
<p class="animate__animated animate__fadeInLeft animate__delay-1s">
|
|
|
|
热爱{% if blog.category == 1 %}生活{% else %}技术{% endif %}的你
|
|
|
|
</p>
|
2023-10-30 15:56:29 +08:00
|
|
|
<p class="animate__animated animate__fadeInLeft animate__delay-2s">一定要继续砥砺前行!</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-11-06 14:20:24 +08:00
|
|
|
<div class="container animate__animated animate__fadeIn animate__slow" id="tab9">
|
|
|
|
<div class="tab9-box">
|
2023-11-03 16:58:54 +08:00
|
|
|
<p id="yiyan"> {{ custom.yiyan }}</p>
|
2023-10-30 15:56:29 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script>
|
2023-10-31 18:04:47 +08:00
|
|
|
// 屏幕尺寸
|
2023-10-30 15:56:29 +08:00
|
|
|
console.log("Window inner size: ", window.innerWidth, "x", window.innerHeight);
|
|
|
|
console.log("Window outer size: ", window.outerWidth, "x", window.outerHeight);
|
|
|
|
console.log("Screen size: ", screen.width, "x", screen.height);
|
|
|
|
console.log("Screen available size: ", screen.availWidth, "x", screen.availHeight);
|
2023-10-31 18:04:47 +08:00
|
|
|
|
|
|
|
// 轮播切换
|
|
|
|
let carousel = {
|
2023-10-30 15:56:29 +08:00
|
|
|
currentIndex: 0,
|
|
|
|
tabs: [],
|
|
|
|
|
|
|
|
init: function () {
|
|
|
|
this.tabs = document.getElementsByClassName('container');
|
|
|
|
|
|
|
|
for (let i = 0; i < this.tabs.length; i++) {
|
|
|
|
this.tabs[i].addEventListener('click', () => {
|
|
|
|
this.next();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
next: function () {
|
|
|
|
this.tabs[this.currentIndex].classList.remove('active');
|
|
|
|
this.currentIndex = (this.currentIndex + 1) % this.tabs.length;
|
|
|
|
this.tabs[this.currentIndex].classList.add('active');
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
window.onload = function () {
|
|
|
|
carousel.init();
|
|
|
|
};
|
2023-10-31 18:04:47 +08:00
|
|
|
|
|
|
|
// 弹出提示
|
|
|
|
let popup = document.querySelector('.popup');
|
|
|
|
let allowButton = document.querySelector('.allow');
|
|
|
|
let denyButton = document.querySelector('.deny');
|
|
|
|
let audioElement = document.getElementById('bgm');
|
|
|
|
|
|
|
|
allowButton.addEventListener('click', function (event) {
|
|
|
|
event.stopPropagation();
|
|
|
|
audioElement.play(); // 播放音乐
|
|
|
|
popup.style.display = 'none'; // 隐藏弹出窗口
|
|
|
|
});
|
|
|
|
|
|
|
|
denyButton.addEventListener('click', function (event) {
|
|
|
|
event.stopPropagation();
|
|
|
|
popup.style.display = 'none'; // 隐藏弹出窗口
|
|
|
|
});
|
2023-10-31 21:40:41 +08:00
|
|
|
|
|
|
|
// 博客最后的一言
|
|
|
|
window.addEventListener('DOMContentLoaded', (event) => {
|
|
|
|
let textElement = document.getElementById("yiyan");
|
|
|
|
let text = textElement.innerHTML;
|
|
|
|
textElement.innerHTML = text.replace(/[\u3000-\u303F\uFF01-\uFF0F\uFF1A-\uFF1E\uFF3B-\uFF3F\uFF5B-\uFF60\uFFE0-\uFFE6\u00D2]/g, "<br>");
|
|
|
|
});
|
2023-10-30 15:56:29 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|