2024.7.13
This commit is contained in:
1 parent
92ca74ac8a
commit
2c90fe1cbf
30 files changed
+588
-1268
No files matched your search
@@ -4,6 +4,9 @@ date: 2024-07-11
|
||||
layout: "about" # 指定使用的布局文件
|
||||
draft: false # 如果你准备好了,可以将其设置为 false
|
||||
---
|
||||
## 热力图 ##
|
||||
|
||||
{{< heatmap >}}
|
||||
|
||||
## 关于我 ##
|
||||
|
||||
@@ -14,3 +17,17 @@ draft: false # 如果你准备好了,可以将其设置为 false
|
||||
性格慢热,言语幽默,喜欢独处
|
||||
|
||||
喜欢用文字记录生活,是用心在写文章的宝藏博主
|
||||
|
||||
## 我的计划 ##
|
||||
|
||||
~~1.坚持背完不背单词一本单词书~~ [已于2023.3.3日实现]
|
||||
|
||||
~~2.23年5月份成功上岸~~ [已于2023.5.26日实现]
|
||||
|
||||
~~3.和朋友去看襄阳唐城夜场~~ [已于2023.5.12日实现]
|
||||
|
||||
~~4.体验独自进电子厂打工~~ [已于2023.6.3日实现并跑路]
|
||||
|
||||
5.通过四六级考试
|
||||
|
||||
6.考研上岸
|
||||
+72
-63
@@ -18,6 +18,7 @@
|
||||
<script src="https://usj.cc/usr/themes/Ying/js/jquery.barrager.js"></script>
|
||||
<script src="/js/jquery.scrollUp.min.js"></script>
|
||||
<script src="/js/pjax.js"></script>
|
||||
|
||||
<script>console.log("\n %c Amigo Theme %c https://usj.cc \n", "color: #fadfa3; background: #030307; padding:3px; font-size:12px;", "color: #ffffff;background: #16171a; padding: 3px; font-size: 12px;");</script>
|
||||
<meta name="keywords" content="大学,教程,blog,优世界,优设计,博客,大学生博客,生活,文案," />
|
||||
<meta name="template" content="Ying" />
|
||||
@@ -63,12 +64,14 @@
|
||||
|
||||
|
||||
<div id="pjax-container">
|
||||
<h2>热力图</h2>
|
||||
<div id="heatmap" style="
|
||||
max-width: 600px;
|
||||
<div class="post-content" itemprop="articleBody">
|
||||
<h2 id="热力图">热力图</h2>
|
||||
<div id="heatmap" style="
|
||||
max-width: 1900px;
|
||||
height: 180px;
|
||||
padding: 2px;
|
||||
text-align: center;"
|
||||
text-align: center;
|
||||
"
|
||||
></div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/echarts@5.3.0/dist/echarts.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
@@ -89,72 +92,83 @@
|
||||
|
||||
var key = "2024-07-12";
|
||||
var value = dataMap.get(key);
|
||||
var wordCount = "0.0";
|
||||
var wordCount = 1 ;
|
||||
var link = "/post/demo05/";
|
||||
var title = "Demo05";
|
||||
|
||||
|
||||
|
||||
if (value == null || wordCount > value[0]) {
|
||||
dataMap.set(key, {wordCount, link, title});
|
||||
if (value == null) {
|
||||
dataMap.set(key, [{wordCount, link, title}]);
|
||||
} else {
|
||||
value.push({wordCount, link, title});
|
||||
}
|
||||
var key = "2024-07-11";
|
||||
var value = dataMap.get(key);
|
||||
var wordCount = "0.0";
|
||||
var wordCount = 3 ;
|
||||
var link = "/post/demo03/";
|
||||
var title = "Demo03";
|
||||
|
||||
|
||||
|
||||
if (value == null || wordCount > value[0]) {
|
||||
dataMap.set(key, {wordCount, link, title});
|
||||
if (value == null) {
|
||||
dataMap.set(key, [{wordCount, link, title}]);
|
||||
} else {
|
||||
value.push({wordCount, link, title});
|
||||
}
|
||||
var key = "2024-07-11";
|
||||
var value = dataMap.get(key);
|
||||
var wordCount = "0.1";
|
||||
var wordCount = 111 ;
|
||||
var link = "/post/demo01/";
|
||||
var title = "Demo01";
|
||||
|
||||
|
||||
|
||||
if (value == null || wordCount > value[0]) {
|
||||
dataMap.set(key, {wordCount, link, title});
|
||||
if (value == null) {
|
||||
dataMap.set(key, [{wordCount, link, title}]);
|
||||
} else {
|
||||
value.push({wordCount, link, title});
|
||||
}
|
||||
var key = "2024-07-11";
|
||||
var value = dataMap.get(key);
|
||||
var wordCount = "0.0";
|
||||
var wordCount = 1 ;
|
||||
var link = "/post/my-second-post/";
|
||||
var title = "My Second Post";
|
||||
|
||||
|
||||
|
||||
if (value == null || wordCount > value[0]) {
|
||||
dataMap.set(key, {wordCount, link, title});
|
||||
if (value == null) {
|
||||
dataMap.set(key, [{wordCount, link, title}]);
|
||||
} else {
|
||||
value.push({wordCount, link, title});
|
||||
}
|
||||
var key = "2024-07-11";
|
||||
var value = dataMap.get(key);
|
||||
var wordCount = "0.0";
|
||||
var wordCount = 1 ;
|
||||
var link = "/post/my-first-post/";
|
||||
var title = "My First Post";
|
||||
|
||||
|
||||
|
||||
if (value == null || wordCount > value[0]) {
|
||||
dataMap.set(key, {wordCount, link, title});
|
||||
if (value == null) {
|
||||
dataMap.set(key, [{wordCount, link, title}]);
|
||||
} else {
|
||||
value.push({wordCount, link, title});
|
||||
}
|
||||
var key = "2024-07-09";
|
||||
var value = dataMap.get(key);
|
||||
var wordCount = "0.0";
|
||||
var wordCount = 3 ;
|
||||
var link = "/post/helloworld/";
|
||||
var title = "Helloworld";
|
||||
|
||||
|
||||
|
||||
if (value == null || wordCount > value[0]) {
|
||||
dataMap.set(key, {wordCount, link, title});
|
||||
if (value == null) {
|
||||
dataMap.set(key, [{wordCount, link, title}]);
|
||||
} else {
|
||||
value.push({wordCount, link, title});
|
||||
}var data = [];
|
||||
|
||||
for (const [key, value] of dataMap.entries()) {
|
||||
data.push([key, value.wordCount]);
|
||||
var sum = 0;
|
||||
for (const v of value) {
|
||||
sum += v.wordCount;
|
||||
}
|
||||
data.push([key, (sum / 1000).toFixed(1)]);
|
||||
}
|
||||
|
||||
var startDate = new Date();
|
||||
@@ -202,9 +216,20 @@
|
||||
text: ''
|
||||
},
|
||||
tooltip: {
|
||||
hideDelay: 1000,
|
||||
enterable: true,
|
||||
formatter: function (p) {
|
||||
const post = dataMap.get(p.data[0]);
|
||||
return post.title + ' | ' + post.wordCount + ' 千字';
|
||||
const date = p.data[0];
|
||||
const posts = dataMap.get(date);
|
||||
var content = `${date}`;
|
||||
for (const [i, post] of posts.entries()) {
|
||||
content += "<br>";
|
||||
var link = post.link;
|
||||
var title = post.title;
|
||||
var wordCount = (post.wordCount / 1000).toFixed(1);
|
||||
content += `<a href="${link}" target="_blank">${title} | ${wordCount} k</a>`
|
||||
}
|
||||
return content;
|
||||
}
|
||||
},
|
||||
visualMap: {
|
||||
@@ -228,11 +253,11 @@
|
||||
top: 80,
|
||||
left: 20,
|
||||
right: 4,
|
||||
cellSize: ['auto', 12],
|
||||
cellSize: ['auto', 13],
|
||||
range: getRangeArr(),
|
||||
itemStyle: {
|
||||
color: '#F1F1F1',
|
||||
borderWidth: 2.5,
|
||||
borderWidth: 1.5,
|
||||
borderColor: '#fff',
|
||||
},
|
||||
yearLabel: { show: false },
|
||||
@@ -256,29 +281,34 @@
|
||||
myChart.setOption(option);
|
||||
myChart.on('click', function(params) {
|
||||
if (params.componentType === 'series') {
|
||||
const post = dataMap.get(params.data[0]);
|
||||
|
||||
const post = dataMap.get(params.data[0])[0];
|
||||
const link = window.location.origin + post.link;
|
||||
window.open(link, '_blank').focus();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="post-content" itemprop="articleBody">
|
||||
<h2 id="关于我">关于我</h2>
|
||||
|
||||
<h2 id="关于我">关于我</h2>
|
||||
<p>00后,湖北襄阳人,目前大三本科在读</p>
|
||||
<p>脾气超好,喜欢看求生类节目以及恐怖片</p>
|
||||
<p>性格慢热,言语幽默,喜欢独处</p>
|
||||
<p>喜欢用文字记录生活,是用心在写文章的宝藏博主</p>
|
||||
<h2 id="我的计划">我的计划</h2>
|
||||
<p><del>1.坚持背完不背单词一本单词书</del> [已于2023.3.3日实现]</p>
|
||||
<p><del>2.23年5月份成功上岸</del> [已于2023.5.26日实现]</p>
|
||||
<p><del>3.和朋友去看襄阳唐城夜场</del> [已于2023.5.12日实现]</p>
|
||||
<p><del>4.体验独自进电子厂打工</del> [已于2023.6.3日实现并跑路]</p>
|
||||
<p>5.通过四六级考试</p>
|
||||
<p>6.考研上岸</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="footer">
|
||||
<div class="footer">
|
||||
<nav class="nav" style="clear: both;">
|
||||
© 2019 - 2024
|
||||
<br>
|
||||
@@ -296,29 +326,8 @@
|
||||
<script src="/js/main.js"></script>
|
||||
<script src="/js/mypjax.js"></script>
|
||||
<script src="/js/nprogress.js"></script>
|
||||
<script>
|
||||
var currentPath = "\/about\/";
|
||||
document.addEventListener("pjax:send", function () {
|
||||
var currentPath = "\/about\/";
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="module">
|
||||
import { init as walineInit } from 'https://unpkg.com/@waline/client@v3/dist/waline.js';
|
||||
|
||||
|
||||
window.walineInit = walineInit;
|
||||
|
||||
|
||||
window.initWaline = function() {
|
||||
walineInit({
|
||||
el: '#waline',
|
||||
serverURL: 'https://waline.usj.cc',
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<script src="https://usj.cc/usr/themes/Ying/js/jquery.barrager.js"></script>
|
||||
<script src="/js/jquery.scrollUp.min.js"></script>
|
||||
<script src="/js/pjax.js"></script>
|
||||
|
||||
<script>console.log("\n %c Amigo Theme %c https://usj.cc \n", "color: #fadfa3; background: #030307; padding:3px; font-size:12px;", "color: #ffffff;background: #16171a; padding: 3px; font-size: 12px;");</script>
|
||||
<meta name="keywords" content="大学,教程,blog,优世界,优设计,博客,大学生博客,生活,文案," />
|
||||
<meta name="template" content="Ying" />
|
||||
@@ -172,7 +173,8 @@
|
||||
|
||||
|
||||
|
||||
<div class="footer">
|
||||
|
||||
<div class="footer">
|
||||
<nav class="nav" style="clear: both;">
|
||||
© 2019 - 2024
|
||||
<br>
|
||||
@@ -190,29 +192,8 @@
|
||||
<script src="/js/main.js"></script>
|
||||
<script src="/js/mypjax.js"></script>
|
||||
<script src="/js/nprogress.js"></script>
|
||||
<script>
|
||||
var currentPath = "\/archives\/";
|
||||
document.addEventListener("pjax:send", function () {
|
||||
var currentPath = "\/archives\/";
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="module">
|
||||
import { init as walineInit } from 'https://unpkg.com/@waline/client@v3/dist/waline.js';
|
||||
|
||||
|
||||
window.walineInit = walineInit;
|
||||
|
||||
|
||||
window.initWaline = function() {
|
||||
walineInit({
|
||||
el: '#waline',
|
||||
serverURL: 'https://waline.usj.cc',
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
+17
-177
@@ -1696,185 +1696,25 @@ input[type=submit] {
|
||||
}
|
||||
|
||||
/* 热力图css */
|
||||
:root {
|
||||
/* GitHub Light Color */
|
||||
--ht-main: #334155;
|
||||
--ht-day-bg: #ebedf0;
|
||||
--ht-tooltip: #24292f;
|
||||
--ht-tooltip-bg: #fff;
|
||||
--ht-lv-0: #ebedf0;
|
||||
--ht-lv-1: #9be9a8;
|
||||
--ht-lv-2: #40c463;
|
||||
--ht-lv-3: #30a14e;
|
||||
--ht-lv-4: #216e39;
|
||||
}
|
||||
|
||||
[data-theme="dark"] {
|
||||
/* GitHub Dark Dimmed Color */
|
||||
--ht-main: #94a3b8;
|
||||
--ht-day-bg: #161b22;
|
||||
--ht-tooltip: #24292f;
|
||||
--ht-tooltip-bg: #fff;
|
||||
--ht-lv-0: #161b22;
|
||||
--ht-lv-1: #0e4429;
|
||||
--ht-lv-2: #006d32;
|
||||
--ht-lv-3: #26a641;
|
||||
--ht-lv-4: #39d353;
|
||||
}
|
||||
|
||||
.heatmap_container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
font-size: 10px;
|
||||
line-height: 12px;
|
||||
color: var(--ht-main);
|
||||
}
|
||||
|
||||
.heatmap_content {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-end
|
||||
}
|
||||
|
||||
.heatmap_week {
|
||||
display: flex;
|
||||
margin-top: 0.25rem;
|
||||
margin-right: 0.25rem;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
align-items: flex-end;
|
||||
text-align: right
|
||||
}
|
||||
|
||||
.heatmap_main {
|
||||
display: flex;
|
||||
flex-direction: column
|
||||
}
|
||||
|
||||
.heatmap_month {
|
||||
display: flex;
|
||||
margin-top: 0.25rem;
|
||||
margin-right: 0.25rem;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
align-items: flex-end;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.heatmap {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 84px;
|
||||
}
|
||||
|
||||
.heatmap_footer {
|
||||
display: flex;
|
||||
margin-top: 0.5rem;
|
||||
align-items: center
|
||||
}
|
||||
|
||||
.heatmap_level {
|
||||
display: flex;
|
||||
gap: 2px;
|
||||
margin: 0 0.25rem;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
width: max-content;
|
||||
height: 10px
|
||||
}
|
||||
|
||||
.heatmap_level_item {
|
||||
display: block;
|
||||
border-radius: 0.125rem;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.heatmap_level_0 {
|
||||
background: var(--ht-lv-0);
|
||||
}
|
||||
|
||||
.heatmap_level_1 {
|
||||
background: var(--ht-lv-1);
|
||||
}
|
||||
|
||||
.heatmap_level_2 {
|
||||
background: var(--ht-lv-2);
|
||||
}
|
||||
|
||||
.heatmap_level_3 {
|
||||
background: var(--ht-lv-3);
|
||||
}
|
||||
|
||||
.heatmap_level_4 {
|
||||
background: var(--ht-lv-4);
|
||||
}
|
||||
|
||||
.heatmap_week {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.heatmap_day {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background-color: var(--ht-day-bg);
|
||||
margin: 1px;
|
||||
border-radius: 2px;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.heatmap_tooltip {
|
||||
.ch-plugin-calendar-label{
|
||||
position: absolute;
|
||||
bottom: 12px;
|
||||
left: 50%;
|
||||
width: max-content;
|
||||
color: var(--ht-tooltip);
|
||||
background-color: var(--ht-tooltip-bg);
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
padding: 8px;
|
||||
border-radius: 3px;
|
||||
white-space: pre-wrap;
|
||||
opacity: 1;
|
||||
transition: 0.3s;
|
||||
z-index: 1000;
|
||||
text-align: right;
|
||||
transform: translateX(-50%);
|
||||
top: 20px;
|
||||
left: 30px;
|
||||
gutter: 5px;
|
||||
}
|
||||
/** 周几初标签部分样式 **/
|
||||
.ch-plugin-calendar-label-text{
|
||||
fill: var(--gray-500) !important;
|
||||
font-size: 12px !important;
|
||||
transform: translate(6px, 0px);
|
||||
}
|
||||
|
||||
.heatmap_tooltip_count,
|
||||
.heatmap_tooltip_post {
|
||||
display: inline-block;
|
||||
/** 隐藏月份信息 **/
|
||||
.ch-domain-text{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.heatmap_tooltip_title,
|
||||
.heatmap_tooltip_date {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.heatmap_tooltip_date {
|
||||
margin: 0 0.25rem;
|
||||
}
|
||||
|
||||
.heatmap_day_level_0 {
|
||||
background-color: var(--ht-lv-0);
|
||||
}
|
||||
|
||||
.heatmap_day_level_1 {
|
||||
background-color: var(--ht-lv-1);
|
||||
}
|
||||
|
||||
.heatmap_day_level_2 {
|
||||
background-color: var(--ht-lv-2);
|
||||
}
|
||||
|
||||
.heatmap_day_level_3 {
|
||||
background-color: var(--ht-lv-3);
|
||||
}
|
||||
|
||||
.heatmap_day_level_4 {
|
||||
background-color: var(--ht-lv-4);
|
||||
}
|
||||
/* 修改小方块的背景填充颜色 */
|
||||
[data-theme=dark] .ch-subdomain-bg {
|
||||
fill: var(--gray-200);
|
||||
}
|
||||
+4
-23
@@ -19,6 +19,7 @@
|
||||
<script src="https://usj.cc/usr/themes/Ying/js/jquery.barrager.js"></script>
|
||||
<script src="/js/jquery.scrollUp.min.js"></script>
|
||||
<script src="/js/pjax.js"></script>
|
||||
|
||||
<script>console.log("\n %c Amigo Theme %c https://usj.cc \n", "color: #fadfa3; background: #030307; padding:3px; font-size:12px;", "color: #ffffff;background: #16171a; padding: 3px; font-size: 12px;");</script>
|
||||
<meta name="keywords" content="大学,教程,blog,优世界,优设计,博客,大学生博客,生活,文案," />
|
||||
<meta name="template" content="Ying" />
|
||||
@@ -119,7 +120,8 @@
|
||||
|
||||
|
||||
|
||||
<div class="footer">
|
||||
|
||||
<div class="footer">
|
||||
<nav class="nav" style="clear: both;">
|
||||
© 2019 - 2024
|
||||
<br>
|
||||
@@ -137,29 +139,8 @@
|
||||
<script src="/js/main.js"></script>
|
||||
<script src="/js/mypjax.js"></script>
|
||||
<script src="/js/nprogress.js"></script>
|
||||
<script>
|
||||
var currentPath = "\/";
|
||||
document.addEventListener("pjax:send", function () {
|
||||
var currentPath = "\/";
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="module">
|
||||
import { init as walineInit } from 'https://unpkg.com/@waline/client@v3/dist/waline.js';
|
||||
|
||||
|
||||
window.walineInit = walineInit;
|
||||
|
||||
|
||||
window.initWaline = function() {
|
||||
walineInit({
|
||||
el: '#waline',
|
||||
serverURL: 'https://waline.usj.cc',
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@
|
||||
<link>http://localhost:1313/about/</link>
|
||||
<pubDate>Thu, 11 Jul 2024 00:00:00 +0000</pubDate>
|
||||
<guid>http://localhost:1313/about/</guid>
|
||||
<description>关于我 00后,湖北襄阳人,目前大三本科在读
脾气超好,喜欢看求生类节目以及恐怖片
性格慢热,言语幽默,喜欢独处
喜欢用文字记录生活,是用心在写文章的宝藏博主</description>
|
||||
<description>热力图 关于我 00后,湖北襄阳人,目前大三本科在读
脾气超好,喜欢看求生类节目以及恐怖片
性格慢热,言语幽默,喜欢独处
喜欢用文字记录生活,是用心在写文章的宝藏博主
我的计划 1.坚持背完不背单词一本单词书 [已于2023.3.3日实现]
2.23年5月份成功上岸 [已于2023.5.26日实现]
3.和朋友去看襄阳唐城夜场 [已于2023.5.12日实现]
4.体验独自进电子厂打工 [已于2023.6.3日实现并跑路]
5.通过四六级考试
6.考研上岸</description>
|
||||
</item>
|
||||
<item>
|
||||
<title>友链</title>
|
||||
|
||||
+3
-184
@@ -61,7 +61,9 @@ function fetchCommentsAndCreateBarrager(path, options) {
|
||||
// 弹幕索引
|
||||
var index = 0;
|
||||
// 先执行一次
|
||||
createBarrager();
|
||||
if(total != 0){
|
||||
createBarrager()
|
||||
}
|
||||
|
||||
function createBarrager() {
|
||||
// 转换数据为弹幕所需的格式
|
||||
@@ -86,186 +88,3 @@ function fetchCommentsAndCreateBarrager(path, options) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 获取最近一年的文章数据
|
||||
{{ $pages := where .Site.RegularPages "Date" ">" (now.AddDate -1 0 0) }}
|
||||
{{ $pages := $pages.Reverse }}
|
||||
var blogInfo = {
|
||||
"pages": [
|
||||
{{ range $index, $element := $pages }}
|
||||
{
|
||||
"title": "{{ replace (replace .Title "《" "〈") "》" "〉" }}",
|
||||
"date": "{{ .Date.Format "2006-01-02" }}",
|
||||
"year": "{{ .Date.Format "2006" }}",
|
||||
"month": "{{ .Date.Format "01" }}",
|
||||
"day": "{{ .Date.Format "02" }}",
|
||||
"word_count": "{{ .WordCount }}"
|
||||
}{{ if ne (add $index 1) (len $pages) }},{{ end }}
|
||||
{{ end }}
|
||||
]
|
||||
};
|
||||
// console.log(blogInfo)
|
||||
|
||||
let currentDate = new Date();
|
||||
currentDate.setFullYear(currentDate.getFullYear() - 1);
|
||||
|
||||
let startDate;
|
||||
|
||||
let monthDiv = document.querySelector('.month');
|
||||
let monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
||||
|
||||
if (window.innerWidth < 768) {
|
||||
numMonths = 6;
|
||||
} else {
|
||||
numMonths = 12;
|
||||
}
|
||||
|
||||
let startMonthIndex = (currentDate.getMonth() - (numMonths - 1) + 12) % 12;
|
||||
for (let i = startMonthIndex; i < startMonthIndex + numMonths; i++) {
|
||||
let monthSpan = document.createElement('span');
|
||||
let monthIndex = i % 12;
|
||||
monthSpan.textContent = monthNames[monthIndex];
|
||||
monthDiv.appendChild(monthSpan);
|
||||
}
|
||||
|
||||
function getStartDate() {
|
||||
const today = new Date();
|
||||
|
||||
if (window.innerWidth < 768) {
|
||||
numMonths = 6;
|
||||
} else {
|
||||
numMonths = 12;
|
||||
}
|
||||
|
||||
const startDate = new Date(today.getFullYear(), today.getMonth() - numMonths + 1, 1, today.getHours(), today.getMinutes(), today.getSeconds());
|
||||
|
||||
while (startDate.getDay() !== 1) {
|
||||
startDate.setDate(startDate.getDate() + 1);
|
||||
}
|
||||
|
||||
return startDate;
|
||||
}
|
||||
|
||||
function getWeekDay(date) {
|
||||
const day = date.getDay();
|
||||
return day === 0 ? 6 : day - 1;
|
||||
}
|
||||
|
||||
function createDay(date, title, count, post) {
|
||||
const day = document.createElement("div");
|
||||
|
||||
day.className = "heatmap_day";
|
||||
|
||||
day.setAttribute("data-title", title);
|
||||
day.setAttribute("data-count", count);
|
||||
day.setAttribute("data-post", post);
|
||||
day.setAttribute("data-date", date);
|
||||
|
||||
day.addEventListener("mouseenter", function () {
|
||||
const tooltip = document.createElement("div");
|
||||
tooltip.className = "heatmap_tooltip";
|
||||
|
||||
let tooltipContent = "";
|
||||
|
||||
if (post && parseInt(post, 10) !== 0) {
|
||||
tooltipContent += '<span class="heatmap_tooltip_post">' + '共 ' + post + ' 篇' + '</span>';
|
||||
}
|
||||
|
||||
if (count && parseInt(count, 10) !== 0) {
|
||||
tooltipContent += '<span class="heatmap_tooltip_count">' + ' ' + count + ' 字;' + '</span>';
|
||||
}
|
||||
|
||||
if (title && parseInt(title, 10) !== 0) {
|
||||
tooltipContent += '<span class="heatmap_tooltip_title">' + title + '</span>';
|
||||
}
|
||||
|
||||
if (date) {
|
||||
tooltipContent += '<span class="heatmap_tooltip_date">' + date + '</span>';
|
||||
}
|
||||
|
||||
tooltip.innerHTML = tooltipContent;
|
||||
day.appendChild(tooltip);
|
||||
});
|
||||
|
||||
day.addEventListener("mouseleave", function () {
|
||||
const tooltip = day.querySelector(".heatmap_tooltip");
|
||||
if (tooltip) {
|
||||
day.removeChild(tooltip);
|
||||
}
|
||||
});
|
||||
|
||||
if (count == 0 ) {
|
||||
day.classList.add("heatmap_day_level_0");
|
||||
} else if (count > 0 && count < 1000) {
|
||||
day.classList.add("heatmap_day_level_1");
|
||||
} else if (count >= 1000 && count < 2000) {
|
||||
day.classList.add("heatmap_day_level_2");
|
||||
} else if (count >= 2000 && count < 3000) {
|
||||
day.classList.add("heatmap_day_level_3");
|
||||
} else {
|
||||
day.classList.add("heatmap_day_level_4");
|
||||
}
|
||||
|
||||
return day;
|
||||
}
|
||||
|
||||
function createWeek() {
|
||||
const week = document.createElement('div');
|
||||
week.className = 'heatmap_week';
|
||||
return week;
|
||||
}
|
||||
|
||||
function createHeatmap() {
|
||||
const container = document.getElementById('heatmap');
|
||||
const startDate = getStartDate();
|
||||
const endDate = new Date();
|
||||
const weekDay = getWeekDay(startDate);
|
||||
|
||||
let currentWeek = createWeek();
|
||||
container.appendChild(currentWeek);
|
||||
|
||||
let currentDate = startDate;
|
||||
let i = 0;
|
||||
|
||||
while (currentDate <= endDate) {
|
||||
if (i % 7 === 0 && i !== 0) {
|
||||
currentWeek = createWeek();
|
||||
container.appendChild(currentWeek);
|
||||
}
|
||||
|
||||
const dateString = `${currentDate.getFullYear()}-${("0" + (currentDate.getMonth()+1)).slice(-2)}-${("0" + (currentDate.getDate())).slice(-2)}`;
|
||||
|
||||
const articleDataList = blogInfo.pages.filter(page => page.date === dateString);
|
||||
|
||||
if (articleDataList.length > 0) {
|
||||
const titles = articleDataList.map(data => data.title);
|
||||
const title = titles.map(t => `《${t}》`).join('<br />');
|
||||
|
||||
let count = 0;
|
||||
let post = articleDataList.length;
|
||||
|
||||
articleDataList.forEach(data => {
|
||||
count += parseInt(data.word_count, 10);
|
||||
});
|
||||
|
||||
const formattedDate = formatDate(currentDate);
|
||||
const day = createDay(formattedDate, title, count, post);
|
||||
currentWeek.appendChild(day);
|
||||
} else {
|
||||
const formattedDate = formatDate(currentDate);
|
||||
const day = createDay(formattedDate, '', '0', '0');
|
||||
currentWeek.appendChild(day);
|
||||
}
|
||||
|
||||
i++;
|
||||
currentDate.setDate(currentDate.getDate() + 1);
|
||||
}
|
||||
}
|
||||
|
||||
function formatDate(date) {
|
||||
const options = { month: 'short', day: 'numeric', year: 'numeric' };
|
||||
return date.toLocaleDateString('en-US', options);
|
||||
}
|
||||
|
||||
createHeatmap();
|
||||
+1
-7
@@ -182,11 +182,5 @@
|
||||
scrollImg: true
|
||||
});
|
||||
});
|
||||
console.log(currentPath)
|
||||
console.log(currentPath.includes("/post/"))
|
||||
console.log(currentPath.includes("/says/"))
|
||||
// pjax完成后加载 waline
|
||||
if (currentPath.includes("/post/") || currentPath.includes("/says/")) {
|
||||
initWaline();
|
||||
}
|
||||
|
||||
});
|
||||
+51
-70
@@ -18,6 +18,7 @@
|
||||
<script src="https://usj.cc/usr/themes/Ying/js/jquery.barrager.js"></script>
|
||||
<script src="/js/jquery.scrollUp.min.js"></script>
|
||||
<script src="/js/pjax.js"></script>
|
||||
|
||||
<script>console.log("\n %c Amigo Theme %c https://usj.cc \n", "color: #fadfa3; background: #030307; padding:3px; font-size:12px;", "color: #ffffff;background: #16171a; padding: 3px; font-size: 12px;");</script>
|
||||
<meta name="keywords" content="大学,教程,blog,优世界,优设计,博客,大学生博客,生活,文案," />
|
||||
<meta name="template" content="Ying" />
|
||||
@@ -70,7 +71,7 @@
|
||||
<a href="https://blog.keepke.com" rel="noopener" title="保持思考与理性" target="_blank">
|
||||
<span class="links-title">吾柯</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -78,7 +79,7 @@
|
||||
<a href="https://qq.md" rel="noopener" title="福建三明尤溪人士" target="_blank">
|
||||
<span class="links-title">叶开</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -86,7 +87,7 @@
|
||||
<a href="https://loseu.cc" rel="noopener" title="愿陪你慢慢长大" target="_blank">
|
||||
<span class="links-title">强仔</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -94,7 +95,7 @@
|
||||
<a href="https://yang99.fun" rel="noopener" title="感谢相识" target="_blank">
|
||||
<span class="links-title">一泽</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -102,7 +103,7 @@
|
||||
<a href="https://qydzz.cn" rel="noopener" title="用文字记录那些时间带走的东西" target="_blank">
|
||||
<span class="links-title">七栀</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -110,7 +111,7 @@
|
||||
<a href="https://www.rz.sb" rel="noopener" title="一个若志的网络自留地" target="_blank">
|
||||
<span class="links-title">若志随笔</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -118,7 +119,7 @@
|
||||
<a href="https://heitaosan.com" rel="noopener" title="逆着光行走,任风吹雨打" target="_blank">
|
||||
<span class="links-title">黑桃三</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -126,7 +127,7 @@
|
||||
<a href="https://blog.allnull.cn" rel="noopener" title="别让世俗淹没了生活" target="_blank">
|
||||
<span class="links-title">十七的小栈</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -134,7 +135,7 @@
|
||||
<a href="https://vian.top" rel="noopener" title="想要的都拥有,得不到的都释怀!" target="_blank">
|
||||
<span class="links-title">Vian</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -142,7 +143,7 @@
|
||||
<a href="https://www.200011.net" rel="noopener" title="A website for myself" target="_blank">
|
||||
<span class="links-title">油油</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -150,7 +151,7 @@
|
||||
<a href="https://www.dawuyu.com" rel="noopener" title="假如没有假如,如果没有如果" target="_blank">
|
||||
<span class="links-title">大悟博客</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -158,7 +159,7 @@
|
||||
<a href="https://www.sunjianjian.com" rel="noopener" title="总会有温柔的人愿意站在你能看见的地方。" target="_blank">
|
||||
<span class="links-title">Sun's Blog</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -166,7 +167,7 @@
|
||||
<a href="https://duanxiansen.com" rel="noopener" title="迄今所有人生都大写着失败,但并不妨碍我继续向前" target="_blank">
|
||||
<span class="links-title">段先森</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -174,7 +175,7 @@
|
||||
<a href="https://blog.fivk.cn" rel="noopener" title="相逢的人会再相逢" target="_blank">
|
||||
<span class="links-title">Fivk博客</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -182,7 +183,7 @@
|
||||
<a href="https://www.logyu.cc" rel="noopener" title="记录生活为忆,平地小山为屿" target="_blank">
|
||||
<span class="links-title">日志屿</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -190,7 +191,7 @@
|
||||
<a href="https://baipin.pw" rel="noopener" title="我欲穿花寻路,直入白云深处,浩气展虹霓" target="_blank">
|
||||
<span class="links-title">百品博客</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -198,7 +199,7 @@
|
||||
<a href="https://cacx.cc" rel="noopener" title="有关于成长、生活与情感" target="_blank">
|
||||
<span class="links-title">长安城下</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -206,7 +207,7 @@
|
||||
<a href="https://dyfa.top" rel="noopener" title="十万伏特皮卡丘,梦想是世界和平,想要发光发热" target="_blank">
|
||||
<span class="links-title">itsNekoDeng</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -214,7 +215,7 @@
|
||||
<a href="https://www.baifan97.cn" rel="noopener" title="一个斜杠青年的碎碎念" target="_blank">
|
||||
<span class="links-title">WhiteFan</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -222,7 +223,7 @@
|
||||
<a href="https://beifeng.me" rel="noopener" title="记录一个人的生活点滴" target="_blank">
|
||||
<span class="links-title">北枫</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -230,7 +231,7 @@
|
||||
<a href="https://t-t.live" rel="noopener" title="爱生活 爱分享" target="_blank">
|
||||
<span class="links-title">团团生活志</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -238,7 +239,7 @@
|
||||
<a href="https://mua.ooo" rel="noopener" title="一 个 古 精 灵 怪" target="_blank">
|
||||
<span class="links-title">呆呆怪</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -246,7 +247,7 @@
|
||||
<a href="https://huziyan.com" rel="noopener" title="臭袜子" target="_blank">
|
||||
<span class="links-title">臭袜子</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -254,7 +255,7 @@
|
||||
<a href="https://www.yuezeyi.com" rel="noopener" title="我们历经苦难,我们生生不息" target="_blank">
|
||||
<span class="links-title">岳泽以</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -262,7 +263,7 @@
|
||||
<a href="https://www.fllv.cn" rel="noopener" title="记录生活" target="_blank">
|
||||
<span class="links-title">三石的记录</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -270,7 +271,7 @@
|
||||
<a href="https://mojinxi.cn" rel="noopener" title="相视而笑,莫逆于心。" target="_blank">
|
||||
<span class="links-title">竹春廿柒</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -278,7 +279,7 @@
|
||||
<a href="https://www.sirit.com.cn" rel="noopener" title="真正的幸福在于对平淡生活的热爱" target="_blank">
|
||||
<span class="links-title">大嘴狗狗</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -286,7 +287,7 @@
|
||||
<a href="https://sweetjing.cc/" rel="noopener" title="一切都会好起来,然后走向正轨,保持热爱,奔赴山海。" target="_blank">
|
||||
<span class="links-title">半截の诗</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -294,7 +295,7 @@
|
||||
<a href="https://vimin.cc" rel="noopener" title="记录生活点滴,谱写精彩生活!" target="_blank">
|
||||
<span class="links-title">XIAOMING'S BLOG</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -302,7 +303,7 @@
|
||||
<a href="https://xyzbz.cn" rel="noopener" title="一个九三年的老青年" target="_blank">
|
||||
<span class="links-title">网友小宋</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -310,7 +311,7 @@
|
||||
<a href="https://blog.zyyo.net" rel="noopener" title="热烈而自由" target="_blank">
|
||||
<span class="links-title">zyyo笔记</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -318,7 +319,7 @@
|
||||
<a href="https://sumiler.com" rel="noopener" title="微风轻轻起 夏日不再来" target="_blank">
|
||||
<span class="links-title">微风忆夏</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -326,7 +327,7 @@
|
||||
<a href="https://www.xiaozonglin.cn" rel="noopener" title="一位来自福建泉州的高中生" target="_blank">
|
||||
<span class="links-title">林林杂语</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -334,7 +335,7 @@
|
||||
<a href="https://www.bio-w.cn" rel="noopener" title="我在人间贩卖彩虹" target="_blank">
|
||||
<span class="links-title">西瓜撞地球</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -342,7 +343,7 @@
|
||||
<a href="https://te.ink" rel="noopener" title="愿山野浓雾都有路灯风..." target="_blank">
|
||||
<span class="links-title">Teink</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -350,7 +351,7 @@
|
||||
<a href="https://www.eacls.top" rel="noopener" title="看一看世界的繁华" target="_blank">
|
||||
<span class="links-title">Eacls</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -358,7 +359,7 @@
|
||||
<a href="https://blog.krisyan.dev" rel="noopener" title="無限進步 @Schale夏萊" target="_blank">
|
||||
<span class="links-title">Kris Yan</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -366,7 +367,7 @@
|
||||
<a href="http://liuyuyang.net" rel="noopener" title="记录一个架构师的崛起" target="_blank">
|
||||
<span class="links-title">YuYang</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -374,7 +375,7 @@
|
||||
<a href="https://www.liveout.cn/" rel="noopener" title="漂泊于互联网中的小窝" target="_blank">
|
||||
<span class="links-title">Echo 的小窝</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -382,7 +383,7 @@
|
||||
<a href="https://felixway.cn" rel="noopener" title="漂泊于互联网中的小窝" target="_blank">
|
||||
<span class="links-title">未来往事</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -390,7 +391,7 @@
|
||||
<a href="https://ihello.cc" rel="noopener" title="心存阳光,必有诗和远方" target="_blank">
|
||||
<span class="links-title">小稚生活志</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -398,7 +399,7 @@
|
||||
<a href="https://whooc.com" rel="noopener" title="寒冻三尺非此界,烈日焦灼正午时!" target="_blank">
|
||||
<span class="links-title">风呼呼</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -406,7 +407,7 @@
|
||||
<a href="https://www.liuchengrui.cn" rel="noopener" title="其实我是一个假柳橙" target="_blank">
|
||||
<span class="links-title">柳橙睿</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -414,7 +415,7 @@
|
||||
<a href="https://likaijian.com" rel="noopener" title="留下瞬间,记录永恒" target="_blank">
|
||||
<span class="links-title">永恒末匕</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -422,7 +423,7 @@
|
||||
<a href="https://yjvc.cn/" rel="noopener" title="一个积极向上的生活探索者!" target="_blank">
|
||||
<span class="links-title">刘郎阁</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -430,7 +431,7 @@
|
||||
<a href="https://www.fcln.net" rel="noopener" title="借一点落日的光与来日方长" target="_blank">
|
||||
<span class="links-title">浮沉流年</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
<div class="link_box" uk-scrollspy="cls: uk-animation-slide-bottom-medium; repeat: true">
|
||||
@@ -438,7 +439,7 @@
|
||||
<a href="https://www.landiaoshike.com/" rel="noopener" title="天在将暗未暗时最美 爱在将爱未爱时最迷人" target="_blank">
|
||||
<span class="links-title">蓝调时刻</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
|
||||
|
||||
@@ -448,7 +449,8 @@
|
||||
|
||||
|
||||
|
||||
<div class="footer">
|
||||
|
||||
<div class="footer">
|
||||
<nav class="nav" style="clear: both;">
|
||||
© 2019 - 2024
|
||||
<br>
|
||||
@@ -466,29 +468,8 @@
|
||||
<script src="/js/main.js"></script>
|
||||
<script src="/js/mypjax.js"></script>
|
||||
<script src="/js/nprogress.js"></script>
|
||||
<script>
|
||||
var currentPath = "\/links\/";
|
||||
document.addEventListener("pjax:send", function () {
|
||||
var currentPath = "\/links\/";
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="module">
|
||||
import { init as walineInit } from 'https://unpkg.com/@waline/client@v3/dist/waline.js';
|
||||
|
||||
|
||||
window.walineInit = walineInit;
|
||||
|
||||
|
||||
window.initWaline = function() {
|
||||
walineInit({
|
||||
el: '#waline',
|
||||
serverURL: 'https://waline.usj.cc',
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
<script src="https://usj.cc/usr/themes/Ying/js/jquery.barrager.js"></script>
|
||||
<script src="/js/jquery.scrollUp.min.js"></script>
|
||||
<script src="/js/pjax.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://unpkg.com/@waline/client@v3/dist/waline.css" />
|
||||
|
||||
<script>console.log("\n %c Amigo Theme %c https://usj.cc \n", "color: #fadfa3; background: #030307; padding:3px; font-size:12px;", "color: #ffffff;background: #16171a; padding: 3px; font-size: 12px;");</script>
|
||||
<meta name="keywords" content="大学,教程,blog,优世界,优设计,博客,大学生博客,生活,文案," />
|
||||
<meta name="template" content="Ying" />
|
||||
@@ -90,7 +93,10 @@
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
|
||||
currentPath = "\/post\/demo01\/";
|
||||
var currentPath = "\/post\/demo01\/";
|
||||
|
||||
console.log(currentPath)
|
||||
|
||||
|
||||
|
||||
fetchCommentsAndCreateBarrager(currentPath, {
|
||||
@@ -105,11 +111,35 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="footer">
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://unpkg.com/@waline/client@v3/dist/waline.css"
|
||||
/>
|
||||
<div id="waline"></div>
|
||||
<script type="module">
|
||||
import { init as walineInit } from 'https://unpkg.com/@waline/client@v3/dist/waline.js';
|
||||
|
||||
window.walineInit = walineInit;
|
||||
|
||||
window.initWaline = function() {
|
||||
walineInit({
|
||||
el: '#waline',
|
||||
serverURL: 'https://waline.usj.cc',
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
window.initWaline();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<div class="footer">
|
||||
<nav class="nav" style="clear: both;">
|
||||
© 2019 - 2024
|
||||
<br>
|
||||
@@ -127,29 +157,8 @@
|
||||
<script src="/js/main.js"></script>
|
||||
<script src="/js/mypjax.js"></script>
|
||||
<script src="/js/nprogress.js"></script>
|
||||
<script>
|
||||
var currentPath = "\/post\/demo01\/";
|
||||
document.addEventListener("pjax:send", function () {
|
||||
var currentPath = "\/post\/demo01\/";
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="module">
|
||||
import { init as walineInit } from 'https://unpkg.com/@waline/client@v3/dist/waline.js';
|
||||
|
||||
|
||||
window.walineInit = walineInit;
|
||||
|
||||
|
||||
window.initWaline = function() {
|
||||
walineInit({
|
||||
el: '#waline',
|
||||
serverURL: 'https://waline.usj.cc',
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
<script src="https://usj.cc/usr/themes/Ying/js/jquery.barrager.js"></script>
|
||||
<script src="/js/jquery.scrollUp.min.js"></script>
|
||||
<script src="/js/pjax.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://unpkg.com/@waline/client@v3/dist/waline.css" />
|
||||
|
||||
<script>console.log("\n %c Amigo Theme %c https://usj.cc \n", "color: #fadfa3; background: #030307; padding:3px; font-size:12px;", "color: #ffffff;background: #16171a; padding: 3px; font-size: 12px;");</script>
|
||||
<meta name="keywords" content="大学,教程,blog,优世界,优设计,博客,大学生博客,生活,文案," />
|
||||
<meta name="template" content="Ying" />
|
||||
@@ -92,7 +95,10 @@
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
|
||||
currentPath = "\/post\/demo03\/";
|
||||
var currentPath = "\/post\/demo03\/";
|
||||
|
||||
console.log(currentPath)
|
||||
|
||||
|
||||
|
||||
fetchCommentsAndCreateBarrager(currentPath, {
|
||||
@@ -107,11 +113,35 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="footer">
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://unpkg.com/@waline/client@v3/dist/waline.css"
|
||||
/>
|
||||
<div id="waline"></div>
|
||||
<script type="module">
|
||||
import { init as walineInit } from 'https://unpkg.com/@waline/client@v3/dist/waline.js';
|
||||
|
||||
window.walineInit = walineInit;
|
||||
|
||||
window.initWaline = function() {
|
||||
walineInit({
|
||||
el: '#waline',
|
||||
serverURL: 'https://waline.usj.cc',
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
window.initWaline();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<div class="footer">
|
||||
<nav class="nav" style="clear: both;">
|
||||
© 2019 - 2024
|
||||
<br>
|
||||
@@ -129,29 +159,8 @@
|
||||
<script src="/js/main.js"></script>
|
||||
<script src="/js/mypjax.js"></script>
|
||||
<script src="/js/nprogress.js"></script>
|
||||
<script>
|
||||
var currentPath = "\/post\/demo03\/";
|
||||
document.addEventListener("pjax:send", function () {
|
||||
var currentPath = "\/post\/demo03\/";
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="module">
|
||||
import { init as walineInit } from 'https://unpkg.com/@waline/client@v3/dist/waline.js';
|
||||
|
||||
|
||||
window.walineInit = walineInit;
|
||||
|
||||
|
||||
window.initWaline = function() {
|
||||
walineInit({
|
||||
el: '#waline',
|
||||
serverURL: 'https://waline.usj.cc',
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
<script src="https://usj.cc/usr/themes/Ying/js/jquery.barrager.js"></script>
|
||||
<script src="/js/jquery.scrollUp.min.js"></script>
|
||||
<script src="/js/pjax.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://unpkg.com/@waline/client@v3/dist/waline.css" />
|
||||
|
||||
<script>console.log("\n %c Amigo Theme %c https://usj.cc \n", "color: #fadfa3; background: #030307; padding:3px; font-size:12px;", "color: #ffffff;background: #16171a; padding: 3px; font-size: 12px;");</script>
|
||||
<meta name="keywords" content="大学,教程,blog,优世界,优设计,博客,大学生博客,生活,文案," />
|
||||
<meta name="template" content="Ying" />
|
||||
@@ -89,7 +92,10 @@
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
|
||||
currentPath = "\/post\/demo05\/";
|
||||
var currentPath = "\/post\/demo05\/";
|
||||
|
||||
console.log(currentPath)
|
||||
|
||||
|
||||
|
||||
fetchCommentsAndCreateBarrager(currentPath, {
|
||||
@@ -104,11 +110,35 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="footer">
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://unpkg.com/@waline/client@v3/dist/waline.css"
|
||||
/>
|
||||
<div id="waline"></div>
|
||||
<script type="module">
|
||||
import { init as walineInit } from 'https://unpkg.com/@waline/client@v3/dist/waline.js';
|
||||
|
||||
window.walineInit = walineInit;
|
||||
|
||||
window.initWaline = function() {
|
||||
walineInit({
|
||||
el: '#waline',
|
||||
serverURL: 'https://waline.usj.cc',
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
window.initWaline();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<div class="footer">
|
||||
<nav class="nav" style="clear: both;">
|
||||
© 2019 - 2024
|
||||
<br>
|
||||
@@ -126,29 +156,8 @@
|
||||
<script src="/js/main.js"></script>
|
||||
<script src="/js/mypjax.js"></script>
|
||||
<script src="/js/nprogress.js"></script>
|
||||
<script>
|
||||
var currentPath = "\/post\/demo05\/";
|
||||
document.addEventListener("pjax:send", function () {
|
||||
var currentPath = "\/post\/demo05\/";
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="module">
|
||||
import { init as walineInit } from 'https://unpkg.com/@waline/client@v3/dist/waline.js';
|
||||
|
||||
|
||||
window.walineInit = walineInit;
|
||||
|
||||
|
||||
window.initWaline = function() {
|
||||
walineInit({
|
||||
el: '#waline',
|
||||
serverURL: 'https://waline.usj.cc',
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
@@ -68,6 +68,11 @@
|
||||
<h2 class="section-header">随笔<i class="ri-quill-pen-line"></i></h2>
|
||||
<div class="posts">
|
||||
|
||||
<div class="post">
|
||||
<div class="time">July 12, 2024</div>
|
||||
<a href="http://localhost:1313/post/demo05/">Demo05</a>
|
||||
</div>
|
||||
|
||||
<div class="post">
|
||||
<div class="time">July 11, 2024</div>
|
||||
<a href="http://localhost:1313/post/demo03/">Demo03</a>
|
||||
|
||||
@@ -6,8 +6,15 @@
|
||||
<description>Recent content in Posts on 小赵同学的博客</description>
|
||||
<generator>Hugo</generator>
|
||||
<language>zh-cn</language>
|
||||
<lastBuildDate>Thu, 11 Jul 2024 15:30:40 +0800</lastBuildDate>
|
||||
<lastBuildDate>Fri, 12 Jul 2024 19:38:33 +0800</lastBuildDate>
|
||||
<atom:link href="http://localhost:1313/post/index.xml" rel="self" type="application/rss+xml" />
|
||||
<item>
|
||||
<title>Demo05</title>
|
||||
<link>http://localhost:1313/post/demo05/</link>
|
||||
<pubDate>Fri, 12 Jul 2024 19:38:33 +0800</pubDate>
|
||||
<guid>http://localhost:1313/post/demo05/</guid>
|
||||
<description>请输入您的文章内容。</description>
|
||||
</item>
|
||||
<item>
|
||||
<title>Demo03</title>
|
||||
<link>http://localhost:1313/post/demo03/</link>
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
<script src="https://usj.cc/usr/themes/Ying/js/jquery.barrager.js"></script>
|
||||
<script src="/js/jquery.scrollUp.min.js"></script>
|
||||
<script src="/js/pjax.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://unpkg.com/@waline/client@v3/dist/waline.css" />
|
||||
|
||||
<script>console.log("\n %c Amigo Theme %c https://usj.cc \n", "color: #fadfa3; background: #030307; padding:3px; font-size:12px;", "color: #ffffff;background: #16171a; padding: 3px; font-size: 12px;");</script>
|
||||
<meta name="keywords" content="大学,教程,blog,优世界,优设计,博客,大学生博客,生活,文案," />
|
||||
<meta name="template" content="Ying" />
|
||||
@@ -89,7 +92,10 @@
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
|
||||
currentPath = "\/post\/my-first-post\/";
|
||||
var currentPath = "\/post\/my-first-post\/";
|
||||
|
||||
console.log(currentPath)
|
||||
|
||||
|
||||
|
||||
fetchCommentsAndCreateBarrager(currentPath, {
|
||||
@@ -104,11 +110,35 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="footer">
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://unpkg.com/@waline/client@v3/dist/waline.css"
|
||||
/>
|
||||
<div id="waline"></div>
|
||||
<script type="module">
|
||||
import { init as walineInit } from 'https://unpkg.com/@waline/client@v3/dist/waline.js';
|
||||
|
||||
window.walineInit = walineInit;
|
||||
|
||||
window.initWaline = function() {
|
||||
walineInit({
|
||||
el: '#waline',
|
||||
serverURL: 'https://waline.usj.cc',
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
window.initWaline();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<div class="footer">
|
||||
<nav class="nav" style="clear: both;">
|
||||
© 2019 - 2024
|
||||
<br>
|
||||
@@ -126,29 +156,8 @@
|
||||
<script src="/js/main.js"></script>
|
||||
<script src="/js/mypjax.js"></script>
|
||||
<script src="/js/nprogress.js"></script>
|
||||
<script>
|
||||
var currentPath = "\/post\/my-first-post\/";
|
||||
document.addEventListener("pjax:send", function () {
|
||||
var currentPath = "\/post\/my-first-post\/";
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="module">
|
||||
import { init as walineInit } from 'https://unpkg.com/@waline/client@v3/dist/waline.js';
|
||||
|
||||
|
||||
window.walineInit = walineInit;
|
||||
|
||||
|
||||
window.initWaline = function() {
|
||||
walineInit({
|
||||
el: '#waline',
|
||||
serverURL: 'https://waline.usj.cc',
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
<script src="https://usj.cc/usr/themes/Ying/js/jquery.barrager.js"></script>
|
||||
<script src="/js/jquery.scrollUp.min.js"></script>
|
||||
<script src="/js/pjax.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="https://unpkg.com/@waline/client@v3/dist/waline.css" />
|
||||
|
||||
<script>console.log("\n %c Amigo Theme %c https://usj.cc \n", "color: #fadfa3; background: #030307; padding:3px; font-size:12px;", "color: #ffffff;background: #16171a; padding: 3px; font-size: 12px;");</script>
|
||||
<meta name="keywords" content="大学,教程,blog,优世界,优设计,博客,大学生博客,生活,文案," />
|
||||
<meta name="template" content="Ying" />
|
||||
@@ -89,7 +92,10 @@
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
|
||||
currentPath = "\/post\/my-second-post\/";
|
||||
var currentPath = "\/post\/my-second-post\/";
|
||||
|
||||
console.log(currentPath)
|
||||
|
||||
|
||||
|
||||
fetchCommentsAndCreateBarrager(currentPath, {
|
||||
@@ -104,11 +110,35 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="footer">
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://unpkg.com/@waline/client@v3/dist/waline.css"
|
||||
/>
|
||||
<div id="waline"></div>
|
||||
<script type="module">
|
||||
import { init as walineInit } from 'https://unpkg.com/@waline/client@v3/dist/waline.js';
|
||||
|
||||
window.walineInit = walineInit;
|
||||
|
||||
window.initWaline = function() {
|
||||
walineInit({
|
||||
el: '#waline',
|
||||
serverURL: 'https://waline.usj.cc',
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
window.initWaline();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<div class="footer">
|
||||
<nav class="nav" style="clear: both;">
|
||||
© 2019 - 2024
|
||||
<br>
|
||||
@@ -126,29 +156,8 @@
|
||||
<script src="/js/main.js"></script>
|
||||
<script src="/js/mypjax.js"></script>
|
||||
<script src="/js/nprogress.js"></script>
|
||||
<script>
|
||||
var currentPath = "\/post\/my-second-post\/";
|
||||
document.addEventListener("pjax:send", function () {
|
||||
var currentPath = "\/post\/my-second-post\/";
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="module">
|
||||
import { init as walineInit } from 'https://unpkg.com/@waline/client@v3/dist/waline.js';
|
||||
|
||||
|
||||
window.walineInit = walineInit;
|
||||
|
||||
|
||||
window.initWaline = function() {
|
||||
walineInit({
|
||||
el: '#waline',
|
||||
serverURL: 'https://waline.usj.cc',
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
+4
-23
@@ -18,6 +18,7 @@
|
||||
<script src="https://usj.cc/usr/themes/Ying/js/jquery.barrager.js"></script>
|
||||
<script src="/js/jquery.scrollUp.min.js"></script>
|
||||
<script src="/js/pjax.js"></script>
|
||||
|
||||
<script>console.log("\n %c Amigo Theme %c https://usj.cc \n", "color: #fadfa3; background: #030307; padding:3px; font-size:12px;", "color: #ffffff;background: #16171a; padding: 3px; font-size: 12px;");</script>
|
||||
<meta name="keywords" content="大学,教程,blog,优世界,优设计,博客,大学生博客,生活,文案," />
|
||||
<meta name="template" content="Ying" />
|
||||
@@ -88,7 +89,8 @@
|
||||
|
||||
|
||||
|
||||
<div class="footer">
|
||||
|
||||
<div class="footer">
|
||||
<nav class="nav" style="clear: both;">
|
||||
© 2019 - 2024
|
||||
<br>
|
||||
@@ -106,29 +108,8 @@
|
||||
<script src="/js/main.js"></script>
|
||||
<script src="/js/mypjax.js"></script>
|
||||
<script src="/js/nprogress.js"></script>
|
||||
<script>
|
||||
var currentPath = "\/says\/";
|
||||
document.addEventListener("pjax:send", function () {
|
||||
var currentPath = "\/says\/";
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="module">
|
||||
import { init as walineInit } from 'https://unpkg.com/@waline/client@v3/dist/waline.js';
|
||||
|
||||
|
||||
window.walineInit = walineInit;
|
||||
|
||||
|
||||
window.initWaline = function() {
|
||||
walineInit({
|
||||
el: '#waline',
|
||||
serverURL: 'https://waline.usj.cc',
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
+6
-3
@@ -2,13 +2,16 @@
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
<url>
|
||||
<loc>http://localhost:1313/post/demo03/</loc>
|
||||
<lastmod>2024-07-11T15:30:40+08:00</lastmod>
|
||||
<loc>http://localhost:1313/post/demo05/</loc>
|
||||
<lastmod>2024-07-12T19:38:33+08:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/post/</loc>
|
||||
<lastmod>2024-07-11T15:30:40+08:00</lastmod>
|
||||
<lastmod>2024-07-12T19:38:33+08:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/</loc>
|
||||
<lastmod>2024-07-12T19:38:33+08:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/post/demo03/</loc>
|
||||
<lastmod>2024-07-11T15:30:40+08:00</lastmod>
|
||||
</url><url>
|
||||
<loc>http://localhost:1313/post/demo01/</loc>
|
||||
|
||||
+4
-23
@@ -18,6 +18,7 @@
|
||||
<script src="https://usj.cc/usr/themes/Ying/js/jquery.barrager.js"></script>
|
||||
<script src="/js/jquery.scrollUp.min.js"></script>
|
||||
<script src="/js/pjax.js"></script>
|
||||
|
||||
<script>console.log("\n %c Amigo Theme %c https://usj.cc \n", "color: #fadfa3; background: #030307; padding:3px; font-size:12px;", "color: #ffffff;background: #16171a; padding: 3px; font-size: 12px;");</script>
|
||||
<meta name="keywords" content="大学,教程,blog,优世界,优设计,博客,大学生博客,生活,文案," />
|
||||
<meta name="template" content="Ying" />
|
||||
@@ -79,7 +80,8 @@
|
||||
|
||||
|
||||
|
||||
<div class="footer">
|
||||
|
||||
<div class="footer">
|
||||
<nav class="nav" style="clear: both;">
|
||||
© 2019 - 2024
|
||||
<br>
|
||||
@@ -97,29 +99,8 @@
|
||||
<script src="/js/main.js"></script>
|
||||
<script src="/js/mypjax.js"></script>
|
||||
<script src="/js/nprogress.js"></script>
|
||||
<script>
|
||||
var currentPath = "\/tags\/";
|
||||
document.addEventListener("pjax:send", function () {
|
||||
var currentPath = "\/tags\/";
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="module">
|
||||
import { init as walineInit } from 'https://unpkg.com/@waline/client@v3/dist/waline.js';
|
||||
|
||||
|
||||
window.walineInit = walineInit;
|
||||
|
||||
|
||||
window.initWaline = function() {
|
||||
walineInit({
|
||||
el: '#waline',
|
||||
serverURL: 'https://waline.usj.cc',
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
@@ -1,158 +1,7 @@
|
||||
{{ define "main" }}
|
||||
<div id="pjax-container">
|
||||
<h2>热力图</h2>
|
||||
<div id="heatmap" style="
|
||||
max-width: 600px;
|
||||
height: 180px;
|
||||
padding: 2px;
|
||||
text-align: center;"
|
||||
></div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/echarts@5.3.0/dist/echarts.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var chartDom = document.getElementById('heatmap');
|
||||
var myChart = echarts.init(chartDom);
|
||||
window.onresize = function() {
|
||||
myChart.resize();
|
||||
};
|
||||
var option;
|
||||
|
||||
// echart heatmap data seems to only support two elements tuple
|
||||
// it doesn't render when each item has 3 value
|
||||
// it also only pass first 2 elements when reading event param
|
||||
// so here we build a map to store additional metadata like link and title
|
||||
// map format {date: [wordcount, link, title]}
|
||||
// for more information see https://blog.douchi.space/hugo-blog-heatmap
|
||||
var dataMap = new Map();
|
||||
{{ range ((where .Site.RegularPages "Type" "post")) }}
|
||||
var key = {{ .Date.Format "2006-01-02" }};
|
||||
var value = dataMap.get(key);
|
||||
var wordCount = {{ div .WordCount 1000.0 | lang.FormatNumber 1 }};
|
||||
var link = {{ .RelPermalink}};
|
||||
var title = {{ .Title }};
|
||||
|
||||
// multiple posts in same day, chose the longer one
|
||||
// can also store all posts and use sum as value, but seems like an overkill
|
||||
if (value == null || wordCount > value[0]) {
|
||||
dataMap.set(key, {wordCount, link, title});
|
||||
}
|
||||
{{- end -}}
|
||||
|
||||
var data = [];
|
||||
for (const [key, value] of dataMap.entries()) {
|
||||
data.push([key, value.wordCount]);
|
||||
}
|
||||
|
||||
var startDate = new Date();
|
||||
var year_Mill = startDate.setFullYear((startDate.getFullYear() - 1));
|
||||
var startDate = +new Date(year_Mill);
|
||||
var endDate = +new Date();
|
||||
|
||||
var dayTime = 3600 * 24 * 1000;
|
||||
startDate = echarts.format.formatTime('yyyy-MM-dd', startDate);
|
||||
endDate = echarts.format.formatTime('yyyy-MM-dd', endDate);
|
||||
|
||||
// change date range according to months we want to render
|
||||
function heatmap_width(months){
|
||||
var startDate = new Date();
|
||||
var mill = startDate.setMonth((startDate.getMonth() - months));
|
||||
var endDate = +new Date();
|
||||
startDate = +new Date(mill);
|
||||
|
||||
endDate = echarts.format.formatTime('yyyy-MM-dd', endDate);
|
||||
startDate = echarts.format.formatTime('yyyy-MM-dd', startDate);
|
||||
|
||||
var showmonth = [];
|
||||
showmonth.push([
|
||||
startDate,
|
||||
endDate
|
||||
]);
|
||||
return showmonth
|
||||
};
|
||||
|
||||
function getRangeArr() {
|
||||
const windowWidth = window.innerWidth;
|
||||
if (windowWidth >= 600) {
|
||||
return heatmap_width(12);
|
||||
} else if (windowWidth >= 400) {
|
||||
return heatmap_width(9);
|
||||
} else {
|
||||
return heatmap_width(6);
|
||||
}
|
||||
}
|
||||
|
||||
option = {
|
||||
title: {
|
||||
top: 0,
|
||||
left: 'center',
|
||||
text: ''
|
||||
},
|
||||
tooltip: {
|
||||
formatter: function (p) {
|
||||
const post = dataMap.get(p.data[0]);
|
||||
return post.title + ' | ' + post.wordCount + ' 千字';
|
||||
}
|
||||
},
|
||||
visualMap: {
|
||||
min: 0,
|
||||
max: 10,
|
||||
type: 'piecewise',
|
||||
orient: 'horizontal',
|
||||
left: 'center',
|
||||
top: 30,
|
||||
|
||||
inRange: {
|
||||
// [floor color, ceiling color]
|
||||
color: ['#7aa8744c', '#7AA874' ]
|
||||
},
|
||||
splitNumber: 4,
|
||||
text: ['千字', ''],
|
||||
showLabel: true,
|
||||
itemGap: 20,
|
||||
},
|
||||
calendar: {
|
||||
top: 80,
|
||||
left: 20,
|
||||
right: 4,
|
||||
cellSize: ['auto', 12],
|
||||
range: getRangeArr(),
|
||||
itemStyle: {
|
||||
color: '#F1F1F1',
|
||||
borderWidth: 2.5,
|
||||
borderColor: '#fff',
|
||||
},
|
||||
yearLabel: { show: false },
|
||||
// the splitline between months. set to transparent for now.
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: 'rgba(0, 0, 0, 0.0)',
|
||||
// shadowColor: 'rgba(0, 0, 0, 0.5)',
|
||||
// shadowBlur: 5,
|
||||
// width: 0.5,
|
||||
// type: 'dashed',
|
||||
}
|
||||
}
|
||||
},
|
||||
series: {
|
||||
type: 'heatmap',
|
||||
coordinateSystem: 'calendar',
|
||||
data: data,
|
||||
}
|
||||
};
|
||||
myChart.setOption(option);
|
||||
myChart.on('click', function(params) {
|
||||
if (params.componentType === 'series') {
|
||||
const post = dataMap.get(params.data[0]);
|
||||
const link = window.location.origin + post.link;
|
||||
window.open(link, '_blank').focus();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="post-content" itemprop="articleBody">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="post-content" itemprop="articleBody">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
@@ -12,6 +12,9 @@
|
||||
<!-- main主体部分 -->
|
||||
{{ block "main" . }}{{ end }}
|
||||
<!-- main主体部分结束 -->
|
||||
{{ if or (eq .Type "about") (eq .Type "post") }}
|
||||
{{ partial "waline.html" . }}
|
||||
{{ end }}
|
||||
<!-- footer页脚部分 -->
|
||||
{{ partial "footer.html" .}}
|
||||
<!-- footer页脚部分结束 -->
|
||||
{{ partial "footer.html" .}}
|
||||
<!-- footer页脚部分结束 -->
|
||||
@@ -26,7 +26,10 @@
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
// 获取当前页面的路径
|
||||
currentPath = "{{ .RelPermalink }}";
|
||||
var currentPath = "{{ .RelPermalink }}";
|
||||
|
||||
console.log(currentPath)
|
||||
|
||||
|
||||
// 调用封装的函数
|
||||
fetchCommentsAndCreateBarrager(currentPath, {
|
||||
@@ -41,5 +44,6 @@
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
{{ end }}
|
||||
@@ -3,12 +3,12 @@
|
||||
© 2019 - {{ now.Year }}
|
||||
<br>
|
||||
<a href="https://beian.miit.gov.cn/" target="_blank"><span style="color:#999999;">鄂ICP备2022015735号-1</span></a>
|
||||
{{/* <br>
|
||||
{{/* <br>
|
||||
本站由<a href="https://www.upyun.com/?utm_source=lianmeng&utm_medium=referral" target="blank" title="又拍云"
|
||||
style="display:inline-block;text-decoration:none;height:20px;line-height:20px;">
|
||||
<span style="color: var(--contentColor);font-weight: 700;">又拍云CDN</span>
|
||||
</a>提供CDN加速服务
|
||||
<br> */}}
|
||||
<br> */}}
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
@@ -21,28 +21,7 @@
|
||||
<script src="/js/main.js"></script>
|
||||
<script src="/js/mypjax.js"></script>
|
||||
<script src="/js/nprogress.js"></script>
|
||||
<script>
|
||||
var currentPath = "{{ .RelPermalink }}";
|
||||
document.addEventListener("pjax:send", function () {
|
||||
var currentPath = "{{ .RelPermalink }}";
|
||||
});
|
||||
</script>
|
||||
<!-- 加载 Waline 和 PJAX -->
|
||||
<script type="module">
|
||||
import { init as walineInit } from 'https://unpkg.com/@waline/client@v3/dist/waline.js';
|
||||
|
||||
// 将 walineInit 赋值给全局变量
|
||||
window.walineInit = walineInit;
|
||||
|
||||
// 定义全局的 initWaline 函数
|
||||
window.initWaline = function() {
|
||||
walineInit({
|
||||
el: '#waline',
|
||||
serverURL: 'https://waline.usj.cc',
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -14,6 +14,9 @@
|
||||
<script src="https://usj.cc/usr/themes/Ying/js/jquery.barrager.js"></script>
|
||||
<script src="/js/jquery.scrollUp.min.js"></script>
|
||||
<script src="/js/pjax.js"></script>
|
||||
{{ if or (eq .Type "about") (eq .Type "post") }}
|
||||
<link rel="stylesheet" href="https://unpkg.com/@waline/client@v3/dist/waline.css" />
|
||||
{{ end }}
|
||||
<script>console.log("\n %c Amigo Theme %c https://usj.cc \n", "color: #fadfa3; background: #030307; padding:3px; font-size:12px;", "color: #ffffff;background: #16171a; padding: 3px; font-size: 12px;");</script>
|
||||
<meta name="keywords" content="大学,教程,blog,优世界,优设计,博客,大学生博客,生活,文案," />
|
||||
<meta name="template" content="Ying" />
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
<a href="{{ .url }}" rel="noopener" title="{{ .title }}" target="_blank">
|
||||
<span class="links-title">{{ .name }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>丨
|
||||
</div>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,20 @@
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://unpkg.com/@waline/client@v3/dist/waline.css"
|
||||
/>
|
||||
<div id="waline"></div>
|
||||
<script type="module">
|
||||
import { init as walineInit } from 'https://unpkg.com/@waline/client@v3/dist/waline.js';
|
||||
|
||||
window.walineInit = walineInit;
|
||||
|
||||
window.initWaline = function() {
|
||||
walineInit({
|
||||
el: '#waline',
|
||||
serverURL: 'https://waline.usj.cc',
|
||||
});
|
||||
};
|
||||
|
||||
// Initial load
|
||||
window.initWaline();
|
||||
</script>
|
||||
@@ -0,0 +1,165 @@
|
||||
<div id="heatmap" style="
|
||||
max-width: 1900px;
|
||||
height: 180px;
|
||||
padding: 2px;
|
||||
text-align: center;
|
||||
"
|
||||
></div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/echarts@5.3.0/dist/echarts.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
var chartDom = document.getElementById('heatmap');
|
||||
var myChart = echarts.init(chartDom);
|
||||
window.onresize = function() {
|
||||
myChart.resize();
|
||||
};
|
||||
var option;
|
||||
|
||||
// echart heatmap data seems to only support two elements tuple
|
||||
// it doesn't render when each item has 3 value
|
||||
// it also only pass first 2 elements when reading event param
|
||||
// so here we build a map to store additional metadata like link and title
|
||||
// map format {date: [{wordcount, link, title}]}
|
||||
// for more information see https://blog.douchi.space/hugo-blog-heatmap
|
||||
var dataMap = new Map();
|
||||
{{ range ((where .Site.RegularPages "Type" "post")) }}
|
||||
var key = {{ .Date.Format "2006-01-02" }};
|
||||
var value = dataMap.get(key);
|
||||
var wordCount = {{ .WordCount }};
|
||||
var link = {{ .RelPermalink}};
|
||||
var title = {{ .Title }};
|
||||
|
||||
// multiple posts in same day
|
||||
if (value == null) {
|
||||
dataMap.set(key, [{wordCount, link, title}]);
|
||||
} else {
|
||||
value.push({wordCount, link, title});
|
||||
}
|
||||
{{- end -}}
|
||||
|
||||
var data = [];
|
||||
// sum up the word count
|
||||
for (const [key, value] of dataMap.entries()) {
|
||||
var sum = 0;
|
||||
for (const v of value) {
|
||||
sum += v.wordCount;
|
||||
}
|
||||
data.push([key, (sum / 1000).toFixed(1)]);
|
||||
}
|
||||
|
||||
var startDate = new Date();
|
||||
var year_Mill = startDate.setFullYear((startDate.getFullYear() - 1));
|
||||
var startDate = +new Date(year_Mill);
|
||||
var endDate = +new Date();
|
||||
|
||||
var dayTime = 3600 * 24 * 1000;
|
||||
startDate = echarts.format.formatTime('yyyy-MM-dd', startDate);
|
||||
endDate = echarts.format.formatTime('yyyy-MM-dd', endDate);
|
||||
|
||||
// change date range according to months we want to render
|
||||
function heatmap_width(months){
|
||||
var startDate = new Date();
|
||||
var mill = startDate.setMonth((startDate.getMonth() - months));
|
||||
var endDate = +new Date();
|
||||
startDate = +new Date(mill);
|
||||
|
||||
endDate = echarts.format.formatTime('yyyy-MM-dd', endDate);
|
||||
startDate = echarts.format.formatTime('yyyy-MM-dd', startDate);
|
||||
|
||||
var showmonth = [];
|
||||
showmonth.push([
|
||||
startDate,
|
||||
endDate
|
||||
]);
|
||||
return showmonth
|
||||
};
|
||||
|
||||
function getRangeArr() {
|
||||
const windowWidth = window.innerWidth;
|
||||
if (windowWidth >= 600) {
|
||||
return heatmap_width(12);
|
||||
} else if (windowWidth >= 400) {
|
||||
return heatmap_width(9);
|
||||
} else {
|
||||
return heatmap_width(6);
|
||||
}
|
||||
}
|
||||
|
||||
option = {
|
||||
title: {
|
||||
top: 0,
|
||||
left: 'center',
|
||||
text: ''
|
||||
},
|
||||
tooltip: {
|
||||
hideDelay: 1000,
|
||||
enterable: true,
|
||||
formatter: function (p) {
|
||||
const date = p.data[0];
|
||||
const posts = dataMap.get(date);
|
||||
var content = `${date}`;
|
||||
for (const [i, post] of posts.entries()) {
|
||||
content += "<br>";
|
||||
var link = post.link;
|
||||
var title = post.title;
|
||||
var wordCount = (post.wordCount / 1000).toFixed(1);
|
||||
content += `<a href="${link}" target="_blank">${title} | ${wordCount} k</a>`
|
||||
}
|
||||
return content;
|
||||
}
|
||||
},
|
||||
visualMap: {
|
||||
min: 0,
|
||||
max: 10,
|
||||
type: 'piecewise',
|
||||
orient: 'horizontal',
|
||||
left: 'center',
|
||||
top: 30,
|
||||
|
||||
inRange: {
|
||||
// [floor color, ceiling color]
|
||||
color: ['#7aa8744c', '#7AA874' ]
|
||||
},
|
||||
splitNumber: 4,
|
||||
text: ['千字', ''],
|
||||
showLabel: true,
|
||||
itemGap: 20,
|
||||
},
|
||||
calendar: {
|
||||
top: 80,
|
||||
left: 20,
|
||||
right: 4,
|
||||
cellSize: ['auto', 13],
|
||||
range: getRangeArr(),
|
||||
itemStyle: {
|
||||
color: '#F1F1F1',
|
||||
borderWidth: 1.5,
|
||||
borderColor: '#fff',
|
||||
},
|
||||
yearLabel: { show: false },
|
||||
// the splitline between months. set to transparent for now.
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: 'rgba(0, 0, 0, 0.0)',
|
||||
// shadowColor: 'rgba(0, 0, 0, 0.5)',
|
||||
// shadowBlur: 5,
|
||||
// width: 0.5,
|
||||
// type: 'dashed',
|
||||
}
|
||||
}
|
||||
},
|
||||
series: {
|
||||
type: 'heatmap',
|
||||
coordinateSystem: 'calendar',
|
||||
data: data,
|
||||
}
|
||||
};
|
||||
myChart.setOption(option);
|
||||
myChart.on('click', function(params) {
|
||||
if (params.componentType === 'series') {
|
||||
// open the first post on the day
|
||||
const post = dataMap.get(params.data[0])[0];
|
||||
const link = window.location.origin + post.link;
|
||||
window.open(link, '_blank').focus();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -1696,185 +1696,25 @@ input[type=submit] {
|
||||
}
|
||||
|
||||
/* 热力图css */
|
||||
:root {
|
||||
/* GitHub Light Color */
|
||||
--ht-main: #334155;
|
||||
--ht-day-bg: #ebedf0;
|
||||
--ht-tooltip: #24292f;
|
||||
--ht-tooltip-bg: #fff;
|
||||
--ht-lv-0: #ebedf0;
|
||||
--ht-lv-1: #9be9a8;
|
||||
--ht-lv-2: #40c463;
|
||||
--ht-lv-3: #30a14e;
|
||||
--ht-lv-4: #216e39;
|
||||
}
|
||||
|
||||
[data-theme="dark"] {
|
||||
/* GitHub Dark Dimmed Color */
|
||||
--ht-main: #94a3b8;
|
||||
--ht-day-bg: #161b22;
|
||||
--ht-tooltip: #24292f;
|
||||
--ht-tooltip-bg: #fff;
|
||||
--ht-lv-0: #161b22;
|
||||
--ht-lv-1: #0e4429;
|
||||
--ht-lv-2: #006d32;
|
||||
--ht-lv-3: #26a641;
|
||||
--ht-lv-4: #39d353;
|
||||
}
|
||||
|
||||
.heatmap_container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
font-size: 10px;
|
||||
line-height: 12px;
|
||||
color: var(--ht-main);
|
||||
}
|
||||
|
||||
.heatmap_content {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-end
|
||||
}
|
||||
|
||||
.heatmap_week {
|
||||
display: flex;
|
||||
margin-top: 0.25rem;
|
||||
margin-right: 0.25rem;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
align-items: flex-end;
|
||||
text-align: right
|
||||
}
|
||||
|
||||
.heatmap_main {
|
||||
display: flex;
|
||||
flex-direction: column
|
||||
}
|
||||
|
||||
.heatmap_month {
|
||||
display: flex;
|
||||
margin-top: 0.25rem;
|
||||
margin-right: 0.25rem;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
align-items: flex-end;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.heatmap {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 84px;
|
||||
}
|
||||
|
||||
.heatmap_footer {
|
||||
display: flex;
|
||||
margin-top: 0.5rem;
|
||||
align-items: center
|
||||
}
|
||||
|
||||
.heatmap_level {
|
||||
display: flex;
|
||||
gap: 2px;
|
||||
margin: 0 0.25rem;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
width: max-content;
|
||||
height: 10px
|
||||
}
|
||||
|
||||
.heatmap_level_item {
|
||||
display: block;
|
||||
border-radius: 0.125rem;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.heatmap_level_0 {
|
||||
background: var(--ht-lv-0);
|
||||
}
|
||||
|
||||
.heatmap_level_1 {
|
||||
background: var(--ht-lv-1);
|
||||
}
|
||||
|
||||
.heatmap_level_2 {
|
||||
background: var(--ht-lv-2);
|
||||
}
|
||||
|
||||
.heatmap_level_3 {
|
||||
background: var(--ht-lv-3);
|
||||
}
|
||||
|
||||
.heatmap_level_4 {
|
||||
background: var(--ht-lv-4);
|
||||
}
|
||||
|
||||
.heatmap_week {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.heatmap_day {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background-color: var(--ht-day-bg);
|
||||
margin: 1px;
|
||||
border-radius: 2px;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.heatmap_tooltip {
|
||||
.ch-plugin-calendar-label{
|
||||
position: absolute;
|
||||
bottom: 12px;
|
||||
left: 50%;
|
||||
width: max-content;
|
||||
color: var(--ht-tooltip);
|
||||
background-color: var(--ht-tooltip-bg);
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
padding: 8px;
|
||||
border-radius: 3px;
|
||||
white-space: pre-wrap;
|
||||
opacity: 1;
|
||||
transition: 0.3s;
|
||||
z-index: 1000;
|
||||
text-align: right;
|
||||
transform: translateX(-50%);
|
||||
top: 20px;
|
||||
left: 30px;
|
||||
gutter: 5px;
|
||||
}
|
||||
/** 周几初标签部分样式 **/
|
||||
.ch-plugin-calendar-label-text{
|
||||
fill: var(--gray-500) !important;
|
||||
font-size: 12px !important;
|
||||
transform: translate(6px, 0px);
|
||||
}
|
||||
|
||||
.heatmap_tooltip_count,
|
||||
.heatmap_tooltip_post {
|
||||
display: inline-block;
|
||||
/** 隐藏月份信息 **/
|
||||
.ch-domain-text{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.heatmap_tooltip_title,
|
||||
.heatmap_tooltip_date {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.heatmap_tooltip_date {
|
||||
margin: 0 0.25rem;
|
||||
}
|
||||
|
||||
.heatmap_day_level_0 {
|
||||
background-color: var(--ht-lv-0);
|
||||
}
|
||||
|
||||
.heatmap_day_level_1 {
|
||||
background-color: var(--ht-lv-1);
|
||||
}
|
||||
|
||||
.heatmap_day_level_2 {
|
||||
background-color: var(--ht-lv-2);
|
||||
}
|
||||
|
||||
.heatmap_day_level_3 {
|
||||
background-color: var(--ht-lv-3);
|
||||
}
|
||||
|
||||
.heatmap_day_level_4 {
|
||||
background-color: var(--ht-lv-4);
|
||||
}
|
||||
/* 修改小方块的背景填充颜色 */
|
||||
[data-theme=dark] .ch-subdomain-bg {
|
||||
fill: var(--gray-200);
|
||||
}
|
||||
@@ -61,7 +61,9 @@ function fetchCommentsAndCreateBarrager(path, options) {
|
||||
// 弹幕索引
|
||||
var index = 0;
|
||||
// 先执行一次
|
||||
createBarrager();
|
||||
if(total != 0){
|
||||
createBarrager()
|
||||
}
|
||||
|
||||
function createBarrager() {
|
||||
// 转换数据为弹幕所需的格式
|
||||
@@ -86,186 +88,3 @@ function fetchCommentsAndCreateBarrager(path, options) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 获取最近一年的文章数据
|
||||
{{ $pages := where .Site.RegularPages "Date" ">" (now.AddDate -1 0 0) }}
|
||||
{{ $pages := $pages.Reverse }}
|
||||
var blogInfo = {
|
||||
"pages": [
|
||||
{{ range $index, $element := $pages }}
|
||||
{
|
||||
"title": "{{ replace (replace .Title "《" "〈") "》" "〉" }}",
|
||||
"date": "{{ .Date.Format "2006-01-02" }}",
|
||||
"year": "{{ .Date.Format "2006" }}",
|
||||
"month": "{{ .Date.Format "01" }}",
|
||||
"day": "{{ .Date.Format "02" }}",
|
||||
"word_count": "{{ .WordCount }}"
|
||||
}{{ if ne (add $index 1) (len $pages) }},{{ end }}
|
||||
{{ end }}
|
||||
]
|
||||
};
|
||||
// console.log(blogInfo)
|
||||
|
||||
let currentDate = new Date();
|
||||
currentDate.setFullYear(currentDate.getFullYear() - 1);
|
||||
|
||||
let startDate;
|
||||
|
||||
let monthDiv = document.querySelector('.month');
|
||||
let monthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
||||
|
||||
if (window.innerWidth < 768) {
|
||||
numMonths = 6;
|
||||
} else {
|
||||
numMonths = 12;
|
||||
}
|
||||
|
||||
let startMonthIndex = (currentDate.getMonth() - (numMonths - 1) + 12) % 12;
|
||||
for (let i = startMonthIndex; i < startMonthIndex + numMonths; i++) {
|
||||
let monthSpan = document.createElement('span');
|
||||
let monthIndex = i % 12;
|
||||
monthSpan.textContent = monthNames[monthIndex];
|
||||
monthDiv.appendChild(monthSpan);
|
||||
}
|
||||
|
||||
function getStartDate() {
|
||||
const today = new Date();
|
||||
|
||||
if (window.innerWidth < 768) {
|
||||
numMonths = 6;
|
||||
} else {
|
||||
numMonths = 12;
|
||||
}
|
||||
|
||||
const startDate = new Date(today.getFullYear(), today.getMonth() - numMonths + 1, 1, today.getHours(), today.getMinutes(), today.getSeconds());
|
||||
|
||||
while (startDate.getDay() !== 1) {
|
||||
startDate.setDate(startDate.getDate() + 1);
|
||||
}
|
||||
|
||||
return startDate;
|
||||
}
|
||||
|
||||
function getWeekDay(date) {
|
||||
const day = date.getDay();
|
||||
return day === 0 ? 6 : day - 1;
|
||||
}
|
||||
|
||||
function createDay(date, title, count, post) {
|
||||
const day = document.createElement("div");
|
||||
|
||||
day.className = "heatmap_day";
|
||||
|
||||
day.setAttribute("data-title", title);
|
||||
day.setAttribute("data-count", count);
|
||||
day.setAttribute("data-post", post);
|
||||
day.setAttribute("data-date", date);
|
||||
|
||||
day.addEventListener("mouseenter", function () {
|
||||
const tooltip = document.createElement("div");
|
||||
tooltip.className = "heatmap_tooltip";
|
||||
|
||||
let tooltipContent = "";
|
||||
|
||||
if (post && parseInt(post, 10) !== 0) {
|
||||
tooltipContent += '<span class="heatmap_tooltip_post">' + '共 ' + post + ' 篇' + '</span>';
|
||||
}
|
||||
|
||||
if (count && parseInt(count, 10) !== 0) {
|
||||
tooltipContent += '<span class="heatmap_tooltip_count">' + ' ' + count + ' 字;' + '</span>';
|
||||
}
|
||||
|
||||
if (title && parseInt(title, 10) !== 0) {
|
||||
tooltipContent += '<span class="heatmap_tooltip_title">' + title + '</span>';
|
||||
}
|
||||
|
||||
if (date) {
|
||||
tooltipContent += '<span class="heatmap_tooltip_date">' + date + '</span>';
|
||||
}
|
||||
|
||||
tooltip.innerHTML = tooltipContent;
|
||||
day.appendChild(tooltip);
|
||||
});
|
||||
|
||||
day.addEventListener("mouseleave", function () {
|
||||
const tooltip = day.querySelector(".heatmap_tooltip");
|
||||
if (tooltip) {
|
||||
day.removeChild(tooltip);
|
||||
}
|
||||
});
|
||||
|
||||
if (count == 0 ) {
|
||||
day.classList.add("heatmap_day_level_0");
|
||||
} else if (count > 0 && count < 1000) {
|
||||
day.classList.add("heatmap_day_level_1");
|
||||
} else if (count >= 1000 && count < 2000) {
|
||||
day.classList.add("heatmap_day_level_2");
|
||||
} else if (count >= 2000 && count < 3000) {
|
||||
day.classList.add("heatmap_day_level_3");
|
||||
} else {
|
||||
day.classList.add("heatmap_day_level_4");
|
||||
}
|
||||
|
||||
return day;
|
||||
}
|
||||
|
||||
function createWeek() {
|
||||
const week = document.createElement('div');
|
||||
week.className = 'heatmap_week';
|
||||
return week;
|
||||
}
|
||||
|
||||
function createHeatmap() {
|
||||
const container = document.getElementById('heatmap');
|
||||
const startDate = getStartDate();
|
||||
const endDate = new Date();
|
||||
const weekDay = getWeekDay(startDate);
|
||||
|
||||
let currentWeek = createWeek();
|
||||
container.appendChild(currentWeek);
|
||||
|
||||
let currentDate = startDate;
|
||||
let i = 0;
|
||||
|
||||
while (currentDate <= endDate) {
|
||||
if (i % 7 === 0 && i !== 0) {
|
||||
currentWeek = createWeek();
|
||||
container.appendChild(currentWeek);
|
||||
}
|
||||
|
||||
const dateString = `${currentDate.getFullYear()}-${("0" + (currentDate.getMonth()+1)).slice(-2)}-${("0" + (currentDate.getDate())).slice(-2)}`;
|
||||
|
||||
const articleDataList = blogInfo.pages.filter(page => page.date === dateString);
|
||||
|
||||
if (articleDataList.length > 0) {
|
||||
const titles = articleDataList.map(data => data.title);
|
||||
const title = titles.map(t => `《${t}》`).join('<br />');
|
||||
|
||||
let count = 0;
|
||||
let post = articleDataList.length;
|
||||
|
||||
articleDataList.forEach(data => {
|
||||
count += parseInt(data.word_count, 10);
|
||||
});
|
||||
|
||||
const formattedDate = formatDate(currentDate);
|
||||
const day = createDay(formattedDate, title, count, post);
|
||||
currentWeek.appendChild(day);
|
||||
} else {
|
||||
const formattedDate = formatDate(currentDate);
|
||||
const day = createDay(formattedDate, '', '0', '0');
|
||||
currentWeek.appendChild(day);
|
||||
}
|
||||
|
||||
i++;
|
||||
currentDate.setDate(currentDate.getDate() + 1);
|
||||
}
|
||||
}
|
||||
|
||||
function formatDate(date) {
|
||||
const options = { month: 'short', day: 'numeric', year: 'numeric' };
|
||||
return date.toLocaleDateString('en-US', options);
|
||||
}
|
||||
|
||||
createHeatmap();
|
||||
@@ -182,11 +182,5 @@
|
||||
scrollImg: true
|
||||
});
|
||||
});
|
||||
console.log(currentPath)
|
||||
console.log(currentPath.includes("/post/"))
|
||||
console.log(currentPath.includes("/says/"))
|
||||
// pjax完成后加载 waline
|
||||
if (currentPath.includes("/post/") || currentPath.includes("/says/")) {
|
||||
initWaline();
|
||||
}
|
||||
|
||||
});
|
||||
Reference in new issue
Block a user