Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6745fcdc3f | ||
|
|
2f80b96a95 |
No files matched your search
@@ -4,6 +4,8 @@ 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;
|
||||
@@ -12,9 +14,14 @@ 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 seal — mark + title/subtitle text (agreed header size). */
|
||||
/** AUT brand mark / horizontal wordmark. */
|
||||
export function BrandLogo({
|
||||
href = "/",
|
||||
title,
|
||||
@@ -22,7 +29,40 @@ 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(
|
||||
// Slot = header height; overflow clips the zoomed asset padding.
|
||||
"group inline-flex min-w-0 items-center overflow-hidden",
|
||||
compact ? "h-14" : "h-full",
|
||||
className,
|
||||
)}
|
||||
aria-label={ariaLabel}
|
||||
>
|
||||
<Image
|
||||
src={HORIZONTAL_SRC}
|
||||
alt={ariaLabel}
|
||||
width={1888}
|
||||
height={607}
|
||||
priority
|
||||
sizes="(max-width:640px) 22rem, 30rem"
|
||||
className={cn(
|
||||
// Zoom past black plate so the mark fills the bar; w-auto keeps aspect.
|
||||
"h-[200%] 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}
|
||||
@@ -30,7 +70,7 @@ export function BrandLogo({
|
||||
"group flex min-w-0 items-center gap-2.5 sm:gap-3",
|
||||
className,
|
||||
)}
|
||||
aria-label={[title, subtitle].filter(Boolean).join(" — ")}
|
||||
aria-label={ariaLabel}
|
||||
>
|
||||
<span
|
||||
className={cn(
|
||||
|
||||
@@ -126,7 +126,8 @@ export function SiteHeader({
|
||||
title={brandTitle}
|
||||
subtitle={brandSubtitle}
|
||||
onDark={isDark}
|
||||
className="shrink-0"
|
||||
horizontal
|
||||
className="h-full shrink-0"
|
||||
/>
|
||||
|
||||
<nav
|
||||
@@ -213,6 +214,7 @@ export function SiteHeader({
|
||||
title={brandTitle}
|
||||
subtitle={brandSubtitle}
|
||||
onDark
|
||||
horizontal
|
||||
compact
|
||||
className="shrink-0"
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user