Nest intial code

This commit is contained in:
Saif Abdelrazek 2025-05-04 06:15:52 +03:00
commit 7b299ae5b5
8 changed files with 2217 additions and 0 deletions

68
views/viewer.ejs Normal file
View file

@ -0,0 +1,68 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.5/dist/css/bootstrap.min.css"
/>
<title>SaifURL Viewer</title>
</head>
<body class="bg-light">
<div class="container py-5">
<!-- Page Title -->
<h1 class="text-center mb-4 fw-bold text-primary">Saif URLs Viewer</h1>
<div class="text-center mt-4">
<p class="mb-2 fw-bold">View the project on:</p>
<a
href="https://github.com/saifabdelrazek011/saifurl"
target="_blank"
rel="noopener noreferrer"
class="btn btn-outline-primary btn-sm me-2"
>
GitHub Repository
</a>
</div>
<!-- Table Section -->
<div class="table-responsive shadow-sm rounded bg-white p-4 mt-2">
<table class="table table-striped table-hover align-middle">
<thead class="table-dark">
<tr>
<th>Full URL</th>
<th>Short URL</th>
<th>Clicks</th>
</tr>
</thead>
<tbody>
<% shortUrls.forEach(shortUrl => { %>
<tr>
<td>
<a
href="<%= shortUrl.full %>"
target="_blank"
class="text-decoration-none text-primary fw-bold"
><%= shortUrl.full %></a
>
</td>
<td>
<a
href="<%= shortUrl.short %>"
target="_blank"
class="text-decoration-none text-success fw-bold"
><%= shortUrl.short %></a
>
</td>
<td class="text-center fw-bold"><%= shortUrl.clicks %></td>
</tr>
<% }) %>
</tbody>
</table>
</div>
</div>
<!-- Bootstrap JS Bundle -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.5/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>