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

View File

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