0Mart00
Fix: Remove mandatory GPS geolocation (GDPR violation), default to English words on load
0f5eae7 Download src/wordgame/templates/base.html from humut/WordGame: direct link, hf CLI and curl.
- Browser
- Download file 12.2 kB
-
https://huggingface.co/spaces/humut/WordGame/resolve/main/src/wordgame/templates/base.html
- Command line
-
hf download hf://spaces/humut/WordGame/src/wordgame/templates/base.html
-
curl -L -o base.html https://huggingface.co/spaces/humut/WordGame/resolve/main/src/wordgame/templates/base.html
12.2 kB
| <html lang="{{ lang | default('hu') }}" class="dark h-full"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>{{ _('site_title') }}</title> | |
| <script src="https://unpkg.com/htmx.org@1.9.12"></script> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script> | |
| tailwind.config = { | |
| darkMode: 'class', | |
| theme: { | |
| extend: { | |
| colors: { | |
| 'game-bg': '#0a0f0a', | |
| 'game-card': '#111a11', | |
| 'game-text': '#d8e8d8', | |
| 'game-accent': '#1a8a1a', | |
| 'game-accent-hover': '#22aa22', | |
| 'game-border': '#1a2a1a', | |
| 'game-muted': '#4a5a4a', | |
| } | |
| } | |
| } | |
| } | |
| </script> | |
| <link rel="stylesheet" href="/static/css/theme.css"> | |
| <style> | |
| .animate-fade-in { animation: fadeIn 0.3s ease-out forwards; } | |
| @keyframes fadeIn { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } } | |
| .bg-game { background-color: #0a0f0a; } | |
| .bg-card { background-color: #111a11; } | |
| .bg-header { background-color: #060a06; } | |
| .text-game { color: #d8e8d8; } | |
| .text-muted { color: #4a5a4a; } | |
| .text-accent { color: #1a8a1a; } | |
| .border-game { border-color: #1a2a1a; } | |
| .btn-accent { background-color: #1a8a1a; color: #e8f8e8; } | |
| .btn-accent:hover { background-color: #22aa22; } | |
| .btn-dark { background-color: #1a2a1a; color: #c8d8c8; } | |
| .btn-dark:hover { background-color: #1f301f; } | |
| .btn-danger { color: #cc5555; } | |
| .btn-danger:hover { color: #ee6666; } | |
| </style> | |
| {% if google_analytics_id %} | |
| <script> | |
| (function() { | |
| const consent = localStorage.getItem('verbumix-cookie-consent'); | |
| if (consent === 'accepted') { | |
| var gaScript = document.createElement('script'); | |
| gaScript.async = true; | |
| gaScript.src = 'https://www.googletagmanager.com/gtag/js?id={{ google_analytics_id }}'; | |
| document.head.appendChild(gaScript); | |
| window.dataLayer = window.dataLayer || []; | |
| function gtag(){dataLayer.push(arguments);} | |
| gtag('js', new Date()); | |
| gtag('config', '{{ google_analytics_id }}'); | |
| } | |
| })(); | |
| </script> | |
| {% endif %} | |
| </head> | |
| <body class="flex flex-col h-full font-sans antialiased bg-game text-game"> | |
| <header class="border-b border-game bg-header px-4 py-3 flex justify-between items-center shadow-md"> | |
| <h1 class="text-xl font-black tracking-wider text-accent cursor-pointer" hx-get="/jatek-valaszto" hx-target="#jatek-terulet"> | |
| {{ _('header_title') }} | |
| </h1> | |
| <nav class="flex gap-4 text-sm font-medium items-center"> | |
| <button hx-get="/jatek-valaszto" hx-target="#jatek-terulet" class="hover:text-green-400 transition cursor-pointer text-game bg-transparent border-0">{{ _('nav_games') }}</button> | |
| <button hx-get="/rangletra" hx-target="#jatek-terulet" class="hover:text-green-400 transition cursor-pointer text-game bg-transparent border-0">{{ _('nav_leaderboard') }}</button> | |
| <button hx-get="/premium" hx-target="#jatek-terulet" class="text-accent hover:text-green-400 font-bold transition cursor-pointer bg-transparent border-0">{{ _('nav_premium') }}</button> | |
| {% if user %} | |
| <a id="dashboard-link" href="/auth/sso-redirect?next=/dashboard" target="_blank" class="text-accent hover:text-green-400 font-bold transition text-xs uppercase tracking-wider bg-transparent border border-green-700 px-2 py-1 rounded">{{ _('nav_dashboard') }}</a> | |
| <span class="text-muted border-l border-game pl-4 text-xs font-mono select-none">{{ user.email }}</span> | |
| <a href="/auth/logout" class="btn-danger font-semibold transition text-xs uppercase tracking-wider bg-transparent">{{ _('nav_logout') }}</a> | |
| {% else %} | |
| <span class="text-muted">|</span> | |
| <button hx-get="/auth/login-page" hx-target="#jatek-terulet" class="text-muted hover:text-game bg-transparent border-0 cursor-pointer">{{ _('nav_login') }}</button> | |
| <button hx-get="/auth/register-page" hx-target="#jatek-terulet" class="px-3 py-1.5 btn-accent rounded font-bold transition border-0 cursor-pointer text-xs">{{ _('nav_register') }}</button> | |
| {% endif %} | |
| </nav> | |
| </header> | |
| <main id="jatek-terulet" class="flex-1 flex flex-col items-center justify-center p-4"> | |
| <div id="game-loader"></div> | |
| </main> | |
| <footer class="border-t border-game bg-header px-4 py-3 text-center text-xs text-muted"> | |
| <nav class="flex gap-4 justify-center flex-wrap"> | |
| <a href="/privacy" hx-get="/privacy" hx-target="#jatek-terulet" class="hover:text-green-400 transition cursor-pointer">Adatkezelesi Tajekoztato</a> | |
| <a href="/terms" hx-get="/terms" hx-target="#jatek-terulet" class="hover:text-green-400 transition cursor-pointer">Felhasznalasi Feltetelek</a> | |
| <a href="/cookies" hx-get="/cookies" hx-target="#jatek-terulet" class="hover:text-green-400 transition cursor-pointer">Cookie Tajekoztato</a> | |
| </nav> | |
| <p class="mt-1">2026 Verbumix</p> | |
| </footer> | |
| <div id="cookie-consent-banner" class="fixed bottom-0 left-0 right-0 z-40 bg-header border-t border-game p-4 shadow-2xl" style="display: none;"> | |
| <div class="max-w-4xl mx-auto flex flex-col sm:flex-row items-center justify-between gap-3"> | |
| <p class="text-sm text-muted">Ez a weboldal cookie-kat hasznal a bejelentkezeshez es anonim latogatasi statisztikakhoz. Reszletek a <a href="/cookies" hx-get="/cookies" hx-target="#jatek-terulet" class="text-accent underline">Cookie Tajekoztatoban</a>.</p> | |
| <div class="flex gap-2 flex-shrink-0"> | |
| <button id="cookie-reject-btn" class="px-4 py-2 btn-dark rounded text-sm font-bold cursor-pointer border-0 transition">Elutasitas</button> | |
| <button id="cookie-accept-btn" class="px-4 py-2 btn-accent rounded text-sm font-bold cursor-pointer border-0 transition">Elfogadas</button> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| (function() { | |
| const COOKIE_CONSENT_KEY = 'verbumix-cookie-consent'; | |
| if (!localStorage.getItem(COOKIE_CONSENT_KEY)) { | |
| document.getElementById('cookie-consent-banner').style.display = 'block'; | |
| } | |
| document.getElementById('cookie-accept-btn').addEventListener('click', function() { | |
| localStorage.setItem(COOKIE_CONSENT_KEY, 'accepted'); | |
| document.getElementById('cookie-consent-banner').style.display = 'none'; | |
| if (typeof gtag !== 'undefined') { gtag('consent', 'update', {analytics_storage: 'granted'}); } | |
| location.reload(); | |
| }); | |
| document.getElementById('cookie-reject-btn').addEventListener('click', function() { | |
| localStorage.setItem(COOKIE_CONSENT_KEY, 'rejected'); | |
| document.getElementById('cookie-consent-banner').style.display = 'none'; | |
| }); | |
| })(); | |
| </script> | |
| <script> | |
| let aktualisSor = 0; | |
| let aktualisBetuIndex = 0; | |
| function getSzoHossz() { | |
| const el = document.getElementById('szo-hossz'); | |
| return el ? parseInt(el.value) || 5 : 5; | |
| } | |
| function getMaxProba() { | |
| const el = document.getElementById('max-proba'); | |
| return el ? parseInt(el.value) || 6 : 6; | |
| } | |
| document.addEventListener('keydown', (e) => { | |
| if (e.target.tagName === 'INPUT' || e.target.tagName === 'SELECT') return; | |
| handleInput(e.key); | |
| }); | |
| function handleInput(key) { | |
| const maxProba = getMaxProba(); | |
| const szoHossz = getSzoHossz(); | |
| if (aktualisSor >= maxProba) return; | |
| const sorok = document.querySelectorAll('.wordle-sor'); | |
| if (!sorok.length || !sorok[aktualisSor]) return; | |
| const cellak = sorok[aktualisSor].querySelectorAll('.wordle-cella'); | |
| if (key === 'Enter') { | |
| if (aktualisBetuIndex === szoHossz) { | |
| let tipp = ""; | |
| cellak.forEach(cella => tipp += cella.textContent); | |
| const katElem = document.getElementById('akt-kategoria'); | |
| const kategoria = katElem ? katElem.value : "szleng"; | |
| const startElem = document.getElementById('jatek-start'); | |
| const startTime = startElem ? startElem.value : '0'; | |
| htmx.ajax('POST', '/ellenorzes', { | |
| values: { tipp: tipp, sor: aktualisSor, kategoria: kategoria, start_time: startTime, hossz: szoHossz }, | |
| target: sorok[aktualisSor], | |
| swap: 'outerHTML' | |
| }); | |
| aktualisSor++; | |
| aktualisBetuIndex = 0; | |
| } | |
| } else if (key === 'Backspace' || key === 'Delete') { | |
| if (aktualisBetuIndex > 0) { | |
| aktualisBetuIndex--; | |
| cellak[aktualisBetuIndex].textContent = ""; | |
| cellak[aktualisBetuIndex].classList.remove('border-game'); | |
| } | |
| } else if (key.length === 1 && /^[a-zA-ZáéíóöőúüűÁÉÍÓÖŐÚÜŰ]$/.test(key)) { | |
| if (aktualisBetuIndex < szoHossz) { | |
| cellak[aktualisBetuIndex].textContent = key.toUpperCase(); | |
| aktualisBetuIndex++; | |
| } | |
| } | |
| } | |
| document.addEventListener('htmx:afterSwap', (e) => { | |
| if (e.detail.target.id === 'jatek-terulet') { | |
| aktualisSor = 0; | |
| aktualisBetuIndex = 0; | |
| const katElem = document.getElementById('akt-kategoria'); | |
| const dashLink = document.getElementById('dashboard-link'); | |
| if (katElem && dashLink) { | |
| const kategoria = katElem.value; | |
| const baseHref = dashLink.getAttribute('data-base-href') || '/auth/sso-redirect?next=/dashboard'; | |
| dashLink.href = baseHref + '&kategoria=' + encodeURIComponent(kategoria); | |
| } | |
| } | |
| }); | |
| document.addEventListener('DOMContentLoaded', () => { | |
| const dashLink = document.getElementById('dashboard-link'); | |
| if (dashLink) { | |
| dashLink.setAttribute('data-base-href', dashLink.href.split('&kategoria=')[0]); | |
| } | |
| }); | |
| function closeSuccessModal() { | |
| const overlay = document.getElementById('success-modal-overlay'); | |
| if (overlay) overlay.remove(); | |
| } | |
| function closeGameOverModal() { | |
| const overlay = document.getElementById('gameover-modal-overlay'); | |
| if (overlay) overlay.remove(); | |
| } | |
| function copyShareText() { | |
| const btn = document.getElementById('share-btn'); | |
| if (!btn) return; | |
| const shareText = btn.getAttribute('data-share-text'); | |
| if (shareText) { | |
| navigator.clipboard.writeText(shareText).then(() => { | |
| btn.innerHTML = 'Masolva!'; | |
| btn.classList.add('bg-green-700', 'hover:bg-green-600'); | |
| setTimeout(() => { | |
| btn.innerHTML = 'Masolas'; | |
| btn.classList.remove('bg-green-700', 'hover:bg-green-600'); | |
| }, 2000); | |
| }).catch(() => { | |
| alert('Nem sikerult masolni.'); | |
| }); | |
| } | |
| } | |
| document.addEventListener('DOMContentLoaded', () => { | |
| htmx.ajax('GET', '/jatek/en', { target: '#jatek-terulet', swap: 'innerHTML' }); | |
| }); | |
| </script> | |
| <script src="/static/js/theme.js"></script> | |
| </body> | |
| </html> |