@@ -17,57 +17,55 @@ const defaultOptions = {
17
17
18
18
// Placeholders for image sources
19
19
const imgSources = [
20
- '/images/Chi2/Img1.jpeg' , '/images/Chi2/Img2.JPG' ,
21
- '/images/Chi2/Img3.jpg' , '/images/Chi2/Img4.jpeg' ,
22
- '/images/Chi2/Img5.JPG' , '/images/Chi2/Img6.jpg' ,
23
- '/images/Chi2/Img7.jpeg' , '/images/Chi2/Img8.jpg' ,
24
- '/images/Chi2/Img9.jpeg' , '/images/Chi2/Img10.jpg' ,
25
- '/images/Chi2/Img11.JPG' , '/images/Chi2/Img12.jpeg' ,
26
- '/images/Chi2/Img13.jpeg' , '/images/Chi2/Img14.jpeg' ,
27
- '/images/Chi2/Img15.jpg' , '/images/Chi2/Img16.JPG' ,
28
- '/images/Chi2/Img17.jpeg' , '/images/Chi2/Img18.jpeg' ,
29
- '/images/Chi2/Img19.jpeg' , '/images/Chi2/Img20.jpeg' ,
30
- '/images/Chi2/Img21.jpeg' , '/images/Chi2/Img22.jpeg' ,
31
- '/images/Chi2/Img23.jpeg' , '/images/Chi2/Img24.jpeg' ,
32
- '/images/Chi2/Img25.jpeg' , '/images/Chi2/Img26.jpeg' ,
33
- '/images/Chi2/Img27.jpeg' , '/images/Chi2/Img28.JPG' ,
34
- '/images/Chi2/Img29.jpeg' , '/images/Chi2/Img30.jpeg' ,
35
- '/images/Chi2/Img31.jpeg' , '/images/Chi2/Img32.jpeg' ,
36
- '/images/Chi2/Img33.jpeg' , '/images/Chi2/Img34.JPG'
20
+ '/images/Chicago-Loop-23-9/Chicago-Loop-23-9-39.jpg' , '/images/Chicago-Loop-23-9/Chicago-Loop-23-9-39.jpg' ,
21
+ '/images/Chicago-Loop-23-9/Chicago-Loop-23-9-39.jpg' , '/images/Chicago-Loop-23-9/Chicago-Loop-23-9-39.jpg' , '/images/Chicago-Loop-23-9/Chicago-Loop-23-9-39.jpg' , '/images/Chicago-Loop-23-9/Chicago-Loop-23-9-39.jpg' ,
22
+ '/images/Chicago-Loop-23-9/Chicago-Loop-23-9-39.jpg' , '/images/Chicago-Loop-23-9/Chicago-Loop-23-9-39.jpg' ,
23
+ '/images/Chicago-Loop-23-9/Chicago-Loop-23-9-39.jpg'
24
+ // ... other images
37
25
38
26
] ;
39
27
40
- // Shuffle Images
41
- function shuffle ( array ) {
42
- var currentIndex = array . length , temporaryValue , randomIndex ;
28
+ // Placeholders for image links
29
+ const imgLinks = [
30
+ '/AlbumOne' ,
31
+ // ... other links
32
+ ] ;
43
33
44
- // While there remain elements to shuffle...
45
- while ( 0 !== currentIndex ) {
46
- // Pick a remaining element...
47
- randomIndex = Math . floor ( Math . random ( ) * currentIndex ) ;
48
- currentIndex -= 1 ;
34
+ // Placeholders for image names
35
+ const galleryNames = [
36
+ "Chicago Loop '23-9.1'" ,
37
+ ]
49
38
50
- // And swap it with the current element.
51
- temporaryValue = array [ currentIndex ] ;
52
- array [ currentIndex ] = array [ randomIndex ] ;
53
- array [ randomIndex ] = temporaryValue ;
54
- }
39
+ // // Shuffle Images
40
+ // function shuffle(array) {
41
+ // var currentIndex = array.length, temporaryValue, randomIndex;
42
+
43
+ // // While there remain elements to shuffle...
44
+ // while (0 !== currentIndex) {
45
+ // // Pick a remaining element...
46
+ // randomIndex = Math.floor(Math.random() * currentIndex);
47
+ // currentIndex -= 1;
48
+
49
+ // // And swap it with the current element.
50
+ // temporaryValue = array[currentIndex];
51
+ // array[currentIndex] = array[randomIndex];
52
+ // array[randomIndex] = temporaryValue;
53
+ // }
55
54
56
- return array ;
57
- }
55
+ // return array;
56
+ // }
58
57
59
58
const About = ( ) => {
60
- const [ shuffledImages , setShuffledImages ] = useState ( shuffle ( [ ...imgSources ] ) ) ;
61
59
const [ currentPage , setCurrentPage ] = useState ( 0 ) ;
62
-
60
+
63
61
// Function to navigate to the next page
64
62
const nextPage = ( ) => {
65
- setCurrentPage ( currentPage => Math . min ( currentPage + 1 , Math . floor ( shuffledImages . length / 9 ) ) ) ;
63
+ setCurrentPage ( currentPage => Math . min ( currentPage + 1 , Math . floor ( imgSources . length / 9 ) ) ) ;
66
64
} ;
67
-
65
+
68
66
// Function to navigate to the previous page
69
67
const prevPage = ( ) => {
70
- setCurrentPage ( currentPage => Math . max ( currentPage - 1 , 0 ) ) ;
68
+ setCurrentPage ( currentPage => Math . max ( currentPage - 1 , 0 ) ) ;
71
69
} ;
72
70
73
71
return (
@@ -111,20 +109,23 @@ const About = () => {
111
109
112
110
{ /* Personal Interests Section */ }
113
111
< div id = "personalInterestsSection" className = "section-about" >
114
- < h2 > Personal Interests </ h2 >
115
- < p > From culinary arts to arts to boating life, my personal interests span a wide range. Here's just a snippet into my world of relaxation .</ p >
112
+ < h2 > Photo Galleries </ h2 >
113
+ < p > Click on any album to explore my gallery .</ p >
116
114
< div id = "slideshow-controls" >
117
- < button className = "control-button" onClick = { prevPage } disabled = { currentPage === 0 } >
118
- < img class = "prev-button" src = "/images/AboutArrow.png" alt = "Previous" />
115
+ < button className = "control-button" onClick = { prevPage } disabled = { currentPage === 0 } >
116
+ < img className = "prev-button" src = "/images/AboutArrow.png" alt = "Previous" />
119
117
</ button >
120
118
< div id = "slideshow" >
121
- { shuffledImages . slice ( currentPage * 9 , currentPage * 9 + 9 ) . map ( ( imgSrc , index ) =>
119
+ { imgSources . slice ( currentPage * 9 , currentPage * 9 + 9 ) . map ( ( imgSrc , index ) =>
122
120
< div key = { index } className = "slideshow-img-container" >
123
- < img src = { imgSrc } alt = { `Slideshow ${ index + 1 } ` } className = "slideshow-img" />
121
+ < Link to = { imgLinks [ index ] } >
122
+ < img src = { imgSrc } alt = { `Slideshow ${ index + 1 } ` } className = "slideshow-img" />
123
+ </ Link >
124
+ < div className = "gallery-name" > { galleryNames [ index ] } </ div >
124
125
</ div >
125
126
) }
126
127
</ div >
127
- < button className = "control-button" onClick = { nextPage } disabled = { currentPage === Math . floor ( shuffledImages . length / 9 ) } >
128
+ < button className = "control-button" onClick = { nextPage } disabled = { currentPage === Math . floor ( imgSources . length / 9 ) } >
128
129
< img src = "/images/AboutArrow.png" alt = "Next" />
129
130
</ button >
130
131
</ div >
0 commit comments