Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
41 lines (38 loc) · 1.36 KB
/
Copy pathindex.html
File metadata and controls
41 lines (38 loc) · 1.36 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="/output.css" rel="stylesheet" />
</head>
<body class="container mx-auto prose dark:prose-invert dark:bg-slate-900 pt-6 bg-white text-slate-900">
<header>
<nav class="mx-auto flex items-center justify-between">
<strong>JSON Server</strong>
<div class="flex gap-x-6">
<a href="https://github.com/typicode/json-server">
<span class="ml-2">Docs</span>
</a>
<a href="https://github.com/sponsors/typicode" class="text-red-500 font-semibold">
<span class="ml-2">♡ Sponsor</span>
</a>
</div>
</nav>
</header>
<main class="my-12">
<p class="bg-gradient-to-r from-purple-500 via-pink-500 to-red-500 text-transparent bg-clip-text">✧*。٩(ˊᗜˋ*)و✧*。</p>
<% if (Object.keys(it.data).length === 0) { %>
<p>No resources found in JSON file</p>
<% } %>
<% Object.entries(it.data).forEach(function([name]) { %>
<div class="py-1">
<a href="<%= name %>">/<%= name %></a>
<span class="text-gray-500">
<% if (Array.isArray(it.data[name])) { %>
- <%= it.data[name].length %> <%= it.data[name].length > 1 ? 'items' : 'item' %></span>
<% } %>
</div>
<% }) %>
</main>
</body>
</html>