forked from simrail/simrail.pro
Delete src/search.ejs
This commit is contained in:
parent
4474532f17
commit
c880695ef9
@ -1,81 +0,0 @@
|
||||
<!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 [<span
|
||||
style="color:hotpink">PL2</span>]</a></h1>
|
||||
</header>
|
||||
|
||||
<h2>Wyszukaj posterunek lub osobe</h2>
|
||||
|
||||
|
||||
<div class="container">
|
||||
<input type="text" id="search" value="<%=q%>">
|
||||
<button onclick="search()">Szukaj</button>
|
||||
</div>
|
||||
|
||||
<h2>Wyniki wyszukiwania</h2>
|
||||
|
||||
<ul>
|
||||
<% records.forEach(record=> { %>
|
||||
<li>
|
||||
<details>
|
||||
|
||||
<summary>[<span style="color:lightskyblue">
|
||||
<%= record.stationShort %>
|
||||
</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: <%= dayjs(record.joinedDate).format('HH:mm DD/MM/YYYY') %> (<%=
|
||||
dayjs(record.joinedDate).fromNow() %>)</p>
|
||||
<p>Data wyjścia: <%= dayjs(record.leftDate).format('HH:mm DD/MM/YYYY') %> (<%=
|
||||
dayjs(record.leftDate).fromNow() %>)</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>
|
Loading…
x
Reference in New Issue
Block a user