Skip to content

Commit dbd1d1a

Browse files
committed
stack image????
1 parent 851df00 commit dbd1d1a

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

_includes/team-showcase.html

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<section class="hero is-halfheight has-text-left" id="team-showcase">
2-
<figure class="hero-background" id="rotating-image" style="background-size: cover; background-position: center;">
2+
<figure class="hero-background" style="background-image: url(https://raw.githubusercontent.com/CabrilloRoboticsClub/cabrillorobotics.github.io/41309abdbb5d93dbc6c0119bf8f97a3bb38ad743/assets/images/seahawk-II/gallery-seahawk-II/interview.webp);" id="rotating-image">
33
<div class="overlay">
4-
<div class="container is-centered">
4+
<div class="container is-lower-left">
55
<div class="title-text">
66
<h1 class="title has-text-white-ter is-size-1 is-uppercase has-text-weight-bold">
77
Our Team
@@ -11,7 +11,7 @@ <h1 class="title has-text-white-ter is-size-1 is-uppercase has-text-weight-bold"
1111
</div>
1212
</figure>
1313
</section>
14-
14+
<!--
1515
<script>
1616
document.addEventListener('DOMContentLoaded', function() {
1717
const images = [
@@ -21,18 +21,16 @@ <h1 class="title has-text-white-ter is-size-1 is-uppercase has-text-weight-bold"
2121
"https://raw.githubusercontent.com/CabrilloRoboticsClub/cabrillorobotics.github.io/782b579c031c16835e0fee2b57a22246c1a79618/assets/images/seahawk-II/gallery-seahawk-II/product-demo-pilot-2.webp"
2222
];
2323
24-
let currentIndex = 0;
25-
const imageElement = document.getElementById('rotating-image');
26-
27-
function rotateImage() {
28-
imageElement.style.backgroundImage = `url(${images[currentIndex]})`;
29-
currentIndex = (currentIndex + 1) % images.length;
24+
var image_element = document.getElementById("rotating-image");
25+
let i = 0;
26+
27+
function rotate() {
28+
var new_style = "background-image: url('" + images[i] + "');";
29+
image_element.setAttribute("style", new_style);
30+
i = (i + 1) % images.length;
3031
}
3132
32-
// Set the initial image
33-
rotateImage();
34-
35-
// Rotate the image every 5 seconds
36-
setInterval(rotateImage, 5000);
33+
rotate();
34+
setInterval(rotate, 5000);
3735
});
38-
</script>
36+
</script> -->

0 commit comments

Comments
 (0)