Skip to content

Commit a26d20b

Browse files
committed
Updated photo gallery.
1 parent 8fcc2aa commit a26d20b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+191
-44
lines changed

public/Style.css

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ h1, h2, h3, h4, h5, h6 {
582582
border-radius: 1vw;
583583
overflow: hidden;
584584
height: 200px; /* adjust this as needed */
585+
position: relative;
585586
}
586587

587588
.slideshow-img {
@@ -590,6 +591,17 @@ h1, h2, h3, h4, h5, h6 {
590591
object-fit: cover;
591592
}
592593

594+
.slideshow-img-container:hover .slideshow-img {
595+
transform: scale(1.1);
596+
opacity: 0.6;
597+
}
598+
599+
.slideshow-img-container:hover .gallery-name {
600+
visibility: visible;
601+
opacity: 1;
602+
display: block;
603+
}
604+
593605
.control-button {
594606
padding: 0.5em 1em;
595607
margin: 0 0.5em;
@@ -600,6 +612,22 @@ h1, h2, h3, h4, h5, h6 {
600612
flex: 1 0 10%; /* adjust this as needed */
601613
}
602614

615+
.gallery-name {
616+
position: absolute;
617+
top: 50%;
618+
left: 50%;
619+
transform: translate(-50%, -50%);
620+
font-size: 1.6vw;
621+
color: white;
622+
visibility: hidden;
623+
opacity: 0;
624+
transition: visibility 0.3s, opacity 0.3s ease;
625+
}
626+
627+
.slideshow-img, .gallery-name {
628+
transition: all 0.3s ease;
629+
}
630+
603631
.control-button:disabled {
604632
/* background-color: #C2B19C; */
605633
opacity: 25%;
@@ -619,6 +647,47 @@ h1, h2, h3, h4, h5, h6 {
619647
opacity: 0.6;
620648
}
621649

650+
/* Photo Album Template */
651+
.album {
652+
text-align: center;
653+
margin-top: 20px;
654+
}
655+
656+
.image-grid {
657+
column-count: 3;
658+
column-gap: 1em;
659+
margin: 0 auto;
660+
max-width: 90%;
661+
}
662+
663+
.image-grid img {
664+
width: 100%;
665+
margin-bottom: 1em;
666+
break-inside: avoid;
667+
}
668+
669+
.albumoverlay {
670+
position: fixed;
671+
top: 0;
672+
left: 0;
673+
width: 100%;
674+
height: 100%;
675+
background-color: rgba(0,0,0,0.8);
676+
z-index: 1;
677+
display: flex;
678+
justify-content: center;
679+
align-items: center;
680+
}
681+
682+
.albumoverlay img {
683+
max-width: 80%;
684+
max-height: 80%;
685+
border: 1px solid black;
686+
border-radius: 8px;
687+
}
688+
689+
690+
622691
/* My Story */
623692
.my-story {
624693
display: flex;
8 KB
Binary file not shown.

src/components/pages/About.js

Lines changed: 45 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -17,57 +17,55 @@ const defaultOptions = {
1717

1818
// Placeholders for image sources
1919
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
3725

3826
];
3927

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+
];
4333

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+
]
4938

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+
// }
5554

56-
return array;
57-
}
55+
// return array;
56+
// }
5857

5958
const About = () => {
60-
const [shuffledImages, setShuffledImages] = useState(shuffle([...imgSources]));
6159
const [currentPage, setCurrentPage] = useState(0);
62-
60+
6361
// Function to navigate to the next page
6462
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)));
6664
};
67-
65+
6866
// Function to navigate to the previous page
6967
const prevPage = () => {
70-
setCurrentPage(currentPage => Math.max(currentPage - 1, 0));
68+
setCurrentPage(currentPage => Math.max(currentPage - 1, 0));
7169
};
7270

7371
return(
@@ -111,20 +109,23 @@ const About = () => {
111109

112110
{/* Personal Interests Section */}
113111
<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>
116114
<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" />
119117
</button>
120118
<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) =>
122120
<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>
124125
</div>
125126
)}
126127
</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)}>
128129
<img src="/images/AboutArrow.png" alt="Next" />
129130
</button>
130131
</div>
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
import React, { useState, useEffect } from 'react';
2+
3+
// Shuffle an array
4+
const shuffle = (array) => {
5+
let currentIndex = array.length, randomIndex;
6+
7+
// While there remain elements to shuffle...
8+
while (currentIndex !== 0) {
9+
// Pick a remaining element...
10+
randomIndex = Math.floor(Math.random() * currentIndex);
11+
currentIndex--;
12+
13+
// And swap it with the current element.
14+
[array[currentIndex], array[randomIndex]] = [array[randomIndex], array[currentIndex]];
15+
}
16+
return array;
17+
};
18+
19+
const AlbumOneChicagoLoop239 = () => {
20+
const albumName = 'Chicago-Loop-23-9';
21+
const imageCount = 45; // Replace with the actual number of images in the album
22+
23+
const images = Array.from({ length: imageCount }, (_, i) =>
24+
`/images/${albumName}/${albumName}-${String(i + 1).padStart(2, '0')}.jpg`
25+
);
26+
27+
const [shuffledImages, setShuffledImages] = useState([]);
28+
29+
useEffect(() => {
30+
setShuffledImages(shuffle([...images]));
31+
}, []);
32+
33+
const [selectedImage, setSelectedImage] = useState(null);
34+
35+
const handleClick = (image) => {
36+
setSelectedImage(image);
37+
};
38+
39+
const handleClose = () => {
40+
setSelectedImage(null);
41+
};
42+
43+
return (
44+
<div>
45+
<div id="titleSection-template">
46+
<h1>Chicago Loop '23-9.1'</h1>
47+
</div>
48+
<div className="album">
49+
<div className="image-grid">
50+
{shuffledImages.map((image, index) =>
51+
<div
52+
className="image-container"
53+
key={index}
54+
onClick={() => handleClick(image)}
55+
>
56+
<img src={image} alt={`${albumName} ${index + 1}`} />
57+
</div>
58+
)}
59+
</div>
60+
</div>
61+
{selectedImage && (
62+
<div className="albumoverlay" onClick={handleClose}>
63+
<img src={selectedImage} alt="Enlarged" />
64+
</div>
65+
)}
66+
</div>
67+
);
68+
};
69+
70+
export default AlbumOneChicagoLoop239;

src/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ import TermsOfUse from "./components/pages/TermsOfUse";
3535
import Ventures from "./components/pages/Ventures";
3636
import Websites from "./components/pages/Websites";
3737

38+
// Import Photo Albums
39+
import AlbumOneChicagoLoop239 from "./components/pages/AlbumOneChicagoLoop239";
40+
3841
// Browser Router
3942
const router = createBrowserRouter([
4043
{
@@ -54,6 +57,10 @@ const router = createBrowserRouter([
5457
path: "/about/mystory",
5558
element: <MyStory />
5659
},
60+
{
61+
path: "/AlbumOne",
62+
element: <AlbumOneChicagoLoop239 />
63+
},
5764
{
5865
path: "/connect",
5966
element: <Connect />

0 commit comments

Comments
 (0)