This commit is contained in:
2024-09-03 13:42:48 +02:00
commit 176cdb33b3
11 changed files with 390 additions and 0 deletions

21
src/templates/gamble.ejs Normal file
View File

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="/bootstrap.min.css" />
<script src="/bootstrap.bundle.min.css"></script>
<title>Index</title>
</head>
<body data-bs-theme="dark">
<form action="/gamble" method="post" enctype="multipart/form-data">
<label for="fname">First name:</label><br>
<input type="text" id="fname" name="fname" value="John"><br>
<label for="lname">Last name:</label><br>
<input type="text" id="lname" name="lname" value="Doe"><br><br>
<input type="submit" value="Submit">
</form>
</body>
</html>

29
src/templates/index.ejs Normal file
View File

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="/bootstrap.min.css" />
<script src="/bootstrap.bundle.min.css"></script>
<title>Index</title>
</head>
<body data-bs-theme="dark">
<a href="/gamble">gamble</a>
People
<div class="row p-5">
<div class="list-group col-3">
<% people.forEach((person) => {%>
<a href='/person/<%= person.id %>'
class="list-group-item list-group-item-action">
<div class="me-auto">
<span class="fw-bold"><%= person.name %></span>
<%= person.id %>
</div>
</a>
<% }); %>
</div>
</div>
</body>
</html>

25
src/templates/person.ejs Normal file
View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="/bootstrap.min.css" />
<script src="/bootstrap.bundle.min.css"></script>
<title>Person <%= person.name %></title>
</head>
<body data-bs-theme="dark">
<a href="/">Index</a>
<a href="/gamble">gamble</a>
<p>
Name: <%= person.name %>
</p>
<p>
Id: <%= person.id %>
</p>
<p>
secret: <%= person.secret %>
</p>
</body>
</html>