-
Notifications
You must be signed in to change notification settings - Fork 0
/
Untitled-1.html
344 lines (305 loc) · 11.2 KB
/
Untitled-1.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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap TEST</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" crossorigin="anonymous"/>
<style>
#backToTop {
position: fixed;
bottom: 5px;
right: 20px;
display: none;
cursor: pointer;
}
.collapsed-col img {
width: 40px; /* Adjust the size as needed */
border-radius: 50%;
margin: 10px;
}
.collapsed-col .text-center,
.collapsed-col .nav-pills {
display: none;
}
/* Add styling for the button that triggers the collapse */
#collapseButton,
#uncollapseButton {
position: fixed;
top: 10px;
right: 10px;
z-index: 1000;
cursor: pointer;
background-color: #007bff;
color: #fff;
border: none;
padding: 8px 16px;
border-radius: 4px;
}
#collapseButton:hover,
#uncollapseButton:hover {
background-color: #0056b3;
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-sm ">
<a class="logo-text" href="#">Halim | <span>Design</span></a>
<a href=""><img src="img/22.png" class="logo" href="#"></a>
<ul class="navbar-nav">
<li class="nav-item">
<a href="index.html" class="nav-link active">Home</a>
</li>
<li class="nav-item">
<a href="about.html" class="nav-link ">About</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link ">Page</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link ">Page</a>
</li>
</ul>
</nav>
<div class="ado text-white text-center">
<h1 id="dynamicH1">This is Bootstrap test</h1>
<p>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Amet aperiam maiores ab delectus molestiae
quisquam sed esse illum pariatur sequi possimus ad cumque vero, autem adipisci nam odit quia architecto.</p>
<button class="btn btn-primary">Click here</button>
</div>
<!-- Add a button to trigger the collapse -->
<button id="collapseButton" class="btn" data-bs-toggle="collapse" data-bs-target="#collapsibleColumn">▲ Collapse</button>
<!-- Add a button to manually uncollapse -->
<button id="uncollapseButton" class="btn d-none" data-bs-toggle="collapse" data-bs-target="#collapsibleColumn">◀ Uncollapse</button>
<!-- Rest of your HTML code -->
<div class="container-fluid mt-5">
<div class="row">
<div class="col-sm-3 collapse collapse-col" id="collapsibleColumn">
<h1 class="text-center">This is Test</h1>
<h5 class="text-center">Photo Of me</h5>
<div class="fakeimg mb-3"><img src="img/1.png" class="img-circle"></div>
<ul class="nav nav-pills flex-column">
<li class="nav-item">
<a href="index.html" class="nav-link active">Home</a>
</li>
<li class="nav-item">
<a href="about.html" class="nav-link ">Page</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link ">Page</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link ">Page</a>
</li>
</ul>
</div>
<div class="col-sm-9">
<div class="thumbnail-container">
<a href="#" data-bs-toggle="modal" data-bs-target="#imageModal" data-img-src="img/1.png">
<img src="img/1.png" class="img-responsive img-thumbnail">
<div class="hide">Hi</div>
</a>
</div>
</div>
</div>
</div>
<hr class="end">
<footer class="text-center text-white" style="background-color: #f1f1f1;">
<!-- Grid container -->
<div class="container">
<!-- Section: Social media -->
<section class="mb-1">
<!-- Facebook -->
<a
class="btn btn-link btn-floating btn-lg text-dark m-1"
href="#!"
role="button"
data-mdb-ripple-color="dark"
><i class="fab fa-facebook-f"></i
></a>
<!-- Twitter -->
<a
class="btn btn-link btn-floating btn-lg text-dark m-1"
href="#!"
role="button"
data-mdb-ripple-color="dark"
><i class="fab fa-twitter"></i
></a>
<!-- Google -->
<a
class="btn btn-link btn-floating btn-lg text-dark m-1"
href="#!"
role="button"
data-mdb-ripple-color="dark"
><i class="fab fa-google"></i
></a>
<!-- Instagram -->
<a
class="btn btn-link btn-floating btn-lg text-dark m-1"
href="#!"
role="button"
data-mdb-ripple-color="dark"
><i class="fab fa-instagram"></i
></a>
<!-- Linkedin -->
<a
class="btn btn-link btn-floating btn-lg text-dark m-1"
href="#!"
role="button"
data-mdb-ripple-color="dark"
><i class="fab fa-linkedin"></i
></a>
<!-- Github -->
<a
class="btn btn-link btn-floating btn-lg text-dark m-1"
href="#!"
role="button"
data-mdb-ripple-color="dark"
><i class="fab fa-github"></i
></a>
</section>
<!-- Section: Social media -->
</div>
<!-- Back to top arrow -->
<a id="backToTop" class="arrow" onclick="scrollToTop()">
<i class="fas fa-arrow-up"></i>
</a>
<!-- Grid container -->
<nav class="navbar navbar-expand-sm ">
<ul class="navbar-nav">
<li class="nav-item">
<a href="#" class="nav-link active">Home</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link ">Page</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link ">Page</a>
</li>
<li class="nav-item">
<a href="#" class="nav-link ">Page</a>
</li>
</ul>
</nav>
<!-- Copyright -->
<div class="footer-end text-center text-dark p-1">
All Right Reserver Copyright © 2023 |
<a class="text-dark" href="#">Joseph</a>
</div>
<!-- Copyright -->
</footer>
<!-- Image Modal -->
<div class="modal fade" id="imageModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered">
<div class="modal-content">
<div class="modal-body d-flex">
<div class="image-container">
<img id="modalImage" class="img-fluid" alt="Modal Image">
</div>
<div class="info-container">
<h5>Image Title</h5>
<p>Image Description Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
<p>Author: John Doe</p>
<!-- Add any other information you want to display -->
</div>
</div>
</div>
</div>
</div>
</body>
<script>
const dynamicH1 = document.getElementById('dynamicH1');
const words = ['This Is Halim', 'Can You Imagin it!'];
let currentIndex = 0;
let currentWord = words[currentIndex];
let letterIndex = 0;
function typeText() {
dynamicH1.textContent = currentWord.slice(0, letterIndex);
letterIndex++;
if (letterIndex > currentWord.length) {
letterIndex = 0;
currentIndex = (currentIndex + 1) % words.length;
currentWord = words[currentIndex];
dynamicH1.classList.add('hidden');
setTimeout(() => {
dynamicH1.classList.remove('hidden');
typeText();
}, 5000); // Adjust the timeout for the pause between words
} else {
setTimeout(typeText, 100); // Adjust the timeout for the typing speed
}
}
// Start typing animation after a delay to ensure proper initialization
setTimeout(() => {
typeText();
}, 500);
window.onscroll = function () {
scrollFunction();
};
// Back to top arrow
function scrollToTop() {
window.scrollTo({ top: 0, behavior: 'smooth' });
}
// Show/hide back to top arrow based on scroll position
window.addEventListener('scroll', () => {
const backToTop = document.getElementById('backToTop');
if (document.body.scrollTop > 40 || document.documentElement.scrollTop > 40) {
backToTop.style.display = 'block';
} else {
backToTop.style.display = 'none';
}
});
// Show image in modal with additional information
const modalImage = document.getElementById('modalImage');
const infoContainer = document.querySelector('.info-container');
const imageModal = new bootstrap.Modal(document.getElementById('imageModal'));
document.querySelectorAll('.thumbnail-container a').forEach((thumbnail) => {
thumbnail.addEventListener('click', (event) => {
event.preventDefault();
const imgSrc = thumbnail.querySelector('img').src;
const imgAlt = thumbnail.querySelector('img').alt;
modalImage.src = imgSrc;
modalImage.alt = imgAlt;
// Set additional information (replace with actual data)
const title = 'Image Title';
const description = 'Image Description Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
const author = 'Author: John Doe';
infoContainer.innerHTML = `
<h5>${title}</h5>
<p>${description}</p>
<p>${author}</p>
<!-- Add any other information you want to display -->
`;
imageModal.show();
});
});
// ... (rest of your script)
const col = document.getElementById('collapsibleColumn');
const collapseButton = document.getElementById('collapseButton');
const uncollapseButton = document.getElementById('uncollapseButton');
collapseButton.addEventListener('click', function () {
col.classList.add('collapsed-col');
collapseButton.classList.add('d-none');
uncollapseButton.classList.remove('d-none');
});
uncollapseButton.addEventListener('click', function () {
col.classList.remove('collapsed-col');
collapseButton.classList.remove('d-none');
uncollapseButton.classList.add('d-none');
});
window.addEventListener('scroll', function () {
if (window.scrollY > 100) {
col.classList.add('collapsed-col');
collapseButton.classList.add('d-none');
uncollapseButton.classList.remove('d-none');
} else {
col.classList.remove('collapsed-col');
collapseButton.classList.remove('d-none');
uncollapseButton.classList.add('d-none');
}
});
</script>
</html>