Refactor BrandLogo component to use native img element for improved loading performance and adjust styling for better responsiveness. Removed fixed width/height attributes to maintain aspect ratio.
Deploy edu.mstaut.ir / deploy (push) Successful in 11m53s
Deploy edu.mstaut.ir / deploy (push) Successful in 11m53s
This commit is contained in:
1 parent
2709181557
commit
5b0a394216
1 file changed
+6
-12
@@ -37,23 +37,17 @@ export function BrandLogo({
|
||||
return (
|
||||
<Link
|
||||
href={href}
|
||||
className={cn(
|
||||
"group inline-flex min-w-0 items-center",
|
||||
compact ? "h-14" : "h-full",
|
||||
className,
|
||||
)}
|
||||
className={cn("inline-flex h-full shrink-0 items-center", className)}
|
||||
aria-label={ariaLabel}
|
||||
>
|
||||
<Image
|
||||
{/* Native img: no fixed width/height attrs; ratio comes from the asset. */}
|
||||
<img
|
||||
src={HORIZONTAL_SRC}
|
||||
alt={ariaLabel}
|
||||
width={1888}
|
||||
height={607}
|
||||
priority
|
||||
sizes="(max-width:640px) 22rem, 30rem"
|
||||
decoding="async"
|
||||
fetchPriority="high"
|
||||
className={cn(
|
||||
"h-full w-auto object-contain object-right",
|
||||
// Asset is white-on-black; blend so the plate disappears into the header.
|
||||
"h-[75%] w-auto max-w-none",
|
||||
onDark ? "mix-blend-screen" : "invert mix-blend-multiply",
|
||||
)}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user