diff --git a/server_config.json b/server_config.json index b7285a3..a5b08f7 100644 --- a/server_config.json +++ b/server_config.json @@ -3,7 +3,7 @@ "port": 15002, "server_list":["76", "174", "233", "222"], "note_dict":{ - "174": "test note" + "76": "目前该服务器gpu的信息获取有问题,还不清楚是什么情况。大概三月份之后有空再修一下。" }, "api_name": "api" -} \ No newline at end of file +} diff --git a/web/css/style_1.css b/web/css/style_1.css index 4a37211..0b90a43 100644 --- a/web/css/style_1.css +++ b/web/css/style_1.css @@ -21,6 +21,16 @@ margin: 12px; } +.note-info { + border-style: solid; + border-width: 4px; + border-color: #a10000; + border-radius: 8px; + padding: 6px 10px; + margin-top: 4px; + margin-bottom: 6px; +} + .server-name { background-color: rgb(0, 0, 0); color: white; diff --git a/web/js/script.js b/web/js/script.js index a5e76d5..0a94370 100644 --- a/web/js/script.js +++ b/web/js/script.js @@ -113,6 +113,16 @@ function displayServerData(data){ serverName.textContent = serverTitle + " - Not update -"; } + // 添加公告 + if ('note' in serverData && serverData['note'] != ''){ + let noteInfo = document.createElement('div'); + noteInfo.className = 'note-info'; + + noteInfo.innerHTML = '