feat: add boxes templates

This commit is contained in:
Nemo D'ACREMONT 2024-11-18 14:16:46 +01:00
parent 083187c15b
commit bc5ccfe221
No known key found for this signature in database
GPG Key ID: 6E5BCE8022FA8276
3 changed files with 70 additions and 0 deletions

View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
<%= box.title %>
</title>
<%- include('partials/links.ejs') %>
</head>
<body>
<%- include('partials/header.ejs') %>
<h1>
<%= box.title %>
</h1>
<pre>
id : <%= box.id %>
date : <%= box.date %>
</pre>
</body>
</html>

View File

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Liste des boîtes
</title>
<%- include('partials/links.ejs') %>
</head>
<body>
<%- include('partials/header.ejs') %>
<h1>
Liste des boîtes
</h1>
<div class="fromDate">
<label for="fromDate">À partir de : </label>
<input type="date" name="fromDate" id="fromDate">
<input type="submit" value="Filtrer" onclick="window.location.pathname = '/boxes/from/' + document.getElementById('fromDate').value;">
</div>
<hr>
<ul>
<% boxes.forEach(function(box) { %>
<li>
<a href="/boxes/<%=box.title%>">
<%=box.title%>
</a>
</li>
<% }); %>
</ul>
</body>
</html>

View File

@ -12,6 +12,12 @@
Modèles Modèles
</li> </li>
</a> </a>
<a href="/boxes">
<li>
Boîtes
</li>
</a>
</ul> </ul>
</nav> </nav>
</header> </header>