Skip to content

Commit 95933d3

Browse files
feat: added lab animation
1 parent d03f712 commit 95933d3

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

assets/images/lab-ol-h1.webp

494 KB
Loading

assets/images/lab-ol-h2.webp

521 KB
Loading

index.html

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@
8787
"
8888
>
8989
<img
90-
src="assets/images/lab-ol-h.webp"
90+
id="labImage"
91+
src="assets/images/lab-ol-h1.webp"
9192
alt="lab background"
9293
class="lab-bg"
9394
style="
@@ -125,6 +126,22 @@
125126
/>
126127
</div>
127128

129+
<script>
130+
const images = [
131+
"assets/images/lab-ol-h1.webp",
132+
"assets/images/lab-ol-h2.webp"
133+
];
134+
135+
let index = 0;
136+
const img = document.getElementById("labImage");
137+
138+
setInterval(() => {
139+
index = (index + 1) % images.length;
140+
img.src = images[index];
141+
}, 1000);
142+
</script>
143+
144+
128145
<section id="about">
129146
<div class="about-container">
130147
<div class="about-text">

0 commit comments

Comments
 (0)