291 lines
15 KiB
HTML
291 lines
15 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="kk" data-theme="auto">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||
<title>ҰБТ: Қазақстан тарихы</title>
|
||
<link rel="stylesheet" href="design-system/kt-ai-fonts.css">
|
||
<link rel="stylesheet" href="design-system/kt-ai-tokens.css">
|
||
<link rel="stylesheet" href="design-system/kt-ai-components.css">
|
||
<link rel="stylesheet" href="design-system/kt-ai-page.css">
|
||
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🇰🇿</text></svg>">
|
||
<style>
|
||
.kt-ai-hero { background: linear-gradient(135deg, var(--kt-ai-bg-soft) 0%, var(--kt-ai-bg) 100%); }
|
||
.question-card { margin-bottom: var(--kt-ai-space-6); }
|
||
.options-grid { display: grid; gap: var(--kt-ai-space-3); margin-top: var(--kt-ai-space-5); }
|
||
.option-btn { text-align: left; justify-content: flex-start; padding-left: var(--kt-ai-space-4); }
|
||
.option-btn::before { content: ''; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--kt-ai-fg-muted); margin-right: var(--kt-ai-space-3); flex-shrink: 0; display: inline-block; vertical-align: middle; }
|
||
.option-btn[data-selected="true"]::before { background: var(--kt-ai-primary); border-color: var(--kt-ai-primary); }
|
||
.score-display { font-size: var(--kt-ai-text-3xl); font-weight: var(--kt-ai-weight-bold); color: var(--kt-ai-primary); margin: var(--kt-ai-space-6) 0; }
|
||
.progress-bar { height: 8px; background: var(--kt-ai-bg-soft); border-radius: var(--kt-ai-radius-full); overflow: hidden; margin-bottom: var(--kt-ai-space-5); }
|
||
.progress-fill { height: 100%; background: var(--kt-ai-primary); transition: width 0.3s ease; }
|
||
.hidden { display: none; }
|
||
.fade-in { animation: fadeIn 0.4s ease; }
|
||
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
|
||
.timer-badge { display: inline-flex; align-items: center; gap: var(--kt-ai-space-2); padding: var(--kt-ai-space-2) var(--kt-ai-space-4); background: var(--kt-ai-bg-soft); border-radius: var(--kt-ai-radius-lg); font-weight: var(--kt-ai-weight-semibold); }
|
||
.timer-badge.warning { background: #fef3c7; color: #92400e; }
|
||
.timer-badge.danger { background: #fee2e2; color: #991b1b; }
|
||
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--kt-ai-space-4); margin-bottom: var(--kt-ai-space-6); }
|
||
.stat-card { text-align: center; padding: var(--kt-ai-space-4); background: var(--kt-ai-bg-soft); border-radius: var(--kt-ai-radius-xl); }
|
||
.stat-value { font-size: var(--kt-ai-text-2xl); font-weight: var(--kt-ai-weight-bold); color: var(--kt-ai-primary); }
|
||
.stat-label { font-size: var(--kt-ai-text-sm); color: var(--kt-ai-fg-muted); }
|
||
</style>
|
||
</head>
|
||
<body>
|
||
|
||
<header class="kt-ai-pagehead">
|
||
<div class="kt-ai-wrap kt-ai-pagehead-in">
|
||
<strong>🇰🇿 ҰБТ: Қазақстан тарихы</strong>
|
||
<span class="kt-ai-spacer"></span>
|
||
<button class="kt-ai-btn" data-variant="ghost" onclick="showStartScreen()">Қайта бастау</button>
|
||
</div>
|
||
</header>
|
||
|
||
<section class="kt-ai-hero" data-align="center">
|
||
<div class="kt-ai-wrap">
|
||
<h1>Қазақстан тарихынан ҰБТ-ға дайындық</h1>
|
||
<p class="kt-ai-hero-sub">Біліміңді тексер және ҰБТ-ға жақсылап дайындал</p>
|
||
<div class="kt-ai-hero-actions">
|
||
<button class="kt-ai-btn" data-variant="primary" data-size="lg" onclick="startQuiz()">Тестілеуді бастау</button>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<section id="quiz-section" class="kt-ai-section hidden">
|
||
<div class="kt-ai-wrap" data-width="narrow">
|
||
<div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--kt-ai-space-4);">
|
||
<div class="timer-badge" id="timer">
|
||
⏱️ <span id="timer-value">00:00</span>
|
||
</div>
|
||
<div style="color: var(--kt-ai-fg-muted);">Сұрақ <span id="q-current">1</span> / <span id="q-total">20</span></div>
|
||
</div>
|
||
|
||
<div class="progress-bar">
|
||
<div class="progress-fill" id="progress"></div>
|
||
</div>
|
||
|
||
<div class="kt-ai-card question-card fade-in">
|
||
<h2 id="question-text" style="margin-bottom: var(--kt-ai-space-5); font-size: var(--kt-ai-text-xl);">Сұрақ мәтіні</h2>
|
||
<div class="options-grid" id="options-container"></div>
|
||
</div>
|
||
|
||
<div style="display: flex; gap: var(--kt-ai-space-3); justify-content: space-between; margin-top: var(--kt-ai-space-6);">
|
||
<button class="kt-ai-btn" data-variant="ghost" id="prev-btn" onclick="prevQuestion()">← Артқа</button>
|
||
<button class="kt-ai-btn" data-variant="primary" id="next-btn" onclick="nextQuestion()">Алға →</button>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<section id="result-section" class="kt-ai-section hidden">
|
||
<div class="kt-ai-wrap" data-width="narrow">
|
||
<div class="kt-ai-card" style="text-align: center">
|
||
<h2>Тестілеу аяқталды!</h2>
|
||
<div class="stats-grid">
|
||
<div class="stat-card">
|
||
<div class="stat-value" id="correct-count">0</div>
|
||
<div class="stat-label">Дұрыс жауап</div>
|
||
</div>
|
||
<div class="stat-card">
|
||
<div class="stat-value" id="wrong-count">0</div>
|
||
<div class="stat-label">Қате жауап</div>
|
||
</div>
|
||
<div class="stat-card">
|
||
<div class="stat-value" id="percentage">0%</div>
|
||
<div class="stat-label">Нәтиже</div>
|
||
</div>
|
||
</div>
|
||
<div class="score-display" id="score">0 / 20</div>
|
||
<p id="score-message" style="color: var(--kt-ai-fg-muted); margin-bottom: var(--kt-ai-space-6); font-size: var(--kt-ai-text-lg);"></p>
|
||
|
||
<div class="kt-ai-hero-actions">
|
||
<button class="kt-ai-btn" data-variant="primary" data-size="lg" onclick="showStartScreen()">Қайта тапсыру</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<footer class="kt-ai-wrap kt-ai-pagefoot">
|
||
<span>© 2026 ҰБТ: Қазақстан тарихы</span>
|
||
<span class="kt-ai-spacer"></span>
|
||
<span>Сәттілік тілейміз!</span>
|
||
</footer>
|
||
|
||
<script>
|
||
const QUESTIONS = [
|
||
{ q: "Қазақ хандығы қай жылы құрылды?", options: ["1465 жыл", "1456 жыл", "1500 жыл", "1480 жыл"], correct: 0 },
|
||
{ q: "Қазақ хандығының негізін қалағандар?", options: ["Абылай хан", "Керей мен Жәнібек", "Тәуке хан", "Қасым хан"], correct: 1 },
|
||
{ q: "«Тіл туралы» заң қай жылы қабылданды?", options: ["1989 жыл", "1991 жыл", "1986 жыл", "1995 жыл"], correct: 0 },
|
||
{ q: "Қазақ КСР Ғылым Академиясының тұңғыш президенті кім?", options: ["Қ. Сәтпаев", "Ә. Марғұлан", "М. Әуезов", "Ж. Шашкин"], correct: 0 },
|
||
{ q: "Қазақстан қай жылы тәуелсіздік алды?", options: ["1991 жыл, 16 желтоқсан", "1990 жыл, 25 қазан", "1993 жыл, 1 қаңтар", "1986 жыл, 17 желтоқсан"], correct: 0 },
|
||
{ q: "1836-1838 жылдардағы көтерілісті кім басқарды?", options: ["Кенесары Қасымұлы", "Исатай Тайманұлы", "Сырым Датұлы", "Махамбет Өтемісұлы"], correct: 1 },
|
||
{ q: "Қазақ АКСР-і қай жылы құрылды?", options: ["1920 жыл", "1925 жыл", "1936 жыл", "1917 жыл"], correct: 0 },
|
||
{ q: "«Абай жолы» романының авторы кім?", options: ["М. Әуезов", "А. Байтұрсынұлы", "Ж. Аймауытов", "С. Сейфуллин"], correct: 0 },
|
||
{ q: "Желтоқсан оқиғасы қай жылы болды?", options: ["1986 жыл", "1989 жыл", "1991 жыл", "1985 жыл"], correct: 0 },
|
||
{ q: "Соңғы қазақ ханы кім?", options: ["Кенесары Қасымұлы", "Абылай хан", "Бөкей хан", "Шерғазы хан"], correct: 0 },
|
||
{ q: "Қазақстан астанасын қай жылы көшірді?", options: ["1997 жыл", "1991 жыл", "2000 жыл", "1995 жыл"], correct: 0 },
|
||
{ q: "Қазақстан әнұранының авторлары кімдер?", options: ["Ж. Нәжімеденов, Н. Назарбаев", "М. Әуезов", "А. Байтұрсынұлы", "Ж. Молдағалиев"], correct: 0 },
|
||
{ q: "Ұлттық валюта – теңге қай жылы енгізілді?", options: ["1993 жыл", "1991 жыл", "1995 жыл", "1999 жыл"], correct: 0 },
|
||
{ q: "Тәуелсіз Қазақстанның тұңғыш ғарышкері кім?", options: ["Т. Әубәкіров", "Т. Мұсабаев", "А. Айымбетов", "Ю. Гагарин"], correct: 0 },
|
||
{ q: "Қазақстан Республикасының Конституциясы қай жылы қабылданды?", options: ["1995 жыл", "1993 жыл", "1991 жыл", "2000 жыл"], correct: 0 },
|
||
{ q: "Алматы қаласын (Верный) кім негізінде қалады?", options: ["Қазақ хандығы", "Ресей империясы (1854)", "Алтын Орда", "Моғолстан"], correct: 1 },
|
||
{ q: "Сырым Датұлы бастаған көтеріліс қай жылдары болды?", options: ["1783-1797 жылдар", "1836-1838 жылдар", "1916 жыл", "1773-1775 жылдар"], correct: 0 },
|
||
{ q: "Әл-Фараби кім?", options: ["Ұлы философ және ғалым", "Қазақ ханы", "Батыр", "Ақын"], correct: 0 },
|
||
{ q: "Қазақстан ОБСЕ-ге төрағалық еткен жыл?", options: ["2010 жыл", "2005 жыл", "2015 жыл", "2000 жыл"], correct: 0 },
|
||
{ q: "«Қазақстан жолы» кітабының авторы кім?", options: ["Н. Назарбаев", "М. Әуезов", "А. Байтұрсынұлы", "Ж. Аймауытов"], correct: 0 }
|
||
];
|
||
|
||
let currentQuestion = 0;
|
||
let answers = {};
|
||
let quizStarted = false;
|
||
let timerInterval = null;
|
||
let seconds = 0;
|
||
|
||
function showStartScreen() {
|
||
document.getElementById('quiz-section').classList.add('hidden');
|
||
document.getElementById('result-section').classList.add('hidden');
|
||
document.querySelector('.kt-ai-hero').classList.remove('hidden');
|
||
quizStarted = false;
|
||
stopTimer();
|
||
}
|
||
|
||
function startTimer() {
|
||
seconds = 0;
|
||
timerInterval = setInterval(() => {
|
||
seconds++;
|
||
const mins = Math.floor(seconds / 60);
|
||
const secs = seconds % 60;
|
||
document.getElementById('timer-value').textContent =
|
||
(mins < 10 ? '0' : '') + mins + ':' + (secs < 10 ? '0' : '') + secs;
|
||
|
||
const badge = document.getElementById('timer');
|
||
if (seconds > 600) {
|
||
badge.className = 'timer-badge danger';
|
||
} else if (seconds > 300) {
|
||
badge.className = 'timer-badge warning';
|
||
}
|
||
}, 1000);
|
||
}
|
||
|
||
function stopTimer() {
|
||
if (timerInterval) {
|
||
clearInterval(timerInterval);
|
||
timerInterval = null;
|
||
}
|
||
document.getElementById('timer').className = 'timer-badge';
|
||
}
|
||
|
||
function startQuiz() {
|
||
document.querySelector('.kt-ai-hero').classList.add('hidden');
|
||
document.getElementById('result-section').classList.add('hidden');
|
||
document.getElementById('quiz-section').classList.remove('hidden');
|
||
quizStarted = true;
|
||
currentQuestion = 0;
|
||
answers = {};
|
||
seconds = 0;
|
||
startTimer();
|
||
document.getElementById('q-total').textContent = QUESTIONS.length;
|
||
showQuestion();
|
||
}
|
||
|
||
function showQuestion() {
|
||
const q = QUESTIONS[currentQuestion];
|
||
document.getElementById('q-current').textContent = currentQuestion + 1;
|
||
document.getElementById('question-text').textContent = q.q;
|
||
|
||
const container = document.getElementById('options-container');
|
||
container.innerHTML = '';
|
||
|
||
const letters = ['A', 'B', 'C', 'D'];
|
||
q.options.forEach((opt, i) => {
|
||
const btn = document.createElement('button');
|
||
btn.className = 'kt-ai-btn option-btn';
|
||
btn.setAttribute('data-selected', answers[currentQuestion] === i);
|
||
btn.innerHTML = `<span style="font-weight: bold; margin-right: 8px;">${letters[i]})</span> ${opt}`;
|
||
btn.onclick = () => selectAnswer(i);
|
||
if (answers[currentQuestion] === i) {
|
||
btn.style.borderColor = 'var(--kt-ai-primary)';
|
||
btn.style.background = 'var(--kt-ai-bg-soft)';
|
||
} else {
|
||
btn.style.borderColor = 'var(--kt-ai-border)';
|
||
btn.style.background = 'var(--kt-ai-card-bg)';
|
||
}
|
||
container.appendChild(btn);
|
||
});
|
||
|
||
updateProgress();
|
||
updateButtons();
|
||
}
|
||
|
||
function selectAnswer(index) {
|
||
answers[currentQuestion] = index;
|
||
showQuestion();
|
||
}
|
||
|
||
function nextQuestion() {
|
||
if (currentQuestion < QUESTIONS.length - 1) {
|
||
currentQuestion++;
|
||
showQuestion();
|
||
} else {
|
||
showResults();
|
||
}
|
||
}
|
||
|
||
function prevQuestion() {
|
||
if (currentQuestion > 0) {
|
||
currentQuestion--;
|
||
showQuestion();
|
||
}
|
||
}
|
||
|
||
function updateProgress() {
|
||
const progress = ((currentQuestion + 1) / QUESTIONS.length) * 100;
|
||
document.getElementById('progress').style.width = progress + '%';
|
||
}
|
||
|
||
function updateButtons() {
|
||
document.getElementById('prev-btn').style.visibility = currentQuestion === 0 ? 'hidden' : 'visible';
|
||
const nextBtn = document.getElementById('next-btn');
|
||
nextBtn.textContent = currentQuestion === QUESTIONS.length - 1 ? 'Аяқтау' : 'Алға →';
|
||
}
|
||
|
||
function showResults() {
|
||
stopTimer();
|
||
|
||
let correct = 0;
|
||
let wrong = 0;
|
||
QUESTIONS.forEach((q, i) => {
|
||
if (answers[i] === q.correct) {
|
||
correct++;
|
||
} else {
|
||
wrong++;
|
||
}
|
||
});
|
||
|
||
const percentage = Math.round((correct / QUESTIONS.length) * 100);
|
||
|
||
document.getElementById('quiz-section').classList.add('hidden');
|
||
document.getElementById('result-section').classList.remove('hidden');
|
||
document.getElementById('correct-count').textContent = correct;
|
||
document.getElementById('wrong-count').textContent = wrong;
|
||
document.getElementById('percentage').textContent = percentage + '%';
|
||
document.getElementById('score').textContent = `${correct} / ${QUESTIONS.length}`;
|
||
|
||
let message = '';
|
||
if (percentage >= 90) message = 'Өте жақсы! ҰБТ-ға дайынсың 🎉';
|
||
else if (percentage >= 70) message = 'Жақсы нәтиже! 👍';
|
||
else if (percentage >= 50) message = 'Жаман емес, бірақ жақсартуға болады 👌';
|
||
else message = 'Әлі де дайындалу керек 📚';
|
||
|
||
document.getElementById('score-message').textContent = message + ` | Уақыт: ${document.getElementById('timer-value').textContent}`;
|
||
}
|
||
|
||
document.addEventListener('keydown', (e) => {
|
||
if (!quizStarted) return;
|
||
if (e.key === 'ArrowRight' || e.key === ' ') nextQuestion();
|
||
if (e.key === 'ArrowLeft') prevQuestion();
|
||
});
|
||
</script>
|
||
|
||
</body>
|
||
</html>
|