Skip to content

Commit

Permalink
Further optimizations for Fire Image
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmonisit committed Feb 5, 2024
1 parent 668f740 commit 1ddac26
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 18 deletions.
2 changes: 1 addition & 1 deletion app/(landing)/misc/StarsBackground.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function StarryBackground({ numberOfStars }) {

return (
<ClientOnly>
<div className="absolute left-0 top-0 h-full w-full">
<div className="absolute left-0 top-0 z-0 h-full w-full">
{stars.map((style, index) => (
<Star key={index} style={style} />
))}
Expand Down
1 change: 0 additions & 1 deletion app/(landing)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export default function Page() {
<Image
src="/landing/wand-cats-combined.png"
alt="bottom image"
layout="responsive"
object-fit="cover"
style={{
width: '100%',
Expand Down
2 changes: 1 addition & 1 deletion app/(landing)/sections/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function AboutInfo({
return (
<div
className={clsx(
'h-fit w-full bg-red-100 p-20 md:w-1/2 md:grow md:justify-end',
'h-fit w-full bg-red-100 p-20 md:w-1/2 md:grow md:justify-end z-10',
{
'text-end': reverse,
},
Expand Down
2 changes: 1 addition & 1 deletion app/(landing)/sections/FAQ/FAQ.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function FAQ() {
return (
<div
id="FAQ"
className="relative flex w-full flex-col items-center justify-start overflow-visible"
className="relative flex w-full flex-col items-center justify-start overflow-visible z-10 h-[70vh]"
>
<div className="relative flex w-full px-[10vw] xl:px-[15vw] flex-col items-center pb-[10rem]">
<QuestionContainer />
Expand Down
16 changes: 3 additions & 13 deletions app/(landing)/sections/Hero/Hero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,12 @@ export default function Hero() {
<Image
src={FIRE_IMG[currentImageIndex]}
quality={fireImageQuality}
width="0"
height="0"
sizes="100vw"
width="900"
height="900"
alt="Fire"
// https://stackoverflow.com/questions/69230343/nextjs-image-component-with-fixed-witdth-and-auto-height
className={clsx("h-auto w-[790px] pl-8 md:w-[800px] lg:w-[800px]", {
// "opacity-100": currentImageIndex === 0,
// "opacity-0 absolute": currentImageIndex !== 0,
})}
className={"h-auto w-[790px] pl-8 md:w-[500px] lg:w-[600px] xl:w-[650px] mb-32 xl:mb-10"}
priority
onLoad={() => {
// setCompletedLoadedImages((prev) => prev + 1);
// setImgArray((prev) => {
// return [...prev, "/landing/fire-1.png"];
// });
}}
/>

</div>
Expand Down
2 changes: 1 addition & 1 deletion app/(landing)/sections/Schedule.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default async function Schedule() {

return (
<div
className="relative mb-20 flex w-full justify-center px-4"
className="relative mb-20 flex w-full justify-center px-4 z-10"
id="Schedule"
>
<div className="flex h-fit w-full max-w-7xl flex-col items-center">
Expand Down

0 comments on commit 1ddac26

Please sign in to comment.