Spaces:
Running
Running
Download create-test.html from Maqsadov/testmaster-pro: direct link, hf CLI and curl.
- Browser
- Download file 51.4 kB
-
https://huggingface.co/spaces/Maqsadov/testmaster-pro/resolve/main/create-test.html
- Command line
-
hf download hf://spaces/Maqsadov/testmaster-pro/create-test.html
-
curl -L -o create-test.html https://huggingface.co/spaces/Maqsadov/testmaster-pro/resolve/main/create-test.html
51.4 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Test Yaratish - TestMaster Pro</title> | |
| <link rel="stylesheet" href="style.css"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| </head> | |
| <body class="bg-gray-50 min-h-screen"> | |
| <header-component></header-component> | |
| <main class="container mx-auto px-4 py-8"> | |
| <div class="max-w-4xl mx-auto"> | |
| <div class="bg-white rounded-xl shadow-lg p-6 mb-8"> | |
| <h1 class="text-3xl font-bold text-gray-800 mb-2">Test Yaratish</h1> | |
| <p class="text-gray-600">Javoblarni kiriting va test kodingizni oling</p> | |
| </div> | |
| <div id="auth-required-message" class="bg-yellow-50 border border-yellow-200 rounded-lg p-6 mb-8 hidden"> | |
| <div class="flex"> | |
| <div class="flex-shrink-0"> | |
| <i data-feather="alert-triangle" class="text-yellow-500 w-5 h-5"></i> | |
| </div> | |
| <div class="ml-3"> | |
| <h3 class="text-sm font-medium text-yellow-800">Avtorizatsiya talab qilinadi</h3> | |
| <div class="mt-2 text-sm text-yellow-700"> | |
| <p>Test yaratish uchun tizimga kirishingiz kerak.</p> | |
| </div> | |
| <div class="mt-4"> | |
| <button id="login-to-create-btn" class="btn btn-primary"> | |
| Kirish | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div id="test-form" class="bg-white rounded-xl shadow-lg p-6 hidden"> | |
| <div class="mb-8"> | |
| <h2 class="text-xl font-semibold text-gray-800 mb-4">Test Javoblari</h2> | |
| <!-- Tab Navigation --> | |
| <div class="flex border-b border-gray-200 mb-6"> | |
| <button class="tab-button py-2 px-4 font-medium text-blue-600 border-b-2 border-blue-600" data-tab="multiple-choice"> | |
| Tanlovli savollar | |
| </button> | |
| <button class="tab-button py-2 px-4 font-medium text-gray-500 hover:text-gray-700" data-tab="written"> | |
| Ochiq savollar | |
| </button> | |
| </div> | |
| <!-- Tab Content --> | |
| <div class="tab-content"> | |
| <!-- Multiple Choice Questions (1-35) --> | |
| <div id="multiple-choice-tab" class="tab-pane"> | |
| <!-- Questions 1-32 (ABCD) --> | |
| <div class="mb-8"> | |
| <h3 class="font-medium text-gray-700 mb-3">Savollar 1-32 (A, B, C, D variantlardan birini tanlang)</h3> | |
| <div class="grid grid-cols-2 sm:grid-cols-4 md:grid-cols-6 gap-3" id="q1-32-grid"><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">1</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="1" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="1" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="1" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="1" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">2</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="2" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="2" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="2" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="2" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">3</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="3" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="3" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="3" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="3" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">4</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="4" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="4" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="4" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="4" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">5</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="5" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="5" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="5" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="5" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">6</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="6" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="6" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="6" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="6" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">7</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="7" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="7" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="7" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="7" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">8</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="8" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="8" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="8" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="8" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">9</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="9" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="9" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="9" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="9" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">10</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="10" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="10" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="10" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="10" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">11</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="11" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="11" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="11" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="11" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">12</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="12" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="12" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="12" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="12" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">13</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="13" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="13" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="13" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="13" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">14</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="14" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="14" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="14" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="14" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">15</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="15" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="15" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="15" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="15" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">16</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="16" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="16" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="16" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="16" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">17</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="17" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="17" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="17" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="17" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">18</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="18" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="18" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="18" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="18" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">19</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="19" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="19" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="19" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="19" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">20</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="20" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="20" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="20" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="20" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">21</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="21" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="21" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="21" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="21" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">22</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="22" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="22" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="22" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="22" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">23</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="23" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="23" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="23" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="23" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">24</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="24" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="24" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="24" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="24" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">25</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="25" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="25" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="25" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="25" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">26</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="26" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="26" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="26" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="26" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">27</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="27" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="27" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="27" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="27" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">28</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="28" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="28" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="28" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="28" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">29</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="29" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="29" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="29" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="29" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">30</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="30" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="30" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="30" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="30" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">31</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="31" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="31" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="31" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="31" data-answer="D">D</button> | |
| </div> | |
| </div><div class="flex flex-col items-center"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">32</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="32" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="32" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="32" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="32" data-answer="D">D</button> | |
| </div> | |
| </div></div> | |
| </div> | |
| <!-- Questions 33-35 (ABCDEF) --> | |
| <div class="mb-8"> | |
| <h3 class="font-medium text-gray-700 mb-3">Savollar 33-35 (A, B, C, D, E, F variantlardan birini tanlang)</h3> | |
| <div class="grid grid-cols-1 sm:grid-cols-3 gap-3" id="q33-35-grid"><div class="flex flex-col"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">33</span> | |
| <div class="grid grid-cols-3 gap-2"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="33" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="33" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="33" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="33" data-answer="D">D</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="33" data-answer="E">E</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="33" data-answer="F">F</button> | |
| </div> | |
| </div><div class="flex flex-col"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">34</span> | |
| <div class="grid grid-cols-3 gap-2"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="34" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="34" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="34" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="34" data-answer="D">D</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="34" data-answer="E">E</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="34" data-answer="F">F</button> | |
| </div> | |
| </div><div class="flex flex-col"> | |
| <span class="text-sm font-medium text-gray-700 mb-2">35</span> | |
| <div class="grid grid-cols-3 gap-2"> | |
| <button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="35" data-answer="A">A</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="35" data-answer="B">B</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="35" data-answer="C">C</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="35" data-answer="D">D</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="35" data-answer="E">E</button><button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" data-question="35" data-answer="F">F</button> | |
| </div> | |
| </div></div> | |
| </div> | |
| </div> | |
| <!-- Written Answers (36-45) --> | |
| <div id="written-tab" class="tab-pane hidden"> | |
| <div> | |
| <h3 class="font-medium text-gray-700 mb-3">Savollar 36-45 (Javoblarni yozing)</h3> | |
| <div class="space-y-4" id="q36-45-inputs"><div class="flex items-center"> | |
| <span class="w-10 text-gray-700 font-medium">36.</span> | |
| <input type="text" class="flex-1 ml-2 border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Javobni kiriting" data-question="36"> | |
| </div><div class="flex items-center"> | |
| <span class="w-10 text-gray-700 font-medium">37.</span> | |
| <input type="text" class="flex-1 ml-2 border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Javobni kiriting" data-question="37"> | |
| </div><div class="flex items-center"> | |
| <span class="w-10 text-gray-700 font-medium">38.</span> | |
| <input type="text" class="flex-1 ml-2 border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Javobni kiriting" data-question="38"> | |
| </div><div class="flex items-center"> | |
| <span class="w-10 text-gray-700 font-medium">39.</span> | |
| <input type="text" class="flex-1 ml-2 border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Javobni kiriting" data-question="39"> | |
| </div><div class="flex items-center"> | |
| <span class="w-10 text-gray-700 font-medium">40.</span> | |
| <input type="text" class="flex-1 ml-2 border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Javobni kiriting" data-question="40"> | |
| </div><div class="flex items-center"> | |
| <span class="w-10 text-gray-700 font-medium">41.</span> | |
| <input type="text" class="flex-1 ml-2 border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Javobni kiriting" data-question="41"> | |
| </div><div class="flex items-center"> | |
| <span class="w-10 text-gray-700 font-medium">42.</span> | |
| <input type="text" class="flex-1 ml-2 border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Javobni kiriting" data-question="42"> | |
| </div><div class="flex items-center"> | |
| <span class="w-10 text-gray-700 font-medium">43.</span> | |
| <input type="text" class="flex-1 ml-2 border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Javobni kiriting" data-question="43"> | |
| </div><div class="flex items-center"> | |
| <span class="w-10 text-gray-700 font-medium">44.</span> | |
| <input type="text" class="flex-1 ml-2 border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Javobni kiriting" data-question="44"> | |
| </div><div class="flex items-center"> | |
| <span class="w-10 text-gray-700 font-medium">45.</span> | |
| <input type="text" class="flex-1 ml-2 border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" placeholder="Javobni kiriting" data-question="45"> | |
| </div></div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="flex flex-wrap gap-4"> | |
| <button id="generate-code-btn" class="bg-blue-600 hover:bg-blue-700 text-white font-medium py-3 px-6 rounded-lg transition-colors"> | |
| Test Kodini Yaratish | |
| </button> | |
| <button id="finish-test-btn" class="bg-red-600 hover:bg-red-700 text-white font-medium py-3 px-6 rounded-lg transition-colors hidden"> | |
| Testni Tugatish | |
| </button> | |
| </div> | |
| <div id="result-section" class="mt-8 hidden"> | |
| <div class="bg-green-50 border border-green-200 rounded-lg p-6"> | |
| <h3 class="text-xl font-semibold text-green-800 mb-2">Test Muvaffaqiyatli Yaratildi!</h3> | |
| <p class="text-green-700 mb-4">Test kodingiz:</p> | |
| <div class="text-4xl font-bold text-green-600 mb-4" id="test-code-display"></div> | |
| <p class="text-green-700">Bu kod orqali foydalanuvchilar testni ishlashi mumkin.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| <footer-component></footer-component> | |
| <auth-modal></auth-modal> | |
| <script src="components/header.js"></script> | |
| <script src="components/footer.js"></script> | |
| <script src="components/auth-modal.js"></script> | |
| <script src="script.js"></script> | |
| <script> | |
| feather.replace(); | |
| // Check if user is logged in | |
| const user = JSON.parse(localStorage.getItem('telegramUser')); | |
| const authMessage = document.getElementById('auth-required-message'); | |
| const testForm = document.getElementById('test-form'); | |
| const loginBtn = document.getElementById('login-to-create-btn'); | |
| if (!user) { | |
| authMessage.classList.remove('hidden'); | |
| testForm.classList.add('hidden'); | |
| loginBtn.addEventListener('click', () => { | |
| document.querySelector('auth-modal').openModal(); | |
| }); | |
| } else { | |
| authMessage.classList.add('hidden'); | |
| testForm.classList.remove('hidden'); | |
| // Initialize the test creation form | |
| initializeTestCreationForm(); | |
| } | |
| // Tab switching functionality | |
| document.querySelectorAll('.tab-button').forEach(button => { | |
| button.addEventListener('click', () => { | |
| // Remove active classes | |
| document.querySelectorAll('.tab-button').forEach(btn => { | |
| btn.classList.remove('text-blue-600', 'border-b-2', 'border-blue-600'); | |
| btn.classList.add('text-gray-500', 'hover:text-gray-700'); | |
| }); | |
| // Add active classes to clicked button | |
| button.classList.remove('text-gray-500', 'hover:text-gray-700'); | |
| button.classList.add('text-blue-600', 'border-b-2', 'border-blue-600'); | |
| // Hide all tab panes | |
| document.querySelectorAll('.tab-pane').forEach(pane => { | |
| pane.classList.add('hidden'); | |
| }); | |
| // Show the corresponding tab pane | |
| const tabId = button.getAttribute('data-tab'); | |
| document.getElementById(`${tabId}-tab`).classList.remove('hidden'); | |
| }); | |
| }); | |
| // Initialize the test creation form when user is authenticated | |
| function initializeTestCreationForm() { | |
| // Questions 1-32 (ABCD) | |
| const q1_32Grid = document.getElementById('q1-32-grid'); | |
| q1_32Grid.innerHTML = ''; | |
| for (let i = 1; i <= 32; i++) { | |
| const questionGroup = document.createElement('div'); | |
| questionGroup.className = 'flex flex-col items-center'; | |
| questionGroup.innerHTML = ` | |
| <span class="text-sm font-medium text-gray-700 mb-2">${i}</span> | |
| <div class="grid grid-cols-2 gap-2 w-full"> | |
| ${['A', 'B', 'C', 'D'].map(letter => | |
| `<button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" | |
| data-question="${i}" data-answer="${letter}">${letter}</button>` | |
| ).join('')} | |
| </div> | |
| `; | |
| q1_32Grid.appendChild(questionGroup); | |
| } | |
| // Questions 33-35 (ABCDEF) | |
| const q33_35Grid = document.getElementById('q33-35-grid'); | |
| q33_35Grid.innerHTML = ''; | |
| for (let i = 33; i <= 35; i++) { | |
| const questionGroup = document.createElement('div'); | |
| questionGroup.className = 'flex flex-col'; | |
| questionGroup.innerHTML = ` | |
| <span class="text-sm font-medium text-gray-700 mb-2">${i}</span> | |
| <div class="grid grid-cols-3 gap-2"> | |
| ${['A', 'B', 'C', 'D', 'E', 'F'].map(letter => | |
| `<button class="answer-btn py-2 px-3 text-sm rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors" | |
| data-question="${i}" data-answer="${letter}">${letter}</button>` | |
| ).join('')} | |
| </div> | |
| `; | |
| q33_35Grid.appendChild(questionGroup); | |
| } | |
| // Questions 36-45 (Written Answers) | |
| const q36_45Inputs = document.getElementById('q36-45-inputs'); | |
| q36_45Inputs.innerHTML = ''; | |
| for (let i = 36; i <= 45; i++) { | |
| const inputGroup = document.createElement('div'); | |
| inputGroup.className = 'flex items-center'; | |
| inputGroup.innerHTML = ` | |
| <span class="w-10 text-gray-700 font-medium">${i}.</span> | |
| <input type="text" | |
| class="flex-1 ml-2 border border-gray-300 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500" | |
| placeholder="Javobni kiriting" | |
| data-question="${i}"> | |
| `; | |
| q36_45Inputs.appendChild(inputGroup); | |
| } | |
| // Add event listeners for answer buttons | |
| document.querySelectorAll('.answer-btn').forEach(btn => { | |
| btn.addEventListener('click', function() { | |
| const question = this.dataset.question; | |
| const answer = this.dataset.answer; | |
| // Remove selected class from all buttons in this group | |
| this.parentElement.querySelectorAll('.answer-btn').forEach(b => { | |
| b.classList.remove('bg-blue-100', 'border-blue-500', 'text-blue-700'); | |
| b.classList.add('border-gray-300', 'text-gray-700'); | |
| }); | |
| // Add selected class to clicked button | |
| this.classList.remove('border-gray-300', 'text-gray-700'); | |
| this.classList.add('bg-blue-100', 'border-blue-500', 'text-blue-700'); | |
| // Store the answer | |
| window.testAnswers = window.testAnswers || {}; | |
| window.testAnswers[question] = answer; | |
| }); | |
| }); | |
| // Add event listeners for text inputs | |
| document.querySelectorAll('input[data-question]').forEach(input => { | |
| input.addEventListener('input', function() { | |
| const question = this.dataset.question; | |
| const answer = this.value.trim(); | |
| window.testAnswers = window.testAnswers || {}; | |
| window.testAnswers[question] = answer; | |
| }); | |
| }); | |
| // Generate code button | |
| document.getElementById('generate-code-btn').addEventListener('click', function() { | |
| // Validate that all questions have answers | |
| let isValid = true; | |
| for (let i = 1; i <= 45; i++) { | |
| if (!window.testAnswers || !window.testAnswers[i]) { | |
| isValid = false; | |
| break; | |
| } | |
| } | |
| if (!isValid) { | |
| alert('Iltimos, barcha savollarga javob bering!'); | |
| return; | |
| } | |
| // Generate test code | |
| const code = Math.floor(10 + Math.random() * 90).toString(); | |
| window.currentTestCode = code; | |
| // Save test to storage | |
| let userTests = JSON.parse(localStorage.getItem('userTests')) || []; | |
| const test = { | |
| code: code, | |
| answers: window.testAnswers, | |
| createdAt: new Date().toISOString(), | |
| isActive: true, | |
| participants: [] | |
| }; | |
| userTests.push(test); | |
| localStorage.setItem('userTests', JSON.stringify(userTests)); | |
| // Show result section | |
| document.getElementById('test-code-display').textContent = code; | |
| document.getElementById('result-section').classList.remove('hidden'); | |
| document.getElementById('finish-test-btn').classList.remove('hidden'); | |
| }); | |
| // Finish test button | |
| document.getElementById('finish-test-btn').addEventListener('click', function() { | |
| if (window.currentTestCode) { | |
| let userTests = JSON.parse(localStorage.getItem('userTests')) || []; | |
| const testIndex = userTests.findIndex(t => t.code === window.currentTestCode); | |
| if (testIndex !== -1) { | |
| userTests[testIndex].isActive = false; | |
| localStorage.setItem('userTests', JSON.stringify(userTests)); | |
| alert(`Test ${window.currentTestCode} muvaffaqiyatli tugatildi!`); | |
| // Reset form | |
| document.querySelectorAll('.answer-btn').forEach(btn => { | |
| btn.classList.remove('bg-blue-100', 'border-blue-500', 'text-blue-700'); | |
| btn.classList.add('border-gray-300', 'text-gray-700'); | |
| }); | |
| document.querySelectorAll('input[data-question]').forEach(input => { | |
| input.value = ''; | |
| }); | |
| document.getElementById('result-section').classList.add('hidden'); | |
| document.getElementById('finish-test-btn').classList.add('hidden'); | |
| window.testAnswers = {}; | |
| window.currentTestCode = null; | |
| } | |
| } | |
| }); | |
| } | |
| // Listen for auth state changes | |
| window.addEventListener('authStateChange', () => { | |
| const newUser = JSON.parse(localStorage.getItem('telegramUser')); | |
| if (newUser) { | |
| authMessage.classList.add('hidden'); | |
| testForm.classList.remove('hidden'); | |
| // Initialize the test creation form | |
| initializeTestCreationForm(); | |
| } else { | |
| authMessage.classList.remove('hidden'); | |
| testForm.classList.add('hidden'); | |
| } | |
| }); | |
| </script> | |
| </body> | |
| </html> | |