runtof's picture
create a website's administrator console (website for sudoku players) which give visibility of all users in order to administrate their status, datas, and also to make mailing campaigns, and to look at a dashboard with kpi like number of players per hour, their country with a map
4cc2778 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Management | SudokuSage Admin</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: {
500: '#d946ef',
},
secondary: {
500: '#10b981',
}
}
}
}
}
</script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
</head>
<body class="bg-gray-100 font-sans">
<div class="flex h-screen">
<!-- Sidebar (same as index.html) -->
<div class="w-64 bg-white shadow-lg">
<div class="p-4 border-b border-gray-200">
<h1 class="text-xl font-bold text-primary-500 flex items-center">
<i data-feather="grid" class="mr-2"></i> SudokuSage
</h1>
</div>
<nav class="p-4">
<ul>
<li class="mb-2">
<a href="index.html" class="flex items-center px-4 py-2 rounded-lg hover:bg-gray-100 text-gray-700">
<i data-feather="home" class="mr-2"></i> Dashboard
</a>
</li>
<li class="mb-2">
<a href="users.html" class="flex items-center px-4 py-2 rounded-lg bg-primary-500 text-white">
<i data-feather="users" class="mr-2"></i> Users
</a>
</li>
<li class="mb-2">
<a href="mailing.html" class="flex items-center px-4 py-2 rounded-lg hover:bg-gray-100 text-gray-700">
<i data-feather="mail" class="mr-2"></i> Mailing
</a>
</li>
<li class="mb-2">
<a href="settings.html" class="flex items-center px-4 py-2 rounded-lg hover:bg-gray-100 text-gray-700">
<i data-feather="settings" class="mr-2"></i> Settings
</a>
</li>
</ul>
</nav>
</div>
<!-- Main Content -->
<div class="flex-1 overflow-auto">
<!-- Header (same as index.html) -->
<header class="bg-white shadow-sm p-4 flex justify-between items-center">
<h2 class="text-xl font-semibold text-gray-800">User Management</h2>
<div class="flex items-center space-x-4">
<div class="relative">
<i data-feather="search" class="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
<input type="text" placeholder="Search users..." class="pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent">
</div>
<button class="bg-primary-500 hover:bg-primary-600 text-white px-4 py-2 rounded-lg flex items-center">
<i data-feather="plus" class="mr-2"></i> Add User
</button>
</div>
</header>
<!-- User Management Content -->
<main class="p-6">
<!-- Filters -->
<div class="bg-white rounded-lg shadow p-4 mb-6">
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Status</label>
<select class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent">
<option>All Status</option>
<option>Active</option>
<option>Inactive</option>
<option>Banned</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Player Level</label>
<select class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent">
<option>All Levels</option>
<option>Beginner</option>
<option>Intermediate</option>
<option>Advanced</option>
<option>Expert</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Registration Date</label>
<select class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent">
<option>All Time</option>
<option>Last 7 Days</option>
<option>Last 30 Days</option>
<option>Last 90 Days</option>
</select>
</div>
<div class="flex items-end">
<button class="w-full bg-secondary-500 hover:bg-secondary-600 text-white px-4 py-2 rounded-lg flex items-center justify-center">
<i data-feather="filter" class="mr-2"></i> Apply Filters
</button>
</div>
</div>
</div>
<!-- Users Table -->
<div class="bg-white rounded-lg shadow overflow-hidden">
<div class="p-6 border-b border-gray-200 flex justify-between items-center">
<h3 class="text-lg font-semibold text-gray-800">All Players (12,345)</h3>
<div class="flex space-x-2">
<button class="text-primary-500 hover:text-primary-700 text-sm font-medium flex items-center">
<i data-feather="refresh-cw" class="mr-1"></i> Refresh
</button>
<button class="text-primary-500 hover:text-primary-700 text-sm font-medium flex items-center">
<i data-feather="download" class="mr-1"></i> Export
</button>
</div>
</div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
<input type="checkbox" class="rounded text-primary-500 focus:ring-primary-500">
</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Player</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Level</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Puzzles Solved</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Registration</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200">
<!-- Sample User 1 -->
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<input type="checkbox" class="rounded text-primary-500 focus:ring-primary-500">
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="http://static.photos/people/200x200/4" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Sarah Johnson</div>
<div class="text-sm text-gray-500">sarah@example.com</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Active</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<div class="flex items-center">
<i data-feather="star" class="text-yellow-400 mr-1"></i>
<i data-feather="star" class="text-yellow-400 mr-1"></i>
<i data-feather="star" class="text-yellow-400"></i>
<span class="ml-2">Advanced</span>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1,245</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-05-15</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<div class="flex space-x-2">
<button class="text-primary-500 hover:text-primary-700 p-1 rounded hover:bg-primary-50">
<i data-feather="edit-2" class="w-4 h-4"></i>
</button>
<button class="text-green-500 hover:text-green-700 p-1 rounded hover:bg-green-50">
<i data-feather="mail" class="w-4 h-4"></i>
</button>
<button class="text-red-500 hover:text-red-700 p-1 rounded hover:bg-red-50">
<i data-feather="trash-2" class="w-4 h-4"></i>
</button>
</div>
</td>
</tr>
<!-- Sample User 2 -->
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<input type="checkbox" class="rounded text-primary-500 focus:ring-primary-500">
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="http://static.photos/people/200x200/5" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Michael Chen</div>
<div class="text-sm text-gray-500">michael@example.com</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">Inactive</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<div class="flex items-center">
<i data-feather="star" class="text-yellow-400 mr-1"></i>
<i data-feather="star" class="text-gray-300 mr-1"></i>
<i data-feather="star" class="text-gray-300"></i>
<span class="ml-2">Beginner</span>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">78</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-10-22</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<div class="flex space-x-2">
<button class="text-primary-500 hover:text-primary-700 p-1 rounded hover:bg-primary-50">
<i data-feather="edit-2" class="w-4 h-4"></i>
</button>
<button class="text-green-500 hover:text-green-700 p-1 rounded hover:bg-green-50">
<i data-feather="mail" class="w-4 h-4"></i>
</button>
<button class="text-red-500 hover:text-red-700 p-1 rounded hover:bg-red-50">
<i data-feather="trash-2" class="w-4 h-4"></i>
</button>
</div>
</td>
</tr>
<!-- Sample User 3 -->
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<input type="checkbox" class="rounded text-primary-500 focus:ring-primary-500">
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10">
<img class="h-10 w-10 rounded-full" src="http://static.photos/people/200x200/6" alt="">
</div>
<div class="ml-4">
<div class="text-sm font-medium text-gray-900">Emma Wilson</div>
<div class="text-sm text-gray-500">emma@example.com</div>
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Banned</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
<div class="flex items-center">
<i data-feather="star" class="text-yellow-400 mr-1"></i>
<i data-feather="star" class="text-yellow-400 mr-1"></i>
<i data-feather="star" class="text-yellow-400 mr-1"></i>
<i data-feather="star" class="text-yellow-400"></i>
<span class="ml-2">Expert</span>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">3,412</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2022-11-03</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<div class="flex space-x-2">
<button class="text-primary-500 hover:text-primary-700 p-1 rounded hover:bg-primary-50">
<i data-feather="edit-2" class="w-4 h-4"></i>
</button>
<button class="text-green-500 hover:text-green-700 p-1 rounded hover:bg-green-50">
<i data-feather="mail" class="w-4 h-4"></i>
</button>
<button class="text-green-500 hover:text-green-700 p-1 rounded hover:bg-green-50">
<i data-feather="unlock" class="w-4 h-4"></i>
</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="bg-gray-50 px-6 py-3 flex items-center justify-between border-t border-gray-200">
<div class="flex-1 flex justify-between sm:hidden">
<a href="#" class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">Previous</a>
<a href="#" class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">Next</a>
</div>
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
<div>
<p class="text-sm text-gray-700">
Showing <span class="font-medium">1</span> to <span class="font-medium">10</span> of <span class="font-medium">12,345</span> results
</p>
</div>
<div>
<nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
<span class="sr-only">Previous</span>
<i data-feather="chevron-left" class="h-5 w-5"></i>
</a>
<a href="#" aria-current="page" class="z-10 bg-primary-50 border-primary-500 text-primary-600 relative inline-flex items-center px-4 py-2 border text-sm font-medium">1</a>
<a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">2</a>
<a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">3</a>
<span class="relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700">...</span>
<a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">8</a>
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
<span class="sr-only">Next</span>
<i data-feather="chevron-right" class="h-5 w-5"></i>
</a>
</nav>
</div>
</div>
</div>
</div>
</main>
</div>
</div>
<script>
// Initialize feather icons
feather.replace();
</script>
</body>
</html>