ddstats-server/views/pages/maps.njk

44 lines
1.5 KiB
Plaintext
Raw Normal View History

2021-11-04 22:50:57 +01:00
{% extends "../templates/basic.njk" %}
{% import "../components/_map.njk" as mapComponent %}
2021-11-13 20:12:01 +01:00
{% import "../components/_utils.njk" as utils %}
2021-11-04 22:50:57 +01:00
{% block head %}
<title>DDStats - Maps!</title>
<link rel="stylesheet" type="text/css" href="/assets/css/maps.css">
{% endblock %}
{% block body %}
2021-11-05 10:32:06 +01:00
<main class="flex-container">
2021-11-13 20:12:01 +01:00
<form action="/maps" method="get" id="search">
2021-11-06 16:55:37 +01:00
<h1>Search</h1>
<input type="text" name="map" id="map" placeholder="Map name">
<input type="text" name="categories" id="categories" placeholder="Category">
<input type="text" name="stars" id="stars" placeholder="Star amount">
<div class="sorting">
<label for="asc">
<input type="radio" name="sortBy" id="asc" value="asc">
Sort Ascending
</label>
<label for="desc">
<input type="radio" name="sortBy" id="desc" value="desc">
Sort Descending
</label>
</div>
<button type="submit">Search!</button>
2021-11-13 02:34:52 +01:00
</form>
2021-11-06 16:55:37 +01:00
2021-11-13 20:12:01 +01:00
<div class="flex-container pages">
{{ utils.pager(data.maps.pageInfo.page, data.maps.pageInfo.totalPages) }}
</div>
2021-11-13 02:28:43 +01:00
{% for map in data.maps.maps %}
2021-11-04 22:50:57 +01:00
{{ mapComponent.card(map) }}
{% endfor %}
2021-11-13 20:12:01 +01:00
<div class="flex-container pages">
{{ utils.pager(data.maps.pageInfo.page, data.maps.pageInfo.totalPages) }}
</div>
2021-11-04 22:50:57 +01:00
</main>
{% endblock %}