-
Notifications
You must be signed in to change notification settings - Fork 0
/
hihihi.html
238 lines (207 loc) · 7.76 KB
/
hihihi.html
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Story Style Layout</title>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
<script>
function includeHTML() {
var z, i, elmnt, file, xhttp, basepath;
z = document.getElementsByTagName("*");
for (i = 0; i < z.length; i++) {
elmnt = z[i];
file = elmnt.getAttribute("include-html");
basepath = elmnt.getAttribute("data-basepath");
if (file) {
if (basepath) {
file = basepath + file;
}
xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4) {
if (this.status == 200) {elmnt.innerHTML = this.responseText;}
if (this.status == 404) {elmnt.innerHTML = "Page not found.";}
elmnt.removeAttribute("include-html");
includeHTML();
}
}
xhttp.open("GET", file, true);
xhttp.send();
return;
}
}
}
</script>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
main {
font-family: 'Poppins', sans-serif;
background-color: #f7f7f7;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
overflow: hidden;
}
.story-container {
width: 80%;
max-width: 900px;
height: 500px;
position: relative;
background: #fff;
border-radius: 15px;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
overflow: hidden;
display: flex;
justify-content: space-between;
align-items: center;
}
.story-content {
padding: 20px;
text-align: center;
}
.story-content h2 {
font-size: 2rem;
color: #333;
margin-bottom: 10px;
}
.story-content p {
font-size: 1rem;
color: #666;
}
.story-content img {
margin-top: 15px;
width: 55%;
min-width: 400px;
min-height: 300px;
border-radius: 10px;
}
.story-slide {
display: none;
position: absolute;
top: 0;
left: 100%; /* Để các slide ẩn ra khỏi màn hình */
width: 100%;
height: 100%;
transition: all 0.5s ease-in-out;
}
.story-slide.active {
left: 0;
display: block; /* Hiển thị slide đang active */
}
.story-container .nav-button {
position: absolute;
top: 50%;
transform: translateY(-50%);
background-color: rgba(0, 0, 0, 0.5);
color: white;
border: none;
padding: 10px 20px;
cursor: pointer;
font-size: 2rem;
border-radius: 50%;
transition: background-color 0.3s ease;
}
.nav-button {
padding: 10px 15px; /* Điều chỉnh padding cho nút */
font-size: 1.5rem; /* Giảm kích thước font chữ cho nút điều hướng */
}
.left-btn {
left: 10px; /* Đảm bảo nút điều hướng bên trái không bị mất trên màn hình nhỏ */
}
.right-btn {
right: 10px; /* Đảm bảo nút điều hướng bên phải hiển thị đúng */
}
.story-container.nav-button:hover {
background-color: rgba(0, 0, 0, 0.8);
}
@media (max-width: 768px) {
main {
height: auto;
overflow-y: auto;
}
.story-container {
width: 95%;
height: auto;
flex-direction: column;
}
.story-content h2 {
font-size: 1.5rem; /* Giảm kích thước tiêu đề */
}
.story-content p {
font-size: 0.9rem; /* Giảm kích thước đoạn văn */
}
.story-content img {
width: 55%;
min-width: 400px;
min-height: 300px;
max-width: none;
height: auto;
min-width: unset; /* Đặt lại giá trị để không ép buộc kích thước tối thiểu */
}
.nav-button {
padding: 8px 16px; /* Giảm kích thước nút điều hướng */
font-size: 1.5rem;
}
}
</style>
</head>
<body onload="includeHTML()">
<div include-html="view/header.html" data-basepath="../"></div>
<main>
<div class="story-container">
<button class="nav-button left-btn" id="prevBtn">❮</button>
<div class="story-slide active">
<div class="story-content">
<h2>Hello guys!</h2>
<p>For a moment, i thought that i'd give up!</p>
<img src="./public/img/hihihi/1.png" alt="Story Image 1">
</div>
</div>
<div class="story-slide">
<div class="story-content">
<h2>Don't give up!</h2>
<p>But then I realized that every challenge is a chance to grow...</p>
<img src="./public/img/hihihi/2.png" alt="Story Image 2">
</div>
</div>
<div class="story-slide">
<div class="story-content">
<h2>Go ahead, my buddy!</h2>
<p>...and you're stronger than you think</p>
<img src="./public/img/hihihi/3.png" alt="Story Image 3">
</div>
</div>
<div class="story-slide">
<div class="story-content">
<h2>Believe in yourself!</h2>
<p>Keep pushing forward—you're doing great, even when it feels tough!</p>
<img src="./public/img/hihihi/4.png" alt="Story Image 4">
</div>
</div>
<div class="story-slide">
<div class="story-content">
<h2>Will we meet again? <a class="nav-link" href="https://github.com/ImThienz">Don't forget me</a></h2>
<p>Stay determined, you'll reach your goals!</p>
<img src="./public/img/hihihi/5.png" alt="Story Image 5">
</div>
</div>
<!-- Nút điều hướng phải -->
<button class="nav-button right-btn" id="nextBtn">❯</button>
</div>
</main>
<div include-html="view/footer.html" data-basepath="../"></div>
<script src="public/js/news-1.11.0.min.js"></script>
<script src="public/js/news-migrate-1.2.1.min.js"></script>
<script src="public/js/bootstrap.bundle.min.js"></script>
<script src="public/js/templatemo.js"></script>
<script src="public/js/custom.js"></script>
<script src="script.js"></script>
</body>
</html>