1
1
< section class ="hero is-halfheight has-text-left " id ="team-showcase ">
2
- < figure class ="hero-background " id ="rotating-image ">
2
+ < figure class ="hero-background " id ="rotating-image " style =" background-size: cover; background-position: center; " >
3
3
< div class ="overlay ">
4
4
< div class ="container is-centered ">
5
5
< div class ="title-text ">
@@ -15,24 +15,24 @@ <h1 class="title has-text-white-ter is-size-1 is-uppercase has-text-weight-bold"
15
15
< script >
16
16
document . addEventListener ( 'DOMContentLoaded' , function ( ) {
17
17
const images = [
18
- "https://raw.githubusercontent.com/CabrilloRoboticsClub/cabrillorobotics.github.io/41309abdbb5d93dbc6c0119bf8f97a3bb38ad743/assets/images/seahawk-II/gallery-seahawk-II/interview.webp" ,
19
- "https://raw.githubusercontent.com/CabrilloRoboticsClub/cabrillorobotics.github.io/41309abdbb5d93dbc6c0119bf8f97a3bb38ad743/assets/images/seahawk-II/gallery-seahawk-II/stack.webp" ,
20
- "https://github.com/CabrilloRoboticsClub/cabrillorobotics.github.io/blob/258a1699f10c378fb2a1d18c2a986080bf3b6a57/assets/images/seahawk-II/gallery-seahawk-II/deploy.jpeg?raw=true" ,
21
- "https://raw.githubusercontent.com/CabrilloRoboticsClub/cabrillorobotics.github.io/782b579c031c16835e0fee2b57a22246c1a79618/assets/images/seahawk-II/gallery-seahawk-II/product-demo-pilot-2.webp"
18
+ "https://raw.githubusercontent.com/CabrilloRoboticsClub/cabrillorobotics.github.io/41309abdbb5d93dbc6c0119bf8f97a3bb38ad743/assets/images/seahawk-II/gallery-seahawk-II/interview.webp" ,
19
+ "https://raw.githubusercontent.com/CabrilloRoboticsClub/cabrillorobotics.github.io/41309abdbb5d93dbc6c0119bf8f97a3bb38ad743/assets/images/seahawk-II/gallery-seahawk-II/stack.webp" ,
20
+ "https://github.com/CabrilloRoboticsClub/cabrillorobotics.github.io/blob/258a1699f10c378fb2a1d18c2a986080bf3b6a57/assets/images/seahawk-II/gallery-seahawk-II/deploy.jpeg?raw=true" ,
21
+ "https://raw.githubusercontent.com/CabrilloRoboticsClub/cabrillorobotics.github.io/782b579c031c16835e0fee2b57a22246c1a79618/assets/images/seahawk-II/gallery-seahawk-II/product-demo-pilot-2.webp"
22
22
] ;
23
23
24
- let currentIndex = 0 ;
25
- const imageElement = document . getElementById ( 'rotating-image' ) ;
24
+ let i = 0 ;
25
+ const image_element = document . getElementById ( 'rotating-image' ) ;
26
26
27
27
function rotateImage ( ) {
28
- imageElement . style . backgroundImage = `url(${ images [ currentIndex ] } )` ;
29
- currentIndex = ( currentIndex + 1 ) % images . length ;
28
+ image_element . style . backgroundImage = `url(${ images [ i ] } )` ;
29
+ i = ( i + 1 ) % images . length ;
30
30
}
31
31
32
- // Rotate the image every 5 seconds
33
- setInterval ( rotateImage , 5000 ) ;
34
-
35
32
// Set the initial image
36
33
rotateImage ( ) ;
34
+
35
+ // Rotate the image every 5 seconds
36
+ setInterval ( rotateImage , 5000 ) ;
37
37
} ) ;
38
38
</ script >
0 commit comments