Spaces:
Running
Running
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
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Mailing Campaigns | 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 hover:bg-gray-100 text-gray-700"> | |
| <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 bg-primary-500 text-white"> | |
| <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">Mailing Campaigns</h2> | |
| <div class="flex items-center space-x-4"> | |
| <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> New Campaign | |
| </button> | |
| </div> | |
| </header> | |
| <!-- Mailing Content --> | |
| <main class="p-6"> | |
| <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6"> | |
| <!-- Campaign Stats --> | |
| <div class="bg-white rounded-lg shadow p-6"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-gray-500">Total Campaigns</p> | |
| <h3 class="text-2xl font-bold text-gray-800">24</h3> | |
| <p class="text-primary-500 flex items-center text-sm"> | |
| <i data-feather="trending-up" class="mr-1"></i> 3 new this month | |
| </p> | |
| </div> | |
| <div class="bg-primary-100 p-3 rounded-full"> | |
| <i data-feather="mail" class="text-primary-500"></i> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-lg shadow p-6"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-gray-500">Avg. Open Rate</p> | |
| <h3 class="text-2xl font-bold text-gray-800">42%</h3> | |
| <p class="text-secondary-500 flex items-center text-sm"> | |
| <i data-feather="arrow-up" class="mr-1"></i> 5% from last month | |
| </p> | |
| </div> | |
| <div class="bg-secondary-100 p-3 rounded-full"> | |
| <i data-feather="eye" class="text-secondary-500"></i> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-lg shadow p-6"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-gray-500">Avg. Click Rate</p> | |
| <h3 class="text-2xl font-bold text-gray-800">18%</h3> | |
| <p class="text-primary-500 flex items-center text-sm"> | |
| <i data-feather="arrow-up" class="mr-1"></i> 3% from last month | |
| </p> | |
| </div> | |
| <div class="bg-purple-100 p-3 rounded-full"> | |
| <i data-feather="mouse-pointer" class="text-purple-500"></i> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Recent Campaigns --> | |
| <div class="bg-white rounded-lg shadow overflow-hidden mb-6"> | |
| <div class="p-6 border-b border-gray-200 flex justify-between items-center"> | |
| <h3 class="text-lg font-semibold text-gray-800">Recent Campaigns</h3> | |
| <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> | |
| </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">Campaign</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Sent</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Recipients</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Open Rate</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Click Rate</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">Actions</th> | |
| </tr> | |
| </thead> | |
| <tbody class="bg-white divide-y divide-gray-200"> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="text-sm font-medium text-gray-900">Winter Sudoku Challenge</div> | |
| <div class="text-sm text-gray-500">Promotional</div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-12-01</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">9,245</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> | |
| <div class="flex items-center"> | |
| <div class="w-16 bg-gray-200 rounded-full h-2 mr-2"> | |
| <div class="bg-green-500 h-2 rounded-full" style="width: 48%"></div> | |
| </div> | |
| <span>48%</span> | |
| </div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> | |
| <div class="flex items-center"> | |
| <div class="w-16 bg-gray-200 rounded-full h-2 mr-2"> | |
| <div class="bg-blue-500 h-2 rounded-full" style="width: 22%"></div> | |
| </div> | |
| <span>22%</span> | |
| </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">Completed</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium"> | |
| <a href="#" class="text-primary-500 hover:text-primary-700 mr-3">View</a> | |
| <a href="#" class="text-gray-500 hover:text-gray-700">Resend</a> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="text-sm font-medium text-gray-900">New Puzzle Collection</div> | |
| <div class="text-sm text-gray-500">Product Update</div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-11-15</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">12,345</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> | |
| <div class="flex items-center"> | |
| <div class="w-16 bg-gray-200 rounded-full h-2 mr-2"> | |
| <div class="bg-green-500 h-2 rounded-full" style="width: 38%"></div> | |
| </div> | |
| <span>38%</span> | |
| </div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> | |
| <div class="flex items-center"> | |
| <div class="w-16 bg-gray-200 rounded-full h-2 mr-2"> | |
| <div class="bg-blue-500 h-2 rounded-full" style="width: 15%"></div> | |
| </div> | |
| <span>15%</span> | |
| </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">Completed</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium"> | |
| <a href="#" class="text-primary-500 hover:text-primary-700 mr-3">View</a> | |
| <a href="#" class="text-gray-500 hover:text-gray-700">Resend</a> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="text-sm font-medium text-gray-900">Premium Subscription</div> | |
| <div class="text-sm text-gray-500">Promotional</div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-11-05</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">5,678</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> | |
| <div class="flex items-center"> | |
| <div class="w-16 bg-gray-200 rounded-full h-2 mr-2"> | |
| <div class="bg-green-500 h-2 rounded-full" style="width: 52%"></div> | |
| </div> | |
| <span>52%</span> | |
| </div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> | |
| <div class="flex items-center"> | |
| <div class="w-16 bg-gray-200 rounded-full h-2 mr-2"> | |
| <div class="bg-blue-500 h-2 rounded-full" style="width: 28%"></div> | |
| </div> | |
| <span>28%</span> | |
| </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">Completed</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium"> | |
| <a href="#" class="text-primary-500 hover:text-primary-700 mr-3">View</a> | |
| <a href="#" class="text-gray-500 hover:text-gray-700">Resend</a> | |
| </td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| <!-- New Campaign Form --> | |
| <div class="bg-white rounded-lg shadow overflow-hidden"> | |
| <div class="p-6 border-b border-gray-200"> | |
| <h3 class="text-lg font-semibold text-gray-800">Create New Campaign</h3> | |
| </div> | |
| <div class="p-6"> | |
| <form> | |
| <div class="grid grid-cols-1 gap-6"> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">Campaign Name</label> | |
| <input type="text" 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" placeholder="e.g. Winter Sudoku Challenge"> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">Recipient Group</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 Players</option> | |
| <option>Active Players (last 30 days)</option> | |
| <option>Inactive Players (30+ days)</option> | |
| <option>Premium Subscribers</option> | |
| <option>Free Players</option> | |
| <option>Expert Level Players</option> | |
| <option>Beginner Players</option> | |
| </select> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">Subject</label> | |
| <input type="text" 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" placeholder="e.g. New Sudoku Challenges Await You!"> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">Email Content</label> | |
| <textarea rows="6" 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" placeholder="Write your email content here..."></textarea> | |
| </div> | |
| <div class="flex justify-end"> | |
| <button type="button" class="bg-gray-200 hover:bg-gray-300 text-gray-800 px-4 py-2 rounded-lg mr-3"> | |
| Save Draft | |
| </button> | |
| <button type="submit" class="bg-primary-500 hover:bg-primary-600 text-white px-4 py-2 rounded-lg flex items-center"> | |
| <i data-feather="send" class="mr-2"></i> Send Campaign | |
| </button> | |
| </div> | |
| </div> | |
| </form> | |
| </div> | |
| </div> | |
| </main> | |
| </div> | |
| </div> | |
| <script> | |
| // Initialize feather icons | |
| feather.replace(); | |
| </script> | |
| </body> | |
| </html> | |