feat: add css for models

This commit is contained in:
Martin Eyben 2024-12-03 17:56:39 +00:00
parent 2b7e06fc4c
commit c887d2a26c
2 changed files with 65 additions and 35 deletions

View File

@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -9,6 +10,7 @@
<%- include('partials/links.ejs') %>
</head>
<body>
<%- include('partials/header.ejs') %>
@ -17,18 +19,31 @@
</h1>
<pre>
<main>
id : <%= model.id %>
url : <%= model.url %>
creator : <%= model.creator %>
inheritFrom : <%= model.inheritFrom %>
pièces :
<h2>Liste des pièces nécessaires</h2>
<table>
<thead>
<tr>
<th>Id pièce</th>
<th>Quantité pieces</th>
</tr>
</thead>
<tbody>
<% model.pieces.forEach(function(pair) { %>
<li>
<a href="/pieces/<%=pair.first.id_piece%>">
n°<%=pair.first.id_piece%> en <%=pair.second%> exemplaires
</a>
</li>
<tr>
<td><a href="/pieces/<%=pair.first.id_piece%>"><i class="fa-solid fa-puzzle-piece"></i> <%= pair.first.id_piece%></a></td>
<td><%= pair.second%></td>
</tr>
<% }); %>
</tbody>
</table>
</main>
</pre>
</body>

View File

@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -9,24 +10,38 @@
<%- include('partials/links.ejs') %>
</head>
<body>
<%- include('partials/header.ejs') %>
<a href="/models/fromfan"><p>Liste des modèles proposés par des fans</p></a>
<main>
<h1>
Liste des modeles
</h1>
<ul>
<table>
<thead>
<tr>
<th>Id modèle</th>
<th>Nom modèle</th>
<th>Proposé par</th>
<th></th>
</tr>
</thead>
<tbody>
<% models.forEach(function(model) { %>
<li>
<a href="/models/byname/<%=model.name%>">
<%=model.name%>
</a>
</li>
<tr>
<td><%=model.id%></td>
<td><%=model.name%></td>
<td><a href="/membres/byid/<%=model.creator%>"><i class="fa-solid fa-user"></i> <%=model.creator%></a></td>
<td><a href="/models/byname/<%=model.name%>"><i class="fa-solid fa-eye"></i></a></td>
</tr>
<% }); %>
</ul>
</tbody>
</table>
</main>
</body>