mirror of
http://junepve.top:3000/chicrobot/mainPage.git
synced 2026-10-29 20:51:29 +08:00
添加聊天跳转,采用本地font-aweesome
This commit is contained in:
1 parent
d31d35f81a
commit
5f5f730c98
2 files changed
+10
-5
No files matched your search
+3
-3
@@ -4,9 +4,9 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>JUNE PVE 集成工作台</title>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> -->
|
||||
<link rel="icon" type="image/png" href="favicon.png">
|
||||
<!-- <link rel="stylesheet" href="all.min.css"> -->
|
||||
<link rel="stylesheet" href="font-awesome/6.4.0/css/all.min.css">
|
||||
<script src="chart.js"></script>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
@@ -278,7 +278,7 @@
|
||||
<div class="lab-icon"><i class="fas fa-comment-dots"></i></div>
|
||||
<h3>实时通信</h3>
|
||||
<p>基于WebSocket的聊天系统实现</p>
|
||||
<a href="#chat-app" class="lab-link" target="_blank">进入实验室 <i class="fas fa-flask"></i></a>
|
||||
<a id="chatLink" href="#" class="lab-link" target="_blank">进入实验室 <i class="fas fa-flask"></i></a>
|
||||
</div>
|
||||
<!-- 其他实验室 -->
|
||||
</div>
|
||||
|
||||
@@ -46,17 +46,18 @@ updateActiveNavLink();
|
||||
window.addEventListener('load', function() {
|
||||
// 获取当前页面的域名或IP
|
||||
const currentHost = window.location.hostname;
|
||||
// 构建跳转URL (保持相同的协议和域名/IP,只修改端口)
|
||||
// 构建跳转URL (保持相同的协议和域名/IP)
|
||||
const portainerUrl = `${window.location.protocol}//${currentHost}:9000`;
|
||||
const giteaUrl = `${window.location.protocol}//${currentHost}:3000`;
|
||||
const grafanaUrl = `${window.location.protocol}//${currentHost}:3001`;
|
||||
const jenkinsUrl = `${window.location.protocol}//${currentHost}:9095`;
|
||||
const chatUrl = `${window.location.protocol}//${currentHost}/baseTalk`;
|
||||
// 设置链接的href属性和target属性,确保在新标签中打开
|
||||
const portainerLink = document.getElementById('portainerLink');
|
||||
const giteaLink = document.getElementById('giteaLink');
|
||||
const grafanaLink = document.getElementById('grafanaLink');
|
||||
const jenkinsLink = document.getElementById('jenkinsLink');
|
||||
|
||||
const chatLink = document.getElementById('chatLink');
|
||||
if (portainerLink) {
|
||||
portainerLink.href = portainerUrl;
|
||||
portainerLink.target = '_blank';
|
||||
@@ -73,6 +74,10 @@ window.addEventListener('load', function() {
|
||||
jenkinsLink.href = jenkinsUrl;
|
||||
jenkinsLink.target = '_blank';
|
||||
}
|
||||
if (chatLink) {
|
||||
chatLink.href = chatUrl;
|
||||
chatLink.target = '_blank';
|
||||
}
|
||||
});
|
||||
|
||||
// 粒子背景效果
|
||||
|
||||
Reference in new issue
Block a user