未来界面:玻璃拟态与全息效果
diff --git a/script.js b/script.js
index 5f3f2b2..3cbf4d2 100644
--- a/script.js
+++ b/script.js
@@ -53,6 +53,9 @@ window.addEventListener('load', function() {
const jenkinsUrl = `${window.location.protocol}//${currentHost}:9095`;
const chatUrl = `${window.location.protocol}//${currentHost}/baseTalk`;
const cloudreveUrl = `${window.location.protocol}//${currentHost}:5212`;
+ // 构建博客文章URL,指向8090端口
+ const blogBaseUrl = `${window.location.protocol}//${currentHost}:8090`;
+
// 设置链接的href属性和target属性,确保在新标签中打开
const portainerLink = document.getElementById('portainerLink');
const giteaLink = document.getElementById('giteaLink');
@@ -60,6 +63,7 @@ window.addEventListener('load', function() {
const jenkinsLink = document.getElementById('jenkinsLink');
const chatLink = document.getElementById('chatLink');
const cloudreveLink = document.getElementById('cloudreveLink');
+
if (portainerLink) {
portainerLink.href = portainerUrl;
portainerLink.target = '_blank';
@@ -84,6 +88,20 @@ window.addEventListener('load', function() {
cloudreveLink.href = cloudreveUrl;
cloudreveLink.target = '_blank';
}
+
+ // 处理博客文章链接
+ const blogPosts = document.querySelectorAll('.thought-card');
+ blogPosts.forEach((post, index) => {
+ // 移除原有的onclick属性
+ post.removeAttribute('onclick');
+ // 添加新的点击事件监听器
+ post.addEventListener('click', function() {
+ // const postPath = `/blog/post${index + 1}`;
+ // const postUrl = `${blogBaseUrl}${postPath}`;
+ const postUrl = `${blogBaseUrl}`;
+ window.open(postUrl, '_blank');
+ });
+ });
});
// 粒子背景效果