Skip to content

Commit df3e5c8

Browse files
committed
Build about gallery with lazy images
1 parent d7eccce commit df3e5c8

28 files changed

+176
-7
lines changed

package-lock.json

Lines changed: 119 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
"react-chartjs-2": "^5.2.0",
2121
"react-dom": "^18.2.0",
2222
"react-i18next": "^14.1.2",
23+
"react-lazy-load-image-component": "^1.6.0",
24+
"react-material-ui-carousel": "^3.4.2",
2325
"react-router-dom": "^6.23.1"
2426
},
2527
"devDependencies": {

src/About.tsx

Lines changed: 55 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,33 @@
11
import { Typography, Container, Avatar, List, ListItem, ListItemText } from '@mui/material'
22
import { useTranslation } from 'react-i18next'
3-
import image1 from './assets/images/78743416_2588340067930838_9025297886149083136_n.jpeg'
4-
import image2 from './assets/images/28378086_1616056785159176_862979226448649839_n.jpeg'
5-
import image3 from './assets/images/88950387_2784083098356533_6828161491334594560_n.jpeg'
6-
import image4 from './assets/images/87738062_2784085668356276_3167127129091473408_n.jpeg'
3+
import main from './assets/images/main.jpg'
4+
import { LazyLoadImage } from 'react-lazy-load-image-component'
5+
import image1 from './assets/images/1.jpg'
6+
import image2 from './assets/images/2.jpg'
7+
import image3 from './assets/images/3.jpg'
8+
import image4 from './assets/images/4.jpg'
9+
import image5 from './assets/images/5.jpg'
10+
import image6 from './assets/images/6.jpg'
11+
import image7 from './assets/images/7.jpg'
12+
import image8 from './assets/images/8.jpg'
13+
import image9 from './assets/images/9.jpg'
14+
import image10 from './assets/images/10.jpg'
15+
import image11 from './assets/images/11.jpg'
16+
import image12 from './assets/images/12.jpg'
17+
import image13 from './assets/images/13.jpg'
18+
import image14 from './assets/images/14.jpg'
19+
import image15 from './assets/images/15.jpg'
20+
import image16 from './assets/images/16.jpg'
21+
import image17 from './assets/images/17.jpg'
22+
import image18 from './assets/images/18.jpg'
23+
import image19 from './assets/images/19.jpg'
24+
import image20 from './assets/images/20.jpg'
25+
import image21 from './assets/images/21.jpg'
26+
import image22 from './assets/images/22.jpg'
27+
import image23 from './assets/images/23.jpg'
28+
import image24 from './assets/images/24.jpg'
729
import NavBar from './NavBar'
30+
import Carousel from 'react-material-ui-carousel'
831

932
function About() {
1033
const { t } = useTranslation()
@@ -15,7 +38,7 @@ function About() {
1538
<Typography variant="h1" sx={{ mb: 3 }}>Web Dev Talks</Typography>
1639
<Typography sx={{ my: 3 }}>{t("aboutUs.quote")}<b>{t("aboutUs.adrianReyes")}</b></Typography>
1740

18-
<Avatar variant="square" src={image1} alt="" sx={{ width: '100%', height: '100%' }} />
41+
<Avatar variant="square" src={main} alt="" sx={{ width: '100%', height: '100%' }} />
1942

2043
<Typography variant="h2" sx={{ my: 5 }}>{t("aboutUs.whoIs")}</Typography>
2144
<Typography>{t("aboutUs.description")}</Typography>
@@ -27,9 +50,9 @@ function About() {
2750
<Typography>{t("aboutUs.dynamicBody1")}</Typography>
2851
<Typography>{t("aboutUs.dynamicBody2")}</Typography>
2952

30-
<Avatar variant="square" src={image2} alt="" sx={{ width: '100%', height: '100%', my: 5 }} />
53+
<Avatar variant="square" src={image1} alt="" sx={{ width: '100%', height: '100%', my: 5 }} />
3154

32-
<Avatar variant="square" src={image3} alt="" sx={{ width: '100%', height: '100%', my: 5 }} />
55+
<Avatar variant="square" src={image8} alt="" sx={{ width: '100%', height: '100%', my: 5 }} />
3356

3457
<Typography variant="h2" sx={{ my: 3 }}>{t("aboutUs.socialImpact")}</Typography>
3558
<Typography>{t("aboutUs.socialImpactBody1")}</Typography>
@@ -64,6 +87,31 @@ function About() {
6487

6588
<Typography variant="h3" sx={{ my: 3 }}>{t("aboutUs.communityHeader")}</Typography>
6689

90+
<Typography variant="h3" sx={{ my: 5 }}>{t("aboutUs.gallery")}</Typography>
91+
<Carousel sx={{ width: '100%', marginBottom: '1rem' }} interval={5000} animation={'slide'} height={'50vw'} indicators={false} duration={750}>
92+
<LazyLoadImage src={image2} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
93+
<LazyLoadImage src={image3} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }}/>
94+
<LazyLoadImage src={image4} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }}/>
95+
<LazyLoadImage src={image5} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
96+
<LazyLoadImage src={image6} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
97+
<LazyLoadImage src={image7} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
98+
<LazyLoadImage src={image9} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
99+
<LazyLoadImage src={image10} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
100+
<LazyLoadImage src={image11} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
101+
<LazyLoadImage src={image12} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
102+
<LazyLoadImage src={image13} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
103+
<LazyLoadImage src={image14} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
104+
<LazyLoadImage src={image15} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
105+
<LazyLoadImage src={image16} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
106+
<LazyLoadImage src={image17} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
107+
<LazyLoadImage src={image18} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
108+
<LazyLoadImage src={image19} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
109+
<LazyLoadImage src={image20} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
110+
<LazyLoadImage src={image21} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
111+
<LazyLoadImage src={image22} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
112+
<LazyLoadImage src={image23} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
113+
<LazyLoadImage src={image24} alt={''} style={{ height: '100%', width: '100%', objectFit: 'cover' }} />
114+
</Carousel>
67115
</Container>
68116
</>
69117
)

src/assets/images/1.jpg

544 KB
Loading

src/assets/images/10.jpg

249 KB
Loading

src/assets/images/11.jpg

93.9 KB
Loading

src/assets/images/12.jpg

597 KB
Loading

src/assets/images/13.jpg

196 KB
Loading

src/assets/images/14.jpg

732 KB
Loading

src/assets/images/15.jpg

174 KB
Loading

src/assets/images/16.jpg

128 KB
Loading

src/assets/images/17.jpg

388 KB
Loading

src/assets/images/18.jpg

203 KB
Loading

src/assets/images/19.jpg

642 KB
Loading

src/assets/images/2.jpg

118 KB
Loading

src/assets/images/20.jpg

259 KB
Loading

src/assets/images/21.jpg

145 KB
Loading

src/assets/images/22.jpg

835 KB
Loading

src/assets/images/23.jpg

247 KB
Loading

src/assets/images/24.jpg

59.1 KB
Loading

src/assets/images/3.jpg

508 KB
Loading

src/assets/images/4.jpg

449 KB
Loading

src/assets/images/5.jpg

535 KB
Loading

src/assets/images/6.jpg

488 KB
Loading

src/assets/images/7.jpg

388 KB
Loading

src/assets/images/8.jpg

195 KB
Loading

src/assets/images/9.jpg

103 KB
Loading

src/assets/images/main.jpg

478 KB
Loading

0 commit comments

Comments
 (0)