77 lines
2.4 KiB
Plaintext
77 lines
2.4 KiB
Plaintext
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>simrail.alekswilc.dev</title>
|
|
<meta name="description" content="Simrail Utils">
|
|
<meta property="og:title" content="simrail.alekswilc.dev">
|
|
<meta property="og:url" content="https://simrail.alekswilc.dev/leaderboard/">
|
|
<meta property="og:description" content="Simrail Utils">
|
|
<meta property="og:type" content="website">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/open-fonts@1.1.1/fonts/inter.min.css">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@exampledev/new.css@1.1.2/new.min.css">
|
|
|
|
<style>
|
|
p {
|
|
margin: 1%;
|
|
}
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<%- include('../_modules/header.ejs', { section: 'leaderboard' }) %>
|
|
|
|
<h2 id="but">Tablica wyników</h2>
|
|
<div class="container">
|
|
<input type="text" id="search" value="<%-q%>">
|
|
|
|
<button onclick="search()">Szukaj</button>
|
|
<button onclick="clearSearch()">Wyczyść</button>
|
|
|
|
<p>Użyj przecinka, aby wyszukać wiele wartości: pl2,Łazy</p>
|
|
|
|
</div>
|
|
<br />
|
|
<ul>
|
|
<% records.forEach(record=> { %>
|
|
<li>
|
|
<%- type === 'train' ? include('train.ejs', { record, msToTime }) : include('station.ejs', { record, msToTime }) %>
|
|
</li>
|
|
<% }) %>
|
|
</ul>
|
|
|
|
<% if (!records.length) { %>
|
|
<h4>Nie znaleziono wyników dla twojego zapytania.</h4>
|
|
<% } %>
|
|
|
|
|
|
<script>
|
|
function select() {
|
|
const isTrain = "<%- type %>" === 'train'
|
|
location.href = '/leaderboard/' + (isTrain ? 'station' : 'train')
|
|
}
|
|
document.getElementById('but').textContent = ("<%- type %>" === 'train') ? 'Tablica pociągów' : 'Tablica posterunków'
|
|
function search() {
|
|
location.href = '/leaderboard/<%- type %>/?q=' + document.getElementById('search').value
|
|
}
|
|
function clearSearch() {
|
|
location.href = '/leaderboard/<%- type %>';
|
|
}
|
|
document.getElementById('search').addEventListener("keyup", (event) => {
|
|
if (event.key === "Enter")
|
|
search();
|
|
|
|
});
|
|
|
|
</script>
|
|
<hr>
|
|
|
|
<p style="color: orange;">Dane do rankingu zbierane są od dnia 19.08.2024.</p>
|
|
|
|
<%- include('../_modules/footer.ejs', { thanks: false, version, commit }) %>
|
|
</body>
|
|
|
|
</html> |