Revert header logo to the agreed seal mark size.
Deploy edu.mstaut.ir / deploy (push) Successful in 12m1s
Deploy edu.mstaut.ir / deploy (push) Successful in 12m1s
The temporary horizontal wordmark used 235% height and overpowered the header. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
c97498a2ae
commit
cf29d44ff8
2 files changed
+3
-45
No files matched your search
@@ -4,8 +4,6 @@ import { cn } from "@/lib/utils";
|
||||
|
||||
/** Faculty seal mark (transparent). Source: MST icon with side text removed. */
|
||||
const MARK_SRC = "/brand/mst-faculty.png";
|
||||
/** Horizontal wordmark with faculty + university name baked in. */
|
||||
const HORIZONTAL_SRC = "/MstAutIcon_horizontal.png";
|
||||
|
||||
type BrandLogoProps = {
|
||||
href?: string;
|
||||
@@ -14,14 +12,9 @@ type BrandLogoProps = {
|
||||
onDark?: boolean;
|
||||
className?: string;
|
||||
compact?: boolean;
|
||||
/**
|
||||
* Header wordmark: uses the horizontal logo (text is in the image).
|
||||
* Title/subtitle are not rendered — only used for aria-label.
|
||||
*/
|
||||
horizontal?: boolean;
|
||||
};
|
||||
|
||||
/** AUT brand mark / horizontal wordmark. */
|
||||
/** AUT seal — mark + title/subtitle text (agreed header size). */
|
||||
export function BrandLogo({
|
||||
href = "/",
|
||||
title,
|
||||
@@ -29,40 +22,7 @@ export function BrandLogo({
|
||||
onDark = false,
|
||||
className,
|
||||
compact = false,
|
||||
horizontal = false,
|
||||
}: BrandLogoProps) {
|
||||
const ariaLabel = [title, subtitle].filter(Boolean).join(" — ");
|
||||
|
||||
if (horizontal) {
|
||||
return (
|
||||
<Link
|
||||
href={href}
|
||||
className={cn(
|
||||
// Clip 2× logo inside the header slot so it never bleeds into page content.
|
||||
"group inline-flex min-w-0 items-center overflow-hidden",
|
||||
compact ? "h-16" : "h-full",
|
||||
className,
|
||||
)}
|
||||
aria-label={ariaLabel}
|
||||
>
|
||||
<Image
|
||||
src={HORIZONTAL_SRC}
|
||||
alt={ariaLabel}
|
||||
width={1888}
|
||||
height={607}
|
||||
priority
|
||||
sizes="(max-width:640px) 28rem, 36rem"
|
||||
className={cn(
|
||||
// ~2.35× slot height; overflow clipped by the link (and header).
|
||||
"h-[235%] w-auto max-w-none object-contain object-right",
|
||||
// Asset is white-on-black; blend so the plate disappears into the header.
|
||||
onDark ? "mix-blend-screen" : "invert mix-blend-multiply",
|
||||
)}
|
||||
/>
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Link
|
||||
href={href}
|
||||
@@ -70,7 +30,7 @@ export function BrandLogo({
|
||||
"group flex min-w-0 items-center gap-2.5 sm:gap-3",
|
||||
className,
|
||||
)}
|
||||
aria-label={ariaLabel}
|
||||
aria-label={[title, subtitle].filter(Boolean).join(" — ")}
|
||||
>
|
||||
<span
|
||||
className={cn(
|
||||
|
||||
@@ -126,8 +126,7 @@ export function SiteHeader({
|
||||
title={brandTitle}
|
||||
subtitle={brandSubtitle}
|
||||
onDark={isDark}
|
||||
horizontal
|
||||
className="h-full shrink-0"
|
||||
className="shrink-0"
|
||||
/>
|
||||
|
||||
<nav
|
||||
@@ -214,7 +213,6 @@ export function SiteHeader({
|
||||
title={brandTitle}
|
||||
subtitle={brandSubtitle}
|
||||
onDark
|
||||
horizontal
|
||||
compact
|
||||
className="shrink-0"
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user