-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.ejs
44 lines (40 loc) · 2.26 KB
/
data.ejs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!DOCTYPE html>
<html lang="en">
<head>
<%- include ../partials/head %>
</head>
<body class="container">
<header>
<%- include ../partials/header %>
</header>
<main>
<div class="jumbotron">
<form class="d-flex" action="/data/search?" method="GET">
<div class="input-group mb-3">
<input type="username" class="form-control" name="nickname" placeholder="Pesquise por nickname" value="<%= nicknameResult %>" aria-label="Recipient's username" aria-describedby="button-addon2" >
<input class="btn btn-outline-primary" type="submit" id="button-addon2">
</div>
</form>
<% data.forEach(function(index){ %>
<% if(nicknameResult.toLowerCase() == index.nickname.toLowerCase() || nicknameResult.length == 0){ %>
<div class="list-group" style='margin-bottom: 5pc;'>
<button onclick="window.location.href='/data/<%= index.id %>'" type="button" class="list-group-item list-group-item-action active" aria-current="true">
/data/<%= index.id %>
</button>
<button type="button" class="list-group-item list-group-item-action" disabled>Primeiro nome: <%= index.firstname %></button>
<button type="button" class="list-group-item list-group-item-action" disabled>Segundo nome: <%= index.lastname %></button>
<button type="button" class="list-group-item list-group-item-action" disabled>Nickname: <%= index.nickname %></button>
<button type="button" class="list-group-item list-group-item-action" disabled>Endereço: <%= index.address %></button>
<button type="button" class="list-group-item list-group-item-action" disabled>Bio: <%= index.bio %></button>
<button type="button" class="list-group-item list-group-item-action" disabled>Data de criação: <%= index.dataLancamento %></button>
<button type="button" class="list-group-item list-group-item-action" disabled>Última modificação: <%= index.dataUltima %></button>
</div>
<%}%>
<% }); %>
</div>
</main>
<footer>
<%- include ../partials/footer %>
</footer>
</body>
</html>