优化关于我的问候,数据统计

This commit is contained in:
1152958806@qq.com 2023-09-20 20:27:58 +08:00
parent 5e23b49423
commit de9c963100
4 changed files with 139 additions and 137 deletions

View File

@ -39,8 +39,6 @@
<th:block th:replace="~{modules/about-widgets :: about-widgets(${theme.config.about.widgets})}"></th:block> <th:block th:replace="~{modules/about-widgets :: about-widgets(${theme.config.about.widgets})}"></th:block>
</div>
<div class="author-content"> <div class="author-content">
<div class="create-site-post author-content-item single" th:utext="${theme.config.about.xjlc}"> <div class="create-site-post author-content-item single" th:utext="${theme.config.about.xjlc}">
</div> </div>
@ -115,14 +113,9 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- 评论模块 --> </div>
</main> </main>
<!-- 底部 --> <!-- 底部 -->

View File

@ -170,7 +170,7 @@
<link rel="stylesheet" href="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/fancybox/3.5.7/jquery.fancybox.min.css"> <link rel="stylesheet" href="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/fancybox/3.5.7/jquery.fancybox.min.css">
<!-- 关于统计--> <!-- 关于统计-->
<script th:src="${assets_link + '/libs/countup/countup.js'}"></script> <script th:if="${#strings.contains(theme.config.about.widgets,'statistics-map')}" th:src="${assets_link + '/libs/countup/countup.js'}"></script>
<!-- 小板报 --> <!-- 小板报 -->
<th:block th:if="${not #strings.isEmpty(theme.config.sidebar.welcome.key)}"> <th:block th:if="${not #strings.isEmpty(theme.config.sidebar.welcome.key)}">

View File

@ -1,6 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"> <html lang="en" xmlns:th="http://www.thymeleaf.org">
<!-- 我的介绍&我的想法 --> <!-- hello -->
<div class="hello-about" th:fragment="hello-about"> <div class="hello-about" th:fragment="hello-about">
<div class="cursor" style="translate: none; rotate: none; scale: none; transform: translate(721px,180px);"></div> <div class="cursor" style="translate: none; rotate: none; scale: none; transform: translate(721px,180px);"></div>
<div class="shapes"> <div class="shapes">
@ -17,7 +17,6 @@
<div class="content"> <div class="content">
<h1>[[${theme.config.about.helloAbout}]]</h1> <h1>[[${theme.config.about.helloAbout}]]</h1>
</div> </div>
<script src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/gsap/3.9.1/gsap.min.js"></script>
<style> <style>
.hello-about { .hello-about {
margin: 20px auto 0; margin: 20px auto 0;
@ -133,8 +132,8 @@
background: #2128bd; background: #2128bd;
} }
</style> </style>
<script> <script defer>
(() => { function initHelloAbout() {
const helloAboutEl = document.querySelector(".hello-about"); const helloAboutEl = document.querySelector(".hello-about");
helloAboutEl.addEventListener("mousemove", evt => { helloAboutEl.addEventListener("mousemove", evt => {
const mouseX = evt.offsetX; const mouseX = evt.offsetX;
@ -150,7 +149,12 @@
stagger: -0.1, stagger: -0.1,
}); });
}); });
})(); }
if (typeof gsap === "object") {
initHelloAbout()
} else {
getScript("https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/gsap/3.9.1/gsap.min.js").then(initHelloAbout);
}
</script> </script>
</div> </div>

View File

@ -97,8 +97,10 @@
} }
} }
</style> </style>
<script> <!-- 关于统计-->
<script defer>
// 链接替换即可,不需要后面的参数 // 链接替换即可,不需要后面的参数
function initAboutPage() {
fetch("https://v6-widget.51.la/v6/[[${theme.config.about.LingQueMonitorID}]]/quote.js") fetch("https://v6-widget.51.la/v6/[[${theme.config.about.LingQueMonitorID}]]/quote.js")
.then(res => res.text()) .then(res => res.text())
.then(data => { .then(data => {
@ -163,6 +165,9 @@
} }
statisticUP() statisticUP()
}); });
}
initAboutPage();
</script> </script>
</div> </div>