-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>URL Shortener - Statistics</title> | ||
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css" rel="stylesheet"> | ||
</head> | ||
<body class="bg-gray-100 min-h-screen py-12 px-4 sm:px-6 lg:px-8"> | ||
<div class="max-w-7xl mx-auto"> | ||
<div class="bg-white rounded-lg shadow-md p-6"> | ||
<div class="flex justify-between items-center mb-6"> | ||
<h1 class="text-2xl font-bold">URL Statistics</h1> | ||
<a href="{{ url_for('index') }}" class="text-blue-600 hover:text-blue-500"> | ||
Back to Home | ||
</a> | ||
</div> | ||
|
||
<div class="overflow-x-auto"> | ||
<table class="min-w-full divide-y divide-gray-200"> | ||
<thead class="bg-gray-50"> | ||
<tr> | ||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> | ||
Short URL | ||
</th> | ||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> | ||
Original URL | ||
</th> | ||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> | ||
Created At | ||
</th> | ||
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> | ||
Clicks | ||
</th> | ||
</tr> | ||
</thead> | ||
<tbody class="bg-white divide-y divide-gray-200"> | ||
{% for url in urls %} | ||
<tr> | ||
<td class="px-6 py-4 whitespace-nowrap text-sm text-blue-600"> | ||
<a href="{{ url_for('redirect_to_url', short_code=url[0]) }}" target="_blank"> | ||
{{ url[0] }} | ||
</a> | ||
</td> | ||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 truncate max-w-xs"> | ||
{{ url[1] }} | ||
</td> | ||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> | ||
{{ url[2] }} | ||
</td> | ||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> | ||
{{ url[3] }} | ||
</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |