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">
@ -7,29 +8,43 @@
<%= model.name %> <%= model.name %>
</title> </title>
<%- include('partials/links.ejs') %> <%- include('partials/links.ejs') %>
</head> </head>
<body> <body>
<%- include('partials/header.ejs') %> <%- include('partials/header.ejs') %>
<h1> <h1>
<%= model.name %> <%= model.name %>
</h1> </h1>
<pre> <pre>
id : <%= model.id %> <main>
url : <%= model.url %>
creator : <%= model.creator %> id : <%= model.id %>
inheritFrom : <%= model.inheritFrom %> url : <%= model.url %>
pièces : creator : <%= model.creator %>
<% model.pieces.forEach(function(pair) { %> inheritFrom : <%= model.inheritFrom %>
<li> <h2>Liste des pièces nécessaires</h2>
<a href="/pieces/<%=pair.first.id_piece%>"> <table>
n°<%=pair.first.id_piece%> en <%=pair.second%> exemplaires <thead>
</a> <tr>
</li> <th>Id pièce</th>
<% }); %> <th>Quantité pieces</th>
</pre> </tr>
</thead>
<tbody>
<% model.pieces.forEach(function(pair) { %>
<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> </body>
</html> </html>

View File

@ -1,32 +1,47 @@
<!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">
<title> <title>
Liste des modeles Liste des modeles
</title> </title>
<%- include('partials/links.ejs') %> <%- include('partials/links.ejs') %>
</head> </head>
<body> <body>
<%- include('partials/header.ejs') %> <%- include('partials/header.ejs') %>
<main>
<h1>
Liste des modeles
</h1>
<a href="/models/fromfan"><p>Liste des modèles proposés par des fans</p></a> <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) { %>
<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>
<h1> <% }); %>
Liste des modeles
</h1>
<ul> </tbody>
<% models.forEach(function(model) { %> </table>
<li>
<a href="/models/byname/<%=model.name%>"> </main>
<%=model.name%>
</a>
</li>
<% }); %>
</ul>
</body> </body>