Download src/wordgame/templates/admin.html from humut/WordGame: direct link, hf CLI and curl.
- Browser
- Download file 22 kB
-
https://huggingface.co/spaces/humut/WordGame/resolve/main/src/wordgame/templates/admin.html
- Command line
-
hf download hf://spaces/humut/WordGame/src/wordgame/templates/admin.html
-
curl -L -o admin.html https://huggingface.co/spaces/humut/WordGame/resolve/main/src/wordgame/templates/admin.html
22 kB
| <html lang="hu" class="h-full"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Admin Panel | Verbumix</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://unpkg.com/htmx.org@1.9.12"></script> | |
| <script> | |
| tailwind.config = { | |
| darkMode: 'class', | |
| theme: { | |
| extend: { | |
| colors: { | |
| 'game-bg': 'var(--bg-primary)', | |
| 'game-card': 'var(--bg-card)', | |
| 'game-text': 'var(--text-primary)', | |
| } | |
| } | |
| } | |
| } | |
| </script> | |
| <link rel="stylesheet" href="/static/css/theme.css"> | |
| <script src="/static/js/theme.js"></script> | |
| <style> | |
| .stat-card { | |
| transition: all 0.3s ease; | |
| } | |
| .stat-card:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); | |
| } | |
| .progress-bar { | |
| transition: width 1s ease-in-out; | |
| } | |
| </style> | |
| </head> | |
| <body class="flex flex-col h-full font-sans antialiased transition-colors duration-300" style="background-color: var(--bg-primary); color: var(--text-primary);"> | |
| <!-- Header --> | |
| <header class="border-b border-game bg-card dark:bg-game px-6 py-4 flex justify-between items-center shadow-sm"> | |
| <div class="flex items-center gap-3"> | |
| <div class="p-2 bg-card rounded-lg"> | |
| <span class="text-xl"></span> | |
| </div> | |
| <div> | |
| <h1 class="text-lg font-bold text-game">Admin Panel</h1> | |
| <p class="text-xs text-muted">Rendszerfelügyelet</p> | |
| </div> | |
| </div> | |
| <div class="flex items-center gap-4"> | |
| <button class="theme-toggle p-2 hover:bg-gray-100 dark:hover:bg-card rounded-lg transition" aria-label="Téma váltása" title="Téma váltása"> | |
| <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 text-muted"> | |
| <path stroke-linecap="round" stroke-linejoin="round" d="M12 3v2.25m6.364.386l-1.591 1.591M21 12h-2.25m-.386 6.364l-1.591-1.591M12 18.75V21m-4.773-4.227l-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0z" /> | |
| </svg> | |
| </button> | |
| <a href="/" class="text-sm text-muted hover:text-green-600 dark:hover:text-accent transition flex items-center gap-1"> | |
| <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4"> | |
| <path stroke-linecap="round" stroke-linejoin="round" d="M9 15L3 9m0 0l6-6M3 9h12a6 6 0 010 12h-3" /> | |
| </svg> | |
| Vissza | |
| </a> | |
| </div> | |
| </header> | |
| <main class="flex-1 p-6 overflow-auto"> | |
| <div class="max-w-7xl mx-auto space-y-6"> | |
| <!-- Fő statisztikák --> | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4"> | |
| <!-- Felhasználók --> | |
| <div class="stat-card bg-card dark:bg-card rounded-xl p-5 shadow-sm border border-game dark:border-game"> | |
| <div class="flex items-center justify-between mb-3"> | |
| <span class="text-sm font-medium text-muted">Felhasználók</span> | |
| <div class="p-2 bg-blue-100 dark:bg-blue-900/30 rounded-lg"> | |
| <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4 text-blue-600 dark:text-blue-400"> | |
| <path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.652.372 9.337 9.337 0 004.121-.621 9.342 9.342 0 001.936-.736 9.332 9.332 0 001.935-.736 9.337 9.337 0 004.121-.621 9.38 9.38 0 002.652-.372" /> | |
| <path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 00-2.652.372 9.337 9.337 0 00-4.121-.621 9.342 9.342 0 00-1.936-.736 9.332 9.332 0 00-1.935-.736 9.337 9.337 0 00-4.121-.621 9.38 9.38 0 00-2.652-.372" /> | |
| <circle cx="9" cy="9" r="3.75" /> | |
| <circle cx="15" cy="9" r="3.75" /> | |
| </svg> | |
| </div> | |
| </div> | |
| <p class="text-2xl font-bold text-game">{{ user_count }}</p> | |
| <p class="text-xs text-muted mt-1">Összes regisztrált</p> | |
| </div> | |
| <!-- Szavak --> | |
| <div class="stat-card bg-card dark:bg-card rounded-xl p-5 shadow-sm border border-game dark:border-game"> | |
| <div class="flex items-center justify-between mb-3"> | |
| <span class="text-sm font-medium text-muted">Szavak</span> | |
| <div class="p-2 bg-card rounded-lg"> | |
| <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4 text-accent"> | |
| <path stroke-linecap="round" stroke-linejoin="round" d="M12 6.042A8.967 8.967 0 006 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 016 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 016-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0118 18a8.967 8.967 0 00-6 2.292m0-14.25v14.25" /> | |
| </svg> | |
| </div> | |
| </div> | |
| <p class="text-2xl font-bold text-game">{{ total_words }}</p> | |
| <p class="text-xs text-muted mt-1">Adatbázisban</p> | |
| </div> | |
| <!-- Nyelvek --> | |
| <div class="stat-card bg-card dark:bg-card rounded-xl p-5 shadow-sm border border-game dark:border-game"> | |
| <div class="flex items-center justify-between mb-3"> | |
| <span class="text-sm font-medium text-muted">Nyelvek</span> | |
| <div class="p-2 bg-purple-100 dark:bg-purple-900/30 rounded-lg"> | |
| <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4 text-purple-600 dark:text-purple-400"> | |
| <path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-.778.099-1.533.284-2.253" /> | |
| </svg> | |
| </div> | |
| </div> | |
| <p class="text-2xl font-bold text-game">90+</p> | |
| <p class="text-xs text-muted mt-1">Támogatott</p> | |
| </div> | |
| <!-- Rendszer --> | |
| <div class="stat-card bg-card dark:bg-card rounded-xl p-5 shadow-sm border border-game dark:border-game"> | |
| <div class="flex items-center justify-between mb-3"> | |
| <span class="text-sm font-medium text-muted">Rendszer</span> | |
| <div class="p-2 bg-card rounded-lg"> | |
| <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4 text-accent"> | |
| <path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12c0 1.268-.63 2.39-1.593 3.068a3.745 3.745 0 01-1.043 3.296 3.745 3.745 0 01-3.296 1.043A3.745 3.745 0 0112 21c-1.268 0-2.39-.63-3.068-1.593a3.746 3.746 0 01-3.296-1.043 3.745 3.745 0 01-1.043-3.296A3.745 3.745 0 013 12c0-1.268.63-2.39 1.593-3.068a3.745 3.745 0 011.043-3.296 3.746 3.746 0 013.296-1.043A3.746 3.746 0 0112 3c1.268 0 2.39.63 3.068 1.593a3.746 3.746 0 013.296 1.043 3.746 3.746 0 011.043 3.296A3.745 3.745 0 0121 12z" /> | |
| </svg> | |
| </div> | |
| </div> | |
| <div class="flex items-center gap-2"> | |
| <span class="relative flex h-3 w-3"> | |
| <span class="animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-75"></span> | |
| <span class="relative inline-flex rounded-full h-3 w-3 btn-accent"></span> | |
| </span> | |
| <p class="text-lg font-bold text-accent">Online</p> | |
| </div> | |
| <p class="text-xs text-muted mt-1">Minden rendszer működik</p> | |
| </div> | |
| </div> | |
| <!-- Speciális statisztikák --> | |
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-6"> | |
| <!-- Kategória eloszlás --> | |
| <div class="bg-card dark:bg-card rounded-xl p-6 shadow-sm border border-game dark:border-game"> | |
| <h3 class="text-lg font-bold text-game mb-4 flex items-center gap-2"> | |
| <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 text-muted"> | |
| <path stroke-linecap="round" stroke-linejoin="round" d="M10.5 6a7.5 7.5 0 107.5 7.5h-7.5V6z" /> | |
| <path stroke-linecap="round" stroke-linejoin="round" d="M13 7.5a7.5 7.5 0 00-7.5-7.5c-4.142 0-7.5 3.358-7.5 7.5 0 4.142 3.358 7.5 7.5 7.5H13z" /> | |
| </svg> | |
| Kategória eloszlás | |
| </h3> | |
| <div class="space-y-4"> | |
| <!-- Szlen --> | |
| <div> | |
| <div class="flex justify-between text-sm mb-1"> | |
| <span class="text-muted"> Szlen</span> | |
| <span class="font-medium text-game">~33%</span> | |
| </div> | |
| <div class="w-full bg-gray-200 dark:bg-card rounded-full h-2"> | |
| <div class="progress-bar bg-gradient-to-r from-orange-500 to-red-500 h-2 rounded-full" style="width: 33%"></div> | |
| </div> | |
| </div> | |
| <!-- Matek --> | |
| <div> | |
| <div class="flex justify-between text-sm mb-1"> | |
| <span class="text-muted"> Matek</span> | |
| <span class="font-medium text-game">~33%</span> | |
| </div> | |
| <div class="w-full bg-gray-200 dark:bg-card rounded-full h-2"> | |
| <div class="progress-bar bg-gradient-to-r from-blue-500 to-indigo-500 h-2 rounded-full" style="width: 33%"></div> | |
| </div> | |
| </div> | |
| <!-- Gamer --> | |
| <div> | |
| <div class="flex justify-between text-sm mb-1"> | |
| <span class="text-muted"> Gamer</span> | |
| <span class="font-medium text-game">~34%</span> | |
| </div> | |
| <div class="w-full bg-gray-200 dark:bg-card rounded-full h-2"> | |
| <div class="progress-bar bg-gradient-to-r from-purple-500 to-pink-500 h-2 rounded-full" style="width: 34%"></div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Nyelvi támogatás --> | |
| <div class="bg-card dark:bg-card rounded-xl p-6 shadow-sm border border-game dark:border-game"> | |
| <h3 class="text-lg font-bold text-game mb-4 flex items-center gap-2"> | |
| <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 text-muted"> | |
| <path stroke-linecap="round" stroke-linejoin="round" d="M10.5 21l5.25-11.25L21 21m-9-3h7.5M3 5.621a48.474 48.474 0 016-3.422c1.5 0 3 .12 4.5.361m-10.5 3.061a48.474 48.474 0 00-4.5.361m15 0a48.474 48.474 0 014.5-.361m-15 0a48.474 48.474 0 00-4.5.361m15 0c1.5 0 3 .12 4.5.361m-15 0a48.474 48.474 0 016-3.422" /> | |
| </svg> | |
| Nyelvi támogatás | |
| </h3> | |
| <div class="grid grid-cols-3 gap-3"> | |
| <div class="text-center p-3 bg-gray-50 dark:bg-card/50 rounded-lg"> | |
| <p class="text-2xl font-bold text-game">90+</p> | |
| <p class="text-xs text-muted">Nyelv</p> | |
| </div> | |
| <div class="text-center p-3 bg-gray-50 dark:bg-card/50 rounded-lg"> | |
| <p class="text-2xl font-bold text-game">100+</p> | |
| <p class="text-xs text-muted">Ország</p> | |
| </div> | |
| <div class="text-center p-3 bg-gray-50 dark:bg-card/50 rounded-lg"> | |
| <p class="text-2xl font-bold text-game">6</p> | |
| <p class="text-xs text-muted">Kontinens</p> | |
| </div> | |
| </div> | |
| <div class="mt-4 flex flex-wrap gap-2"> | |
| <span class="px-2 py-1 bg-card text-green-700 dark:text-green-300 text-xs rounded-full">Angol</span> | |
| <span class="px-2 py-1 bg-card text-green-700 dark:text-green-300 text-xs rounded-full">Német</span> | |
| <span class="px-2 py-1 bg-card text-green-700 dark:text-green-300 text-xs rounded-full">Francia</span> | |
| <span class="px-2 py-1 bg-card text-green-700 dark:text-green-300 text-xs rounded-full">Spanyol</span> | |
| <span class="px-2 py-1 bg-card text-green-700 dark:text-green-300 text-xs rounded-full">Japán</span> | |
| <span class="px-2 py-1 bg-card text-green-700 dark:text-green-300 text-xs rounded-full">Kínai</span> | |
| <span class="px-2 py-1 bg-gray-100 dark:bg-card text-muted text-xs rounded-full">+84</span> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Új szó hozzáadása --> | |
| <div class="bg-card dark:bg-card rounded-xl p-6 shadow-sm border border-game dark:border-game"> | |
| <h3 class="text-lg font-bold text-game mb-4 flex items-center gap-2"> | |
| <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 text-muted"> | |
| <path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" /> | |
| </svg> | |
| Új szó hozzáadása | |
| </h3> | |
| <form hx-post="/a7d9f2e1b4c6/add-word" hx-target="#message-area" class="flex gap-3 flex-wrap items-end"> | |
| <div class="flex-1 min-w-[200px]"> | |
| <label class="block text-sm font-medium text-game mb-1">Szó</label> | |
| <input type="text" name="word" placeholder="pl. CRING" class="w-full px-4 py-2.5 bg-gray-50 dark:bg-card border border-game dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-green-500 text-game placeholder-gray-400" required> | |
| </div> | |
| <div class="w-40"> | |
| <label class="block text-sm font-medium text-game mb-1">Kategória</label> | |
| <select name="category" class="w-full px-4 py-2.5 bg-gray-50 dark:bg-card border border-game dark:border-gray-600 rounded-lg focus:outline-none focus:ring-2 focus:ring-green-500 text-game"> | |
| <option value="szleng">Szlen</option> | |
| <option value="matek">Matek</option> | |
| <option value="gamer">Gamer</option> | |
| </select> | |
| </div> | |
| <button type="submit" class="px-6 py-2.5 btn-accent text-game font-medium rounded-lg transition-colors flex items-center gap-2"> | |
| <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4"> | |
| <path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" /> | |
| </svg> | |
| Hozzáad | |
| </button> | |
| </form> | |
| <div id="message-area" class="mt-4"></div> | |
| </div> | |
| <!-- Legutóbbi szavak --> | |
| <div class="bg-card dark:bg-card rounded-xl p-6 shadow-sm border border-game dark:border-game"> | |
| <h3 class="text-lg font-bold text-game mb-4 flex items-center gap-2"> | |
| <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5 text-muted"> | |
| <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25H12" /> | |
| </svg> | |
| Legutóbb hozzáadott szavak | |
| </h3> | |
| {% if recent_words %} | |
| <div class="overflow-x-auto"> | |
| <table class="w-full"> | |
| <thead> | |
| <tr class="border-b border-game dark:border-game"> | |
| <th class="text-left py-3 px-4 font-semibold text-sm text-muted">Szó</th> | |
| <th class="text-left py-3 px-4 font-semibold text-sm text-muted">Kategória</th> | |
| <th class="text-right py-3 px-4 font-semibold text-sm text-muted">Művelet</th> | |
| </tr> | |
| </thead> | |
| <tbody class="text-sm"> | |
| {% for word in recent_words %} | |
| <tr class="border-b border-gray-100 dark:border-game hover:bg-gray-50 dark:hover:bg-card/50 transition"> | |
| <td class="py-3 px-4 text-game font-mono font-medium">{{ word.szo }}</td> | |
| <td class="py-3 px-4"> | |
| <span class="px-2.5 py-1 bg-gray-100 dark:bg-card text-xs rounded-full text-game"> | |
| {% if word.kategoriak %} | |
| {% if word.kategoriak.nev == 'szleng' %} | |
| {% elif word.kategoriak.nev == 'matek' %} | |
| {% elif word.kategoriak.nev == 'gamer' %} | |
| {% endif %} | |
| {{ word.kategoriak.nev | capitalize }} | |
| {% else %} | |
| N/A | |
| {% endif %} | |
| </span> | |
| </td> | |
| <td class="py-3 px-4 text-right"> | |
| <button | |
| hx-delete="/a7d9f2e1b4c6/delete-word/{{ word.id }}" | |
| hx-target="#message-area" | |
| hx-confirm="Biztosan törölni szeretnéd ezt a szót?" | |
| class="px-3 py-1.5 bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 rounded-lg hover:bg-red-100 dark:hover:bg-red-900/40 transition text-sm flex items-center gap-1 ml-auto" | |
| > | |
| <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-3.5 h-3.5"> | |
| <path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /> | |
| </svg> | |
| Töröl | |
| </button> | |
| </td> | |
| </tr> | |
| {% endfor %} | |
| </tbody> | |
| </table> | |
| </div> | |
| {% else %} | |
| <div class="text-center py-12"> | |
| <div class="text-4xl mb-3"></div> | |
| <p class="text-muted">Még nincsenek szavak az adatbázisban.</p> | |
| <p class="text-sm text-muted mt-1">Adj hozzá az első szót a fenti űrlappal!</p> | |
| </div> | |
| {% endif %} | |
| </div> | |
| </div> | |
| </main> | |
| <!-- Footer --> | |
| <footer class="border-t border-game py-4 px-6 text-center text-xs text-muted"> | |
| <div class="flex items-center justify-center gap-4"> | |
| <span>Admin Panel v1.0</span> | |
| <span>•</span> | |
| <span>Verbumix © 2024</span> | |
| </div> | |
| </footer> | |
| </body> | |
| </html> |