refactor: Update webpack configuration to improve git commit hash retrieval and enhance lazy loading of components for better performance
This commit is contained in:
@@ -275,7 +275,15 @@ const ContentBox = ({ box, index, pageType, starHovered, setStarHovered, opacity
|
||||
>
|
||||
<Box sx={{ height: "100%", bgcolor: box.bgcolor, position: "relative", display: "flex", alignItems: "center", justifyContent: "center" }}>
|
||||
{opacity === 1 && (
|
||||
<img src={box.image} alt={box.title} style={{ maxWidth: "100%", maxHeight: "100%", objectFit: "contain", position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)" }} />
|
||||
<img
|
||||
src={box.image}
|
||||
alt={box.title}
|
||||
loading={pageType === "home" && index === 1 ? "eager" : undefined}
|
||||
fetchPriority={pageType === "home" && index === 1 ? "high" : undefined}
|
||||
width={pageType === "home" && index === 1 ? 768 : undefined}
|
||||
height={pageType === "home" && index === 1 ? 650 : undefined}
|
||||
style={{ maxWidth: "100%", maxHeight: "100%", objectFit: "contain", position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)" }}
|
||||
/>
|
||||
)}
|
||||
<Box sx={{ position: "absolute", bottom: 0, left: 0, right: 0, bgcolor: "rgba(27, 94, 32, 0.8)", p: 1 }}>
|
||||
<Typography sx={{ fontSize: "1.6rem", color: "white", fontFamily: "SwashingtonCP" }}>{box.title}</Typography>
|
||||
|
||||
Reference in New Issue
Block a user