From ec48057b74a9ee4ec7753c68eecae068f8c85a0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?siyeon00=28=EC=9D=B4=EC=8B=9C=EC=97=B0=29?= Date: Thu, 14 May 2026 13:28:42 +0900 Subject: [PATCH] =?UTF-8?q?feat=20:=20hero=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SubHero.jsx | 100 ++++++++++++++++++++--------- src/css/common.css | 2 + src/pages/company/AboutPage.jsx | 82 +++++++++++++++++++---- src/pages/company/HistoryPage.jsx | 33 ++++++++-- src/pages/company/PartnersPage.jsx | 64 ++++++++++++------ 5 files changed, 214 insertions(+), 67 deletions(-) diff --git a/src/components/SubHero.jsx b/src/components/SubHero.jsx index 435a588..ade06bf 100644 --- a/src/components/SubHero.jsx +++ b/src/components/SubHero.jsx @@ -64,7 +64,12 @@ function NetworkGlobe() { const y2 = y * cosX - z1 * sinX; const z2 = y * sinX + z1 * cosX; const scale = 1 / (1.6 + z2 * 0.4); - return { sx: cx + x1 * R * scale, sy: cy + y2 * R * scale, sz: z2, scale }; + return { + sx: cx + x1 * R * scale, + sy: cy + y2 * R * scale, + sz: z2, + scale, + }; } function draw() { @@ -100,7 +105,8 @@ function NetworkGlobe() { const d = Math.sqrt(dx * dx + dy * dy + dz * dz); if (d < 0.55) { const depth = (a.sz + b.sz) * 0.5; - const alpha = Math.max(0, 0.05 + (depth + 1) * 0.1) * (1 - d / 0.55); + const alpha = + Math.max(0, 0.05 + (depth + 1) * 0.1) * (1 - d / 0.55); const aHex = Math.round(Math.min(255, alpha * 255)) .toString(16) .padStart(2, "0"); @@ -129,7 +135,14 @@ function NetworkGlobe() { .toString(16) .padStart(2, "0"); - const glow = ctx.createRadialGradient(n.sx, n.sy, 0, n.sx, n.sy, r * 3.5); + const glow = ctx.createRadialGradient( + n.sx, + n.sy, + 0, + n.sx, + n.sy, + r * 3.5, + ); glow.addColorStop(0, n.color + gHex); glow.addColorStop(1, n.color + "00"); ctx.beginPath(); @@ -165,7 +178,7 @@ function NetworkGlobe() { export default function SubHero({ title, desc, navItems, rightSlot }) { const { pathname } = useLocation(); - const titleLines = typeof title === "string" ? title.split("\n") : [title]; + const titleLines = typeof title === "string" ? title.split("\n") : null; const [isPill, setIsPill] = useState(false); const navRef = useRef(null); @@ -182,41 +195,60 @@ export default function SubHero({ title, desc, navItems, rightSlot }) {
- + {menuMap["/" + pathname.split("/")[1]]?.label} -

- {titleLines.map((line, li) => ( - - {line.split("").map((char, ci) => ( - - {char === " " ? "\u00A0" : char} - - ))} - - ))} + {typeof title === "string" + ? titleLines.map((line, li) => ( + + {line.split("").map((char, ci) => ( + + {char === " " ? "\u00A0" : char} + + ))} + + )) + : title}

- {desc && ( - + {desc} )}
{rightSlot && ( - + {rightSlot} )} @@ -224,10 +256,18 @@ export default function SubHero({ title, desc, navItems, rightSlot }) {
{navItems?.length > 1 && ( -