-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathreading_part1_old.html
More file actions
78 lines (69 loc) · 3.19 KB
/
reading_part1_old.html
File metadata and controls
78 lines (69 loc) · 3.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE html>
<html lang="vi">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Reading - Part 1</title>
<link rel="stylesheet" href="css/style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;700&display=swap" rel="stylesheet">
<link rel="icon" href="img/favicon.png" type="image/x-icon">
</head>
<body>
<header id="header-placeholder"></header>
<div class="content-pusher">
<div class="container">
<div class="page-intro">
<h1>Reading - Part 1</h1>
<p>Học thuộc các "Key" đáp án</p>
</div>
<div class="explanation-box">
<h3>💡 Phương pháp học Part 1</h3>
<p>Mỗi thẻ dưới đây là một bộ 5 đáp án đúng cho một bài đọc. Mục tiêu của bạn là học thuộc lòng chuỗi 5 từ này bằng cách sử dụng câu chuyện gợi nhớ đi kèm.</p>
</div>
<main id="key-container" class="key-grid">
<!-- Các Flashcard học key sẽ được chèn vào đây -->
</main>
</div>
<footer id="footer-placeholder"></footer>
</div>
<script src="js/main.js"></script>
<script src="js/data-reading-part1-old.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function () {
const keyContainer = document.getElementById('key-container');
const questions = readingPart1Data;
if (!questions || questions.length === 0) {
keyContainer.innerHTML = `<p class="error">Không có dữ liệu cho Part 1.</p>`;
return;
}
questions.forEach((item, index) => {
const card = document.createElement('div');
card.className = 'key-card';
let keyItems = '';
item.keys.forEach((key, i) => {
keyItems += `<li><span class="key-number">${i + 1}</span>${key}</li>`;
});
card.innerHTML = `
<h3>${item.title}</h3>
<ul class="key-list">${keyItems}</ul>
<button class="show-story-btn">Xem câu chuyện gợi nhớ</button>
<div class="story-section" style="display: none;">
<p>${item.story}</p>
</div>
`;
keyContainer.appendChild(card);
});
keyContainer.addEventListener('click', function(e) {
if (e.target.classList.contains('show-story-btn')) {
const storySection = e.target.nextElementSibling;
const isVisible = storySection.style.display === 'block';
storySection.style.display = isVisible ? 'none' : 'block';
e.target.textContent = isVisible ? 'Xem câu chuyện gợi nhớ' : 'Ẩn câu chuyện';
}
});
});
</script>
</body>
</html>