Skip to content

Commit

Permalink
Optimize image loading methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ethn1ee committed Dec 6, 2024
1 parent b5d2a2b commit 2c10e5b
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/app/sections/0-landing/graphics.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const Graphics = () => {
id="landing-bg"
src={bg}
alt="bg"
loading="eager"
className="absolute z-0 w-screen"
/>
</motion.div>
Expand All @@ -46,14 +47,15 @@ const Graphics = () => {
{distant.map((item, index) => (
<Parallax containerRef={container} speed={"sm"} key={index}>
<motion.div
key={index}
initial={{ opacity: 0, y: 100 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 1.5, delay: 0.3, ease: "easeOut" }}
>
<Image
key={index}
src={item}
alt={"img"}
loading="eager"
className="w-screen"
/>
</motion.div>
Expand All @@ -70,6 +72,7 @@ const Graphics = () => {
<Image
src={cloud_r}
alt={"img"}
loading="eager"
className="w-screen"
/>
</motion.div>
Expand All @@ -85,6 +88,7 @@ const Graphics = () => {
<Image
src={cloud_bl}
alt={"img"}
loading="eager"
className="w-screen"
/>
</motion.div>
Expand All @@ -93,14 +97,15 @@ const Graphics = () => {
{medium.map((item, index) => (
<Parallax containerRef={container} speed={"md"} key={index}>
<motion.div
key={index}
initial={{ opacity: 0, y: 120 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 1, delay: 0.6, ease: "easeOut" }}
>
<Image
key={index}
src={item}
alt={"img"}
loading="eager"
className="w-screen"
/>
</motion.div>
Expand Down Expand Up @@ -183,12 +188,12 @@ const Graphics = () => {
{close.map((item, index) => (
<Parallax containerRef={container} speed={"lg"} key={index}>
<motion.div
key={index}
initial={{ opacity: 0, y: 150 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 1, delay: 1, ease: "easeOut" }}
>
<Image
key={index}
src={item}
alt={"img"}
className="w-screen"
Expand Down
1 change: 1 addition & 0 deletions src/app/sections/1-about/graphics.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const Graphics = () => {
id="about-bg"
src={bg}
alt="bg"
loading="eager"
className="absolute z-0 w-screen"
/>
</motion.div>
Expand Down
1 change: 1 addition & 0 deletions src/app/sections/2-tracks/graphics.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const Graphics = () => {
id="tracks-bg"
src={bg}
alt="bg"
loading="eager"
className="absolute z-0 w-screen"
/>

Expand Down
1 change: 1 addition & 0 deletions src/app/sections/3-schedule/graphics.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const Graphics = () => {
id="schedule-bg"
src={bg}
alt="bg"
loading="eager"
className="absolute z-0 w-screen"
/>

Expand Down
1 change: 1 addition & 0 deletions src/app/sections/4-speakers/graphics.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const Graphics = () => {
id="speakers-bg"
src={general_bg}
alt="bg"
loading="eager"
className="absolute z-0 w-screen"
/>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/app/sections/5-faq/graphics.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const Graphics = () => {
id="speakers-bg"
src={general_bg}
alt="bg"
loading="eager"
className="absolute z-0 w-screen"
/>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/app/sections/6-sponsors/graphics.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const Graphics = () => {
id="speakers-bg"
src={general_bg}
alt="bg"
loading="eager"
className="absolute z-0 w-screen"
/>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/app/sections/7-footer/graphics.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const Graphics = () => {
id="footer-bg"
src={bg}
alt="bg"
loading="eager"
className="absolute z-0 w-screen"
/>

Expand Down

0 comments on commit 2c10e5b

Please sign in to comment.