This commit is contained in:
Ilya 2020-09-13 15:20:49 +03:00
parent abf7bbfded
commit 41642d0ddb
5 changed files with 0 additions and 102 deletions

View File

@ -1,20 +0,0 @@
{
"Links": {
"login": "Войти",
"logout": "Выйти",
"cp": "Панель управления"
},
"Titles":{
"auth": "Авторизация"
},
"Words": {
"user": "Пользователь",
"password": "Пароль",
"Difficulty": {
"PEACEFUL": "Мирная",
"EASY": "Простая",
"NORMAL": "Нормальная",
"HARD": "Сложная"
}
}
}

View File

@ -1,33 +0,0 @@
function onload() {
updatePageInfo();
}
function updatePageInfo() {
let header = document.getElementById("header");
let stat = document.getElementById("stat");
header.innerText = "Идёт загрузка...";
stat.innerHTML = "";
var xhr = new XMLHttpRequest();
xhr.open('GET', '/json/mainData.json', true);
xhr.setRequestHeader("Content-Type", "text/plain;charset=UTF-8");
xhr.send();
xhr.onreadystatechange = function () {
if (xhr.readyState !== 4) return;
let data = JSON.parse(xhr.responseText);
header.innerText = "Мод запущен на сервере";
appendLine(stat, ["Версия игры", data.MineV]);
appendLine(stat, ["Игроки", data.Players]);
}
}
function appendLine(table,array) {
let tr = document.createElement("tr");
for (let arrayKey in array) {
let td = document.createElement("td");
td.innerText = array[arrayKey];
tr.appendChild(td);
}
table.appendChild(tr);
}
document.addEventListener("DOMContentLoaded", onload);

View File

@ -1,30 +0,0 @@
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>WebInfo</title>
<style>
.header {
text-align: center;
font-size: 200%;
}
#stat {
margin: 0 auto;
}
.authLink {
float: right;
}
</style>
<script src="/js/index.js"></script>
</head>
<body>
<div class="header" id="header">
Идёт загрузка...
</div>
<main>
<replace id="1"/>
<table id="stat">
</table>
</main>
</body>
</html>

View File

@ -1,19 +0,0 @@
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title><replace id="1"/></title>
<style>
form {
text-align: center;
}
</style>
</head>
<body>
<form method="post" action="/auth/worker/">
<label for="user"><replace id="2"/>: <input name="user" id="user" type="text"></label><br>
<label for="password"><replace id="3"/>: <input name="password" id="password" type="password"></label><br>
<input type="submit">
</form>
</body>
</html>