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ta charset="UTF-8">
|
| 5 |
+
<title>SDM Servers</title>
|
| 6 |
+
<style>
|
| 7 |
+
html, body {
|
| 8 |
+
height: 100%;
|
| 9 |
+
margin: 0;
|
| 10 |
+
}
|
| 11 |
+
body {
|
| 12 |
+
background: #e8e8e8 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="4" height="4"><rect width="4" height="4" fill="%23e8e8e8"/><rect width="1" height="1" fill="%23d0d0d0"/></svg>') repeat;
|
| 13 |
+
color: #333333;
|
| 14 |
+
font-family: Verdana, Arial, sans-serif;
|
| 15 |
+
font-size: 13px;
|
| 16 |
+
display: flex;
|
| 17 |
+
flex-direction: column;
|
| 18 |
+
justify-content: center;
|
| 19 |
+
align-items: center;
|
| 20 |
+
min-height: 100vh;
|
| 21 |
+
padding: 20px;
|
| 22 |
+
box-sizing: border-box;
|
| 23 |
+
user-select: none;
|
| 24 |
+
-webkit-user-select: none;
|
| 25 |
+
-moz-user-select: none;
|
| 26 |
+
-ms-user-select: none;
|
| 27 |
+
}
|
| 28 |
+
.sdm-title {
|
| 29 |
+
font-family: Verdana, Arial, sans-serif;
|
| 30 |
+
font-size: 72px;
|
| 31 |
+
font-weight: bold;
|
| 32 |
+
letter-spacing: 8px;
|
| 33 |
+
margin-bottom: 25px;
|
| 34 |
+
text-align: center;
|
| 35 |
+
line-height: 1;
|
| 36 |
+
}
|
| 37 |
+
.sdm-title span {
|
| 38 |
+
display: inline-block;
|
| 39 |
+
background: linear-gradient(to bottom, #6a9edd 0%, #2a5a99 100%);
|
| 40 |
+
-webkit-background-clip: text;
|
| 41 |
+
-webkit-text-fill-color: transparent;
|
| 42 |
+
background-clip: text;
|
| 43 |
+
text-shadow: 2px 2px 0 rgba(0,0,0,0.1);
|
| 44 |
+
animation: float 2.5s ease-in-out infinite;
|
| 45 |
+
}
|
| 46 |
+
.sdm-title span:nth-child(1) { animation-delay: 0s; }
|
| 47 |
+
.sdm-title span:nth-child(2) { animation-delay: 0.3s; }
|
| 48 |
+
.sdm-title span:nth-child(3) { animation-delay: 0.6s; }
|
| 49 |
+
|
| 50 |
+
@keyframes float {
|
| 51 |
+
0%, 100% {
|
| 52 |
+
transform: translateY(0) rotate(0deg);
|
| 53 |
+
}
|
| 54 |
+
25% {
|
| 55 |
+
transform: translateY(-12px) rotate(-3deg);
|
| 56 |
+
}
|
| 57 |
+
50% {
|
| 58 |
+
transform: translateY(-20px) rotate(0deg);
|
| 59 |
+
}
|
| 60 |
+
75% {
|
| 61 |
+
transform: translateY(-12px) rotate(3deg);
|
| 62 |
+
}
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
.container {
|
| 66 |
+
width: 720px;
|
| 67 |
+
max-width: 100%;
|
| 68 |
+
background-color: #ffffff;
|
| 69 |
+
border: 1px solid #b0b0b0;
|
| 70 |
+
box-shadow: 0 0 10px rgba(0,0,0,0.15);
|
| 71 |
+
border-radius: 4px;
|
| 72 |
+
overflow: hidden;
|
| 73 |
+
}
|
| 74 |
+
.header {
|
| 75 |
+
background: linear-gradient(to bottom, #4a7ebb 0%, #2a5a99 100%);
|
| 76 |
+
border-bottom: 3px solid #1e4270;
|
| 77 |
+
padding: 18px 20px;
|
| 78 |
+
text-align: left;
|
| 79 |
+
}
|
| 80 |
+
.header h1 {
|
| 81 |
+
font-family: Verdana, Arial, sans-serif;
|
| 82 |
+
font-size: 26px;
|
| 83 |
+
color: #ffffff;
|
| 84 |
+
margin: 0;
|
| 85 |
+
text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
|
| 86 |
+
letter-spacing: 0.5px;
|
| 87 |
+
}
|
| 88 |
+
.header .subtitle {
|
| 89 |
+
color: #cfe0f5;
|
| 90 |
+
font-size: 12px;
|
| 91 |
+
margin-top: 4px;
|
| 92 |
+
}
|
| 93 |
+
.content {
|
| 94 |
+
padding: 20px;
|
| 95 |
+
}
|
| 96 |
+
.intro {
|
| 97 |
+
background-color: #f5f8fc;
|
| 98 |
+
border: 1px solid #cfdceb;
|
| 99 |
+
border-left: 4px solid #4a7ebb;
|
| 100 |
+
padding: 10px 14px;
|
| 101 |
+
margin-bottom: 20px;
|
| 102 |
+
font-size: 13px;
|
| 103 |
+
color: #444;
|
| 104 |
+
display: flex;
|
| 105 |
+
justify-content: space-between;
|
| 106 |
+
align-items: center;
|
| 107 |
+
gap: 10px;
|
| 108 |
+
}
|
| 109 |
+
.refresh-btn {
|
| 110 |
+
background: linear-gradient(to bottom, #f0f0f0 0%, #d8d8d8 100%);
|
| 111 |
+
border: 1px solid #a0a0a0;
|
| 112 |
+
border-radius: 3px;
|
| 113 |
+
padding: 5px 12px;
|
| 114 |
+
font-size: 11px;
|
| 115 |
+
font-weight: bold;
|
| 116 |
+
color: #333;
|
| 117 |
+
cursor: pointer;
|
| 118 |
+
font-family: Verdana, Arial, sans-serif;
|
| 119 |
+
}
|
| 120 |
+
.refresh-btn:hover {
|
| 121 |
+
background: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 100%);
|
| 122 |
+
}
|
| 123 |
+
.refresh-btn:active {
|
| 124 |
+
background: linear-gradient(to bottom, #c8c8c8 0%, #e0e0e0 100%);
|
| 125 |
+
}
|
| 126 |
+
table {
|
| 127 |
+
width: 100%;
|
| 128 |
+
border-collapse: collapse;
|
| 129 |
+
margin-top: 10px;
|
| 130 |
+
}
|
| 131 |
+
td {
|
| 132 |
+
border: 1px solid #d0d0d0;
|
| 133 |
+
background-color: #fafafa;
|
| 134 |
+
padding: 12px 14px;
|
| 135 |
+
vertical-align: middle;
|
| 136 |
+
}
|
| 137 |
+
tr:nth-child(even) td {
|
| 138 |
+
background-color: #f0f4f8;
|
| 139 |
+
}
|
| 140 |
+
a {
|
| 141 |
+
color: #2a5a99;
|
| 142 |
+
text-decoration: none;
|
| 143 |
+
font-weight: bold;
|
| 144 |
+
font-size: 14px;
|
| 145 |
+
}
|
| 146 |
+
a:hover {
|
| 147 |
+
color: #d04000;
|
| 148 |
+
text-decoration: underline;
|
| 149 |
+
}
|
| 150 |
+
.ram {
|
| 151 |
+
display: inline-block;
|
| 152 |
+
background-color: #e8f5e9;
|
| 153 |
+
color: #2e7d32;
|
| 154 |
+
border: 1px solid #a5d6a7;
|
| 155 |
+
border-radius: 3px;
|
| 156 |
+
padding: 2px 7px;
|
| 157 |
+
font-size: 11px;
|
| 158 |
+
font-weight: bold;
|
| 159 |
+
margin-left: 8px;
|
| 160 |
+
}
|
| 161 |
+
.status {
|
| 162 |
+
display: inline-block;
|
| 163 |
+
border-radius: 3px;
|
| 164 |
+
padding: 2px 7px;
|
| 165 |
+
font-size: 11px;
|
| 166 |
+
font-weight: bold;
|
| 167 |
+
margin-left: 5px;
|
| 168 |
+
transition: background-color 0.3s, color 0.3s;
|
| 169 |
+
cursor: help;
|
| 170 |
+
}
|
| 171 |
+
.status.online {
|
| 172 |
+
background-color: #e8f5e9;
|
| 173 |
+
color: #2e7d32;
|
| 174 |
+
border: 1px solid #a5d6a7;
|
| 175 |
+
}
|
| 176 |
+
.status.online::before {
|
| 177 |
+
content: "● ";
|
| 178 |
+
color: #4caf50;
|
| 179 |
+
}
|
| 180 |
+
.status.offline {
|
| 181 |
+
background-color: #fdecea;
|
| 182 |
+
color: #c62828;
|
| 183 |
+
border: 1px solid #ef9a9a;
|
| 184 |
+
}
|
| 185 |
+
.status.offline::before {
|
| 186 |
+
content: "● ";
|
| 187 |
+
color: #e53935;
|
| 188 |
+
}
|
| 189 |
+
.status.checking {
|
| 190 |
+
background-color: #fff8e1;
|
| 191 |
+
color: #f57f17;
|
| 192 |
+
border: 1px solid #ffe082;
|
| 193 |
+
}
|
| 194 |
+
.status.checking::before {
|
| 195 |
+
content: "◌ ";
|
| 196 |
+
color: #fbc02d;
|
| 197 |
+
}
|
| 198 |
+
.status.host-error {
|
| 199 |
+
background-color: #fdecea;
|
| 200 |
+
color: #c62828;
|
| 201 |
+
border: 1px solid #ef9a9a;
|
| 202 |
+
}
|
| 203 |
+
.status.host-error::before {
|
| 204 |
+
content: "● ";
|
| 205 |
+
color: #e53935;
|
| 206 |
+
}
|
| 207 |
+
.status.cf-error {
|
| 208 |
+
background-color: #fff8e1;
|
| 209 |
+
color: #f57f17;
|
| 210 |
+
border: 1px solid #ffe082;
|
| 211 |
+
}
|
| 212 |
+
.status.cf-error::before {
|
| 213 |
+
content: "● ";
|
| 214 |
+
color: #fbc02d;
|
| 215 |
+
}
|
| 216 |
+
.url {
|
| 217 |
+
display: block;
|
| 218 |
+
color: #888;
|
| 219 |
+
font-size: 11px;
|
| 220 |
+
font-weight: normal;
|
| 221 |
+
margin-top: 3px;
|
| 222 |
+
font-family: "Courier New", monospace;
|
| 223 |
+
}
|
| 224 |
+
.footer {
|
| 225 |
+
background-color: #f0f0f0;
|
| 226 |
+
border-top: 1px solid #d0d0d0;
|
| 227 |
+
text-align: center;
|
| 228 |
+
font-size: 11px;
|
| 229 |
+
color: #777;
|
| 230 |
+
padding: 12px;
|
| 231 |
+
}
|
| 232 |
+
.lang-btn {
|
| 233 |
+
position: fixed;
|
| 234 |
+
bottom: 20px;
|
| 235 |
+
right: 20px;
|
| 236 |
+
background: linear-gradient(to bottom, #4a7ebb 0%, #2a5a99 100%);
|
| 237 |
+
border: 1px solid #1e4270;
|
| 238 |
+
border-radius: 4px;
|
| 239 |
+
padding: 8px 14px;
|
| 240 |
+
font-size: 12px;
|
| 241 |
+
font-weight: bold;
|
| 242 |
+
color: #ffffff;
|
| 243 |
+
cursor: pointer;
|
| 244 |
+
font-family: Verdana, Arial, sans-serif;
|
| 245 |
+
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
|
| 246 |
+
transition: transform 0.15s;
|
| 247 |
+
}
|
| 248 |
+
.lang-btn:hover {
|
| 249 |
+
transform: scale(1.05);
|
| 250 |
+
}
|
| 251 |
+
.lang-btn:active {
|
| 252 |
+
transform: scale(0.97);
|
| 253 |
+
}
|
| 254 |
+
</style>
|
| 255 |
+
</head>
|
| 256 |
+
<body>
|
| 257 |
+
|
| 258 |
+
<div class="sdm-title">
|
| 259 |
+
<span>S</span><span>D</span><span>M</span>
|
| 260 |
+
</div>
|
| 261 |
+
|
| 262 |
+
<div class="container">
|
| 263 |
+
<div class="header">
|
| 264 |
+
<h1>SDM Servers</h1>
|
| 265 |
+
<div class="subtitle" data-i18n="subtitle">Список доступных серверов</div>
|
| 266 |
+
</div>
|
| 267 |
+
|
| 268 |
+
<div class="content">
|
| 269 |
+
<div class="intro">
|
| 270 |
+
<span data-i18n="intro">Каждому серверу выделено <b>512 MB RAM</b>. Статус обновляется автоматически.</span>
|
| 271 |
+
<button class="refresh-btn" onclick="checkAll()" data-i18n="refresh">Проверить</button>
|
| 272 |
+
</div>
|
| 273 |
+
|
| 274 |
+
<table>
|
| 275 |
+
<tr>
|
| 276 |
+
<td>
|
| 277 |
+
<a href="https://sldchat.fastapicloud.dev/" target="_blank">SLD Chat — FastAPI Cloud</a>
|
| 278 |
+
<span class="ram" data-i18n="ram512">512 MB RAM</span>
|
| 279 |
+
<span class="status checking" data-url="https://sldchat.fastapicloud.dev/" id="s1">Checking</span>
|
| 280 |
+
<span class="url">https://sldchat.fastapicloud.dev/</span>
|
| 281 |
+
</td>
|
| 282 |
+
</tr>
|
| 283 |
+
<tr>
|
| 284 |
+
<td>
|
| 285 |
+
<a href="https://sldchat.onrunxbuild.com/" target="_blank">SLD Chat — OnRunX Build</a>
|
| 286 |
+
<span class="ram" data-i18n="ram512">512 MB RAM</span>
|
| 287 |
+
<span class="status checking" data-url="https://sldchat.onrunxbuild.com/" id="s2">Checking</span>
|
| 288 |
+
<span class="url">https://sldchat.onrunxbuild.com/</span>
|
| 289 |
+
</td>
|
| 290 |
+
</tr>
|
| 291 |
+
<tr>
|
| 292 |
+
<td>
|
| 293 |
+
<a href="https://sldshrs-backery.fastapicloud.dev/" target="_blank">SLD Shrs Backery — FastAPI Cloud</a>
|
| 294 |
+
<span class="ram" data-i18n="ram512">512 MB RAM</span>
|
| 295 |
+
<span class="status checking" data-url="https://sldshrs-backery.fastapicloud.dev/" id="s3">Checking</span>
|
| 296 |
+
<span class="url">https://sldshrs-backery.fastapicloud.dev/</span>
|
| 297 |
+
</td>
|
| 298 |
+
</tr>
|
| 299 |
+
<tr>
|
| 300 |
+
<td>
|
| 301 |
+
<a href="https://e1l0e97mjeyu.ramnaymcloud.com/" target="_blank">SLD Chat — Ramnaym Cloud</a>
|
| 302 |
+
<span class="ram" data-i18n="ram100">100 MB RAM</span>
|
| 303 |
+
<span class="status checking" data-url="https://e1l0e97mjeyu.ramnaymcloud.com/" id="s4">Checking</span>
|
| 304 |
+
<span class="url">https://e1l0e97mjeyu.ramnaymcloud.com/</span>
|
| 305 |
+
</td>
|
| 306 |
+
</tr>
|
| 307 |
+
</table>
|
| 308 |
+
</div>
|
| 309 |
+
|
| 310 |
+
<div class="footer">
|
| 311 |
+
© SDM Servers
|
| 312 |
+
</div>
|
| 313 |
+
</div>
|
| 314 |
+
|
| 315 |
+
<button class="lang-btn" id="langBtn" onclick="toggleLang()">EN</button>
|
| 316 |
+
|
| 317 |
+
<script>
|
| 318 |
+
const translations = {
|
| 319 |
+
ru: {
|
| 320 |
+
subtitle: 'Список доступных серверов',
|
| 321 |
+
intro: 'Каждому серверу выделено <b>512 MB RAM</b>. Статус обновляется автоматически.',
|
| 322 |
+
refresh: 'Проверить',
|
| 323 |
+
ram512: '512 MB RAM',
|
| 324 |
+
ram100: '100 MB RAM',
|
| 325 |
+
checking: 'Проверка',
|
| 326 |
+
online: 'Онлайн',
|
| 327 |
+
offline: 'Оффлайн',
|
| 328 |
+
cfError: 'Cloudflare: 526',
|
| 329 |
+
hostError: 'Ошибка хостинга ',
|
| 330 |
+
titleOnline: 'Сервер доступен',
|
| 331 |
+
titleOffline: 'Сервер недоступен',
|
| 332 |
+
titleCfError: 'Cloudflare не может подключиться к хостингу (хостинг лежит)',
|
| 333 |
+
titleHostError: 'Хостинг вернул ошибку сервера',
|
| 334 |
+
btn: 'EN'
|
| 335 |
+
},
|
| 336 |
+
en: {
|
| 337 |
+
subtitle: 'List of available servers',
|
| 338 |
+
intro: 'Each server is allocated <b>512 MB RAM</b>. Status updates automatically.',
|
| 339 |
+
refresh: 'Check',
|
| 340 |
+
ram512: '512 MB RAM',
|
| 341 |
+
ram100: '100 MB RAM',
|
| 342 |
+
checking: 'Checking',
|
| 343 |
+
online: 'Online',
|
| 344 |
+
offline: 'Offline',
|
| 345 |
+
cfError: 'Cloudflare: 526',
|
| 346 |
+
hostError: 'Host Error ',
|
| 347 |
+
titleOnline: 'Server is available',
|
| 348 |
+
titleOffline: 'Server is unavailable',
|
| 349 |
+
titleCfError: 'Cloudflare cannot reach the host (host is down)',
|
| 350 |
+
titleHostError: 'Host returned a server error',
|
| 351 |
+
btn: 'RU'
|
| 352 |
+
}
|
| 353 |
+
};
|
| 354 |
+
|
| 355 |
+
let currentLang = 'ru';
|
| 356 |
+
|
| 357 |
+
function applyLang() {
|
| 358 |
+
const t = translations[currentLang];
|
| 359 |
+
|
| 360 |
+
document.querySelectorAll('[data-i18n]').forEach(el => {
|
| 361 |
+
const key = el.dataset.i18n;
|
| 362 |
+
if (t[key] !== undefined) {
|
| 363 |
+
el.innerHTML = t[key];
|
| 364 |
+
}
|
| 365 |
+
});
|
| 366 |
+
|
| 367 |
+
document.querySelectorAll('.status').forEach(el => {
|
| 368 |
+
const state = el.dataset.state;
|
| 369 |
+
if (!state) return;
|
| 370 |
+
if (state === 'online') el.textContent = t.online;
|
| 371 |
+
else if (state === 'offline') el.textContent = t.offline;
|
| 372 |
+
else if (state === 'checking') el.textContent = t.checking;
|
| 373 |
+
else if (state === 'cf-error') el.textContent = t.cfError;
|
| 374 |
+
else if (state === 'host-error') el.textContent = t.hostError + (el.dataset.code || '');
|
| 375 |
+
});
|
| 376 |
+
|
| 377 |
+
document.querySelectorAll('.status').forEach(el => {
|
| 378 |
+
const state = el.dataset.state;
|
| 379 |
+
if (!state) return;
|
| 380 |
+
if (state === 'online') el.title = t.titleOnline;
|
| 381 |
+
else if (state === 'offline') el.title = t.titleOffline;
|
| 382 |
+
else if (state === 'cf-error') el.title = t.titleCfError;
|
| 383 |
+
else if (state === 'host-error') el.title = t.titleHostError;
|
| 384 |
+
});
|
| 385 |
+
|
| 386 |
+
document.getElementById('langBtn').textContent = t.btn;
|
| 387 |
+
document.documentElement.lang = currentLang;
|
| 388 |
+
}
|
| 389 |
+
|
| 390 |
+
function toggleLang() {
|
| 391 |
+
currentLang = currentLang === 'ru' ? 'en' : 'ru';
|
| 392 |
+
applyLang();
|
| 393 |
+
}
|
| 394 |
+
|
| 395 |
+
async function checkServer(url) {
|
| 396 |
+
const controller = new AbortController();
|
| 397 |
+
const timeoutId = setTimeout(() => controller.abort(), 8000);
|
| 398 |
+
|
| 399 |
+
try {
|
| 400 |
+
const response = await fetch(url, {
|
| 401 |
+
method: 'GET',
|
| 402 |
+
mode: 'cors',
|
| 403 |
+
cache: 'no-store',
|
| 404 |
+
signal: controller.signal
|
| 405 |
+
});
|
| 406 |
+
clearTimeout(timeoutId);
|
| 407 |
+
|
| 408 |
+
if (response.status === 526) {
|
| 409 |
+
return { state: 'cf-error', code: '' };
|
| 410 |
+
}
|
| 411 |
+
if (response.status >= 500) {
|
| 412 |
+
return { state: 'host-error', code: String(response.status) };
|
| 413 |
+
}
|
| 414 |
+
return { state: 'online', code: '' };
|
| 415 |
+
} catch (err) {
|
| 416 |
+
clearTimeout(timeoutId);
|
| 417 |
+
|
| 418 |
+
try {
|
| 419 |
+
const controller2 = new AbortController();
|
| 420 |
+
const timeoutId2 = setTimeout(() => controller2.abort(), 8000);
|
| 421 |
+
|
| 422 |
+
await fetch(url, {
|
| 423 |
+
method: 'GET',
|
| 424 |
+
mode: 'no-cors',
|
| 425 |
+
cache: 'no-store',
|
| 426 |
+
signal: controller2.signal
|
| 427 |
+
});
|
| 428 |
+
clearTimeout(timeoutId2);
|
| 429 |
+
return { state: 'online', code: '' };
|
| 430 |
+
} catch (err2) {
|
| 431 |
+
return { state: 'offline', code: '' };
|
| 432 |
+
}
|
| 433 |
+
}
|
| 434 |
+
}
|
| 435 |
+
|
| 436 |
+
async function updateStatus(el) {
|
| 437 |
+
const url = el.dataset.url;
|
| 438 |
+
const t = translations[currentLang];
|
| 439 |
+
|
| 440 |
+
el.className = 'status checking';
|
| 441 |
+
el.dataset.state = 'checking';
|
| 442 |
+
el.textContent = t.checking;
|
| 443 |
+
|
| 444 |
+
const [result] = await Promise.all([
|
| 445 |
+
checkServer(url),
|
| 446 |
+
new Promise(r => setTimeout(r, 300))
|
| 447 |
+
]);
|
| 448 |
+
|
| 449 |
+
el.className = 'status ' + result.state;
|
| 450 |
+
el.dataset.state = result.state;
|
| 451 |
+
el.dataset.code = result.code || '';
|
| 452 |
+
|
| 453 |
+
if (result.state === 'online') {
|
| 454 |
+
el.textContent = t.online;
|
| 455 |
+
el.title = t.titleOnline;
|
| 456 |
+
} else if (result.state === 'offline') {
|
| 457 |
+
el.textContent = t.offline;
|
| 458 |
+
el.title = t.titleOffline;
|
| 459 |
+
} else if (result.state === 'cf-error') {
|
| 460 |
+
el.textContent = t.cfError;
|
| 461 |
+
el.title = t.titleCfError;
|
| 462 |
+
} else if (result.state === 'host-error') {
|
| 463 |
+
el.textContent = t.hostError + result.code;
|
| 464 |
+
el.title = t.titleHostError;
|
| 465 |
+
}
|
| 466 |
+
}
|
| 467 |
+
|
| 468 |
+
function checkAll() {
|
| 469 |
+
document.querySelectorAll('.status').forEach(el => {
|
| 470 |
+
updateStatus(el);
|
| 471 |
+
});
|
| 472 |
+
}
|
| 473 |
+
|
| 474 |
+
window.addEventListener('DOMContentLoaded', checkAll);
|
| 475 |
+
</script>
|
| 476 |
+
|
| 477 |
+
</body>
|
| 478 |
+
</html>
|