home.html 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <!DOCTYPE html>
  2. <html lang="en" x-data="{zacalqiz: false}">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
  7. <title>Kvíz: Který učitel na GJS jsi ty?</title>
  8. <script src="https://cdn.tailwindcss.com"></script>
  9. <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
  10. <style>
  11. body { background-color: #f0f4f8; }
  12. .gjs-blue { background-color: #0055a4; }
  13. .card { border-radius: 15px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
  14. </style>
  15. </head>
  16. <body>
  17. <script>
  18. function quizApp() {
  19. return {
  20. zacalqiz: false,
  21. otazky: [],
  22. async startQuiz() {
  23. this.zacalqiz = ! this.zacalqiz
  24. const res = await fetch('/api/questions?count=5');
  25. this.otazky = await res.json();
  26. }
  27. }
  28. }
  29. </script>
  30. <template x-if="!zacalqiz">
  31. <div>
  32. <div >
  33. <h1>silly_qiz</h1>
  34. <h3 class="rainbow">toto bude mega giga silly qiz, aby jste mohli zjistit který z učítelů gimjs jste :3</h3>
  35. <a href="{{ url_for('questions.index') }}">Začít kvíz</a>
  36. </div>
  37. </div>
  38. </template>
  39. <template x-if="zacalqiz">
  40. <div class="flex flex-col items-center justify-center min-h-screen p-4">
  41. <div class="card bg-white w-full max-w-lg p-6 border-t-8 border-blue-700">
  42. <h1 class="text-2xl font-bold text-center text-gray-800 mb-8">
  43. Který učitel na GJS jsi ty?
  44. </h1>
  45. <div class="mb-8">
  46. <p class="text-lg font-semibold text-gray-700 mb-4 text-center">
  47. Lorem ipsum dolor sit amet, consectetur?
  48. </p>
  49. <div class="space-y-3">
  50. <label class="block p-3 border rounded-lg cursor-pointer hover:bg-blue-50 transition">
  51. <input type="radio" name="q1" class="mr-2"> Lorem ipsum dolor
  52. </label>
  53. <label class="block p-3 border rounded-lg cursor-pointer hover:bg-blue-50 transition">
  54. <input type="radio" name="q1" class="mr-2"> Sit amet consectetur
  55. </label>
  56. <label class="block p-3 border rounded-lg cursor-pointer hover:bg-blue-50 transition">
  57. <input type="radio" name="q1" class="mr-2"> Adipiscing elit
  58. </label>
  59. <label class="block p-3 border rounded-lg cursor-pointer hover:bg-blue-50 transition">
  60. <input type="radio" name="q1" class="mr-2"> Sed do eiusmod
  61. </label>
  62. </div>
  63. </div>
  64. <div class="flex justify-between mt-10">
  65. <button class="px-6 py-2 bg-gray-200 text-gray-700 rounded font-bold hover:bg-gray-300 transition">
  66. Předchozí
  67. </button>
  68. <button class="px-6 py-2 gjs-blue text-white rounded font-bold hover:opacity-90 transition">
  69. Další
  70. </button>
  71. </div>
  72. </div>
  73. </div>
  74. </template>
  75. <button @click="startQuiz()">Toggle Content</button>
  76. </body>
  77. </html>