forked from simrail/simrail.pro
85 lines
3.1 KiB
Plaintext
85 lines
3.1 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/search?q=<%=q%>">
|
|
<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>
|
|
<header>
|
|
<h1><a style="color: white; text-decoration: none;" href="/">SimRail Logs</a></h1>
|
|
<p><a href="https://git.alekswilc.dev/alekswilc/simrail-logs">Dokumentacja</a></p>
|
|
</header>
|
|
|
|
<h2>Wyszukaj posterunek, osobe lub serwer</h2>
|
|
|
|
|
|
<div class="container">
|
|
<input type="text" id="search" value="<%=q%>">
|
|
<button onclick="search()">Szukaj</button>
|
|
<p>Użyj przecinka, aby wyszukać wiele wartości: pl2,Łazy</p>
|
|
</div>
|
|
|
|
<h2>Wyniki wyszukiwania</h2>
|
|
|
|
<ul>
|
|
<% records.forEach(record=> { %>
|
|
<li>
|
|
<details>
|
|
<summary>[<span style="color:lightskyblue">
|
|
<%= record.server.toUpperCase() %>
|
|
</span>] <span style="color: lightskyblue">
|
|
<%= record.stationName %>
|
|
</span> - <span style="color:hotpink">
|
|
<%= record.userUsername %>
|
|
</span>
|
|
<p style="margin-bottom: 0; opacity: 0.5;">
|
|
<%= dayjs(record.leftDate).format('HH:mm DD/MM/YYYY') %>
|
|
</p>
|
|
</summary>
|
|
<p>Data dołączenia: <%= record.joinedDate ? dayjs(record.joinedDate).format('HH:mm DD/MM/YYYY')
|
|
: '--:-- --/--/--' %> (<%= record.joinedDate ? dayjs(record.joinedDate).fromNow() : '--' %>)
|
|
</p>
|
|
<p>Data wyjścia: <%= dayjs(record.leftDate).format('HH:mm DD/MM/YYYY') %> (<%=
|
|
dayjs(record.leftDate).fromNow() %>)</p>
|
|
<p>Spędzony czas: <%= record.joinedDate ? msToTime(record.leftDate - record.joinedDate) : '--' %>
|
|
</p>
|
|
|
|
<a href="/details/<%= record.id %>">
|
|
<button>Więcej</button>
|
|
</a>
|
|
</details>
|
|
</li>
|
|
<% }) %>
|
|
</ul>
|
|
|
|
<script>
|
|
function search() {
|
|
location.href = '/search?q=' + document.getElementById('search').value
|
|
}
|
|
document.getElementById('search').addEventListener("keyup", (event) => {
|
|
if (event.key === "Enter")
|
|
search();
|
|
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html> |