[feat] main layout 수정

This commit is contained in:
minheon committed 2026-03-30 16:39:55 +09:00
1 parent 0890457b99
commit 8e1cc981fa
11 files changed
+902 -87

No files matched your search

+239 -26
View File
@@ -1,31 +1,244 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');
@import "tailwindcss";
:root {
--Color-Neutral-90: #151515;
--Color-Neutral-80: #303030;
--Color-Neutral-70: #606060;
--Color-Neutral-60: #808080;
--Color-Neutral-40: #DADBDE;
--Color-Neutral-30: #EAEBEF;
--Color-Neutral-20: #F0F1F4;
--Color-Neutral-10: #F7F8FA;
--Color-Neutral-00: #FFF;
--Color-Negative: #E71C3B;
--Color-Negative-Hover: #C21630;
--Color-B: #4880EF;
--Color-B-Hover: #3568C5;
--font-family-primary: 'Pretendard', system-ui, sans-serif;
--font-family-display: 'Playfair Display', serif;
--font-family-inter: 'Inter', sans-serif;
/* ─── Design Tokens ───────────────────────────────────────────────── */
@theme {
/* Navy ─ 950(darkest) · 900 · 800 · 50(lightest)
짙은 네이비 계열. 본문 텍스트, 다크 섹션 배경, 그라디언트 끝 */
--color-navy-950: #021341;
--color-navy-900: #0A1128;
--color-navy-800: #1A2B5E;
--color-navy-50: #F4F6FB;
/* Violet ─ 700(deep) · 500(accent)
퍼플 계열. 그라디언트 시작(700), 활성 상태·아이콘(500) */
--color-violet-700: #4F1DA1;
--color-violet-500: #6C5CE7;
/* Marketing accents (CTA / Process / Hero blobs — shared with DEMO) */
--color-marketing-cream: #fff3eb;
--color-marketing-lilac: #e4cfff;
--color-marketing-ice: #f5f9ff;
--color-lavender-100: #f3e8ff;
--color-lavender-200: #e9d4ff;
--color-lavender-300: #d8b4fe;
--color-violet-hover: #af90ff;
/* Hero radial + blob tints */
--color-hero-wash-start: #e0e7ff;
--color-hero-wash-mid: #faf5ff;
--color-hero-wash-end: #fdf2f8;
--color-marketing-blush: #fbcfe8;
/* Neutral ─ 90(darkest) · 80 · 70 · 60 · 40 · 30 · 20 · 10 · 00(white) */
--color-neutral-90: #151515;
--color-neutral-80: #303030;
--color-neutral-70: #606060;
--color-neutral-60: #808080;
--color-neutral-40: #DADBDE;
--color-neutral-30: #EAEBEF;
--color-neutral-20: #F0F1F4;
--color-neutral-10: #F7F8FA;
--color-neutral-00: #FFFFFF;
/* Status ─ {critical | warning | good | info} × {bg | text | border | dot}
파스텔 시맨틱 팔레트. 원색(빨강·초록) 사용 금지 */
--color-status-critical-bg: #FFF0F0;
--color-status-critical-text: #7C3A4B;
--color-status-critical-border: #F5D5DC;
--color-status-critical-dot: #D4889A;
--color-status-warning-bg: #FFF6ED;
--color-status-warning-text: #7C5C3A;
--color-status-warning-border: #F5E0C5;
--color-status-warning-dot: #D4A872;
--color-status-good-bg: #F3F0FF;
--color-status-good-text: #4A3A7C;
--color-status-good-border: #D5CDF5;
--color-status-good-dot: #9B8AD4;
--color-status-info-bg: #EFF0FF;
--color-status-info-text: #3A3F7C;
--color-status-info-border: #C5CBF5;
--color-status-info-dot: #7A84D4;
/* Typography */
--font-sans: "Pretendard Variable", "Pretendard", ui-sans-serif, system-ui, sans-serif;
--font-serif: "Playfair Display", ui-serif, Georgia, Cambria, serif;
--font-inter: "Inter", ui-sans-serif, system-ui, sans-serif;
/* Animation */
--animate-blob: blob 7s infinite;
--animate-blob-large: blob-large 25s infinite ease-in-out;
--animate-fade-in-up: fade-in-up 0.6s ease-out both;
--animate-fade-in-left: fade-in-left 0.6s ease-out both;
--animate-fade-in-right: fade-in-right 0.6s ease-out both;
--animate-fade-in-scale: fade-in-scale 0.8s ease-out both;
}
html,
body {
font-family: var(--font-family-inter);
font-style: normal;
line-height: normal;
min-height: 100dvh;
}
/* ─── Keyframes ───────────────────────────────────────────────────── */
@keyframes blob {
0% { transform: translate(0, 0) scale(1); }
33% { transform: translate(30px, -50px) scale(1.1); }
66% { transform: translate(-20px, 20px) scale(0.9); }
100% { transform: translate(0, 0) scale(1); }
}
@keyframes blob-large {
0% { transform: translate(0, 0) scale(1); }
33% { transform: translate(8vw, -8vh) scale(1.1); }
66% { transform: translate(-8vw, 8vh) scale(0.9); }
100% { transform: translate(0, 0) scale(1); }
}
/* fade + slide-up: replaces framer-motion entrance (opacity 0→1, y 20→0) */
@keyframes fade-in-up {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
/* fade + slide-left/right: whileInView x:-20→0 / x:20→0 */
@keyframes fade-in-left {
from { opacity: 0; transform: translateX(-20px); }
to { opacity: 1; transform: translateX(0); }
}
@keyframes fade-in-right {
from { opacity: 0; transform: translateX(20px); }
to { opacity: 1; transform: translateX(0); }
}
@keyframes fade-in-scale {
from { opacity: 0; transform: scale(0.95); }
to { opacity: 1; transform: scale(1); }
}
/* ─── Animation Delays ────────────────────────────────────────────── */
/* UI entrance stagger (short) */
.animation-delay-100 { animation-delay: 0.1s; }
.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-300 { animation-delay: 0.3s; }
.animation-delay-400 { animation-delay: 0.4s; }
.animation-delay-500 { animation-delay: 0.5s; }
/* Blob float delays (long) */
.animation-delay-2000 { animation-delay: 2s; }
.animation-delay-4000 { animation-delay: 4s; }
.animation-delay-7000 { animation-delay: 7s; }
.animation-delay-14000 { animation-delay: 14s; }
/* ─── Utility Classes ─────────────────────────────────────────────── */
/* 라이트 섹션 헤딩 그라디언트 텍스트 */
.text-gradient {
background: linear-gradient(to right, var(--color-navy-900), #3b5998);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
/* 반투명 글래스 카드 — 랜딩 섹션 */
.glass-card {
@apply bg-white/70 backdrop-blur-xl border border-white/40 rounded-2xl;
box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}
/* 다크 섹션 위 화이트 카드 사선 그림자 */
.card-shadow { box-shadow: 3px 4px 12px rgba(0, 0, 0, 0.06); }
.card-shadow:hover { box-shadow: 4px 6px 16px rgba(0, 0, 0, 0.09); }
/* 브랜드 그라디언트 Primary 버튼 */
.btn-primary {
@apply bg-gradient-to-r from-violet-700 to-navy-950 text-white rounded-full font-medium transition-all;
}
/* ─── Typography Scale ────────────────────────────────────────────── */
/* Display */
.display-72 { font-family: var(--font-serif); font-size: 72px; font-weight: 700; line-height: 1.1; letter-spacing: -1.44px; }
.display-48 { font-family: var(--font-serif); font-size: 48px; font-weight: 700; line-height: 1.1; letter-spacing: -0.96px; }
.display-36 { font-family: var(--font-serif); font-size: 36px; font-weight: 700; line-height: 1.15; letter-spacing: -0.72px; }
/* Headline */
.headline-30 { font-family: var(--font-serif); font-size: 30px; font-weight: 700; line-height: 1.2; letter-spacing: -0.6px; }
.headline-24 { font-family: var(--font-serif); font-size: 24px; font-weight: 700; line-height: 1.3; letter-spacing: -0.48px; }
.headline-20 { font-family: var(--font-serif); font-size: 20px; font-weight: 700; line-height: 1.4; letter-spacing: -0.4px; }
/* Title */
.title-20 { font-family: var(--font-sans); font-size: 20px; font-weight: 700; line-height: 1.4; letter-spacing: -0.4px; }
.title-18 { font-family: var(--font-sans); font-size: 18px; font-weight: 700; line-height: 1.4; letter-spacing: -0.36px; }
.title-18-semibold { font-family: var(--font-sans); font-size: 18px; font-weight: 600; line-height: 1.4; letter-spacing: -0.36px; }
.title-16 { font-family: var(--font-sans); font-size: 16px; font-weight: 600; line-height: 1.4; letter-spacing: -0.32px; }
.title-14 { font-family: var(--font-sans); font-size: 14px; font-weight: 600; line-height: 1.4; letter-spacing: -0.28px; }
/* Body */
.body-20 { font-family: var(--font-sans); font-size: 20px; font-weight: 400; line-height: 1.6; letter-spacing: -0.4px; }
.body-20-medium { font-family: var(--font-sans); font-size: 20px; font-weight: 500; line-height: 1.4; letter-spacing: -0.4px; }
.body-18 { font-family: var(--font-sans); font-size: 18px; font-weight: 400; line-height: 1.6; letter-spacing: -0.36px; }
.body-16 { font-family: var(--font-sans); font-size: 16px; font-weight: 400; line-height: 1.5; letter-spacing: -0.32px; }
.body-16-medium { font-family: var(--font-sans); font-size: 16px; font-weight: 500; line-height: 1.5; letter-spacing: -0.32px; }
.body-14 { font-family: var(--font-sans); font-size: 14px; font-weight: 400; line-height: 1.5; letter-spacing: -0.28px; }
.body-14-medium { font-family: var(--font-sans); font-size: 14px; font-weight: 500; line-height: 1.5; letter-spacing: -0.28px; }
/* Label */
.label-12 { font-family: var(--font-sans); font-size: 12px; font-weight: 500; line-height: 1.4; letter-spacing: -0.24px; }
.label-12-semibold { font-family: var(--font-sans); font-size: 12px; font-weight: 600; line-height: 1.4; letter-spacing: -0.24px; }
/* Responsive body: 18px → 20px at md (text-lg / text-xl) */
.body-18-md-20 {
font-family: var(--font-sans);
font-weight: 400;
line-height: 1.625;
letter-spacing: -0.36px;
font-size: 1.125rem;
}
@media (min-width: 768px) {
.body-18-md-20 {
font-size: 1.25rem;
letter-spacing: -0.4px;
}
}
/* Responsive sans title: 18px → 20px at md (module card titles 등) */
.title-18-md-20 {
font-family: var(--font-sans);
font-weight: 700;
line-height: 1.4;
letter-spacing: -0.36px;
font-size: 1.125rem;
}
@media (min-width: 768px) {
.title-18-md-20 {
font-size: 1.25rem;
letter-spacing: -0.4px;
}
}
/* Responsive list body: 14px → 16px at md */
.body-14-md-16 {
font-family: var(--font-sans);
font-weight: 400;
line-height: 1.625;
letter-spacing: -0.28px;
font-size: 0.875rem;
}
@media (min-width: 768px) {
.body-14-md-16 {
font-size: 1rem;
letter-spacing: -0.32px;
}
}
/* ─── Base ────────────────────────────────────────────────────────── */
@layer base {
html, body {
@apply font-sans text-neutral-80 bg-neutral-10 antialiased;
font-style: normal;
line-height: normal;
min-height: 100dvh;
}
h1, h2, h3, h4, h5, h6 {
@apply font-serif text-navy-900;
}
}
+32
View File
@@ -0,0 +1,32 @@
import { useEffect, useRef, useState } from "react";
/**
* 요소가 뷰포트에 진입하면 inView = true 로 바뀌는 훅.
* framer-motion의 whileInView({ once: true }) 와 동일한 동작.
*/
export function useInView<T extends HTMLElement = HTMLElement>(
options?: IntersectionObserverInit,
) {
const ref = useRef<T>(null);
const [inView, setInView] = useState(false);
useEffect(() => {
const el = ref.current;
if (!el) return;
const observer = new IntersectionObserver(
([entry]) => {
if (entry.isIntersecting) {
setInView(true);
observer.disconnect(); // once: true
}
},
{ threshold: 0.15, ...options },
);
observer.observe(el);
return () => observer.disconnect();
}, []);
return { ref, inView };
}
+15
View File
@@ -0,0 +1,15 @@
import { useNavigate } from "react-router-dom";
/**
* 지정한 경로로 이동하면서 페이지 상단으로 smooth 스크롤합니다.
* 로고 클릭 등 "홈으로 돌아가기 + 스크롤 초기화" 패턴에 사용합니다.
*/
export function useScrollToTop(path = "/") {
const navigate = useNavigate();
return (e: React.MouseEvent<HTMLAnchorElement>) => {
e.preventDefault();
navigate(path);
window.scrollTo({ top: 0, behavior: "smooth" });
};
}
+44 -18
View File
@@ -1,22 +1,48 @@
import { Link } from "react-router-dom";
import { useScrollToTop } from "@/hooks/useScrollToTop";
const LINKS = [
{ label: "Privacy Policy", href: "/privacy" },
{ label: "Terms of Service", href: "/terms" },
];
export function Footer() {
return (
<footer className="flex w-full items-center justify-between px-[316px] py-[48px]">
<div
className="text-[#0A1128] text-[30px] not-italic font-bold leading-[32px] tracking-[-0.6px]"
>
CLINICAD
</div>
const handleLogoClick = useScrollToTop();
<div
className="text-[#62748E] font-inter text-sm font-normal leading-5"
>
© 2026 CLINICAD. All rights reserved. Infinite Marketing for Premium Medical Business & Marketing Agency
</div>
return (
<footer className="bg-white border-t border-slate-100 py-12 px-6">
<div className="max-w-7xl mx-auto flex flex-col md:flex-row items-center justify-between gap-6">
<div className="flex items-center gap-6">
<span className="text-[#62748E] font-inter text-sm font-normal leading-5">Privacy Policy</span>
<span className="text-[#62748E] font-inter text-sm font-normal leading-5">Terms of Service</span>
</div>
</footer>
);
{/* 로고 */}
<a
href="/"
onClick={handleLogoClick}
className="font-serif text-3xl font-black tracking-[0.05em] bg-gradient-to-r from-violet-700 to-navy-950 bg-clip-text text-transparent"
>
INFINITH
</a>
{/* 카피라이트 */}
<p className="body-14 text-neutral-60 text-center md:text-left">
&copy; {new Date().getFullYear()} CLINICAD. All rights reserved.{" "}
<br className="md:hidden" />
Infinite Marketing for Premium Medical Business &amp; Marketing Agency
</p>
{/* 링크 */}
<nav className="flex items-center gap-6">
{LINKS.map(({ label, href }) => (
<Link
key={label}
to={href}
className="body-14-medium text-neutral-60 hover:text-navy-900 transition-colors"
>
{label}
</Link>
))}
</nav>
</div>
</footer>
);
}
+44 -35
View File
@@ -1,42 +1,51 @@
import { Link } from "react-router-dom";
import { useScrollToTop } from "@/hooks/useScrollToTop";
const MENUS = [
{ name: "Solution", href: "/" },
{ name: "Modules", href: "/" },
{ name: "Use Cases", href: "/" },
]
{ label: "Solution", href: "/#solution" },
{ label: "Modules", href: "/#modules" },
{ label: "Use Cases", href: "/#use-cases" },
];
export function GNB() {
return (
<nav className="w-full h-14 flex items-center justify-between px-[316px]" style={{ background: "var(--Color-Neutral-00)" }}>
const handleLogoClick = useScrollToTop();
{/* 로고 */}
<span
onClick={() => window.location.href = "/"}
className="text-[32px] font-bold leading-[32px] tracking-[-0.6px] ml-6 cursor-pointer"
style={{ color: "#0A1128", fontFamily: "var(--font-family-display)" }}
>
CLINAD
</span>
return (
<nav className="fixed top-0 left-0 right-0 z-50 h-20 bg-white/70 backdrop-blur-lg border-b border-white/20">
<div className="max-w-7xl mx-auto px-6 h-full flex items-center justify-between">
{/* 메뉴 */}
<ul className="flex items-center gap-8">
{MENUS.map(({ name }, index) => (
<li
key={index}
className="text-sm font-medium leading-5 cursor-pointer whitespace-nowrap"
style={{ color: "var(--Color-Neutral-70)", fontFamily: "var(--font-family-inter)" }}
>
{name}
</li>
))}
</ul>
{/* 로고 */}
<a
href="/"
onClick={handleLogoClick}
className="font-serif text-3xl font-black tracking-[0.05em] bg-gradient-to-r from-violet-700 to-navy-950 bg-clip-text text-transparent"
>
INFINITH
</a>
{/* 로그인 버튼 */}
<button
onClick={() => window.location.href = "/login"}
className="flex items-center justify-center w-[85px] h-[40px] shadow rounded-[99px] mr-6 bg-gradient-to-r from-[#4F1DA1] to-[#021341] text-white text-sm font-medium leading-5 cursor-pointer"
>
Login
</button>
</nav>
)
{/* 메뉴 — md 이상만 표시 */}
<ul className="hidden md:flex items-center gap-8">
{MENUS.map(({ label, href }) => (
<li key={label}>
<a
href={href}
className="body-14-medium text-neutral-70 hover:text-navy-900 transition-colors"
>
{label}
</a>
</li>
))}
</ul>
{/* 로그인 버튼 */}
<Link
to="/login"
className="body-14-medium px-6 py-2.5 text-white rounded-full shadow-sm hover:shadow-md hover:opacity-90 transition-all bg-gradient-to-r from-violet-700 to-navy-950"
>
Login
</Link>
</div>
</nav>
);
}
+12 -7
View File
@@ -1,13 +1,18 @@
import { Outlet } from "react-router-dom";
import { GNB } from "@/layouts/GNB";
import { Footer } from "@/layouts/Footer";
import { PageNavigator } from "@/layouts/PageNavigator";
export default function MainLayout() {
return (
<div className="flex flex-col min-h-screen">
<header className="flex-none"><GNB /></header>
<main className="flex-grow"><Outlet /></main>
<footer className="flex-none"><Footer /></footer>
</div>
)
return (
<div className="flex flex-col min-h-screen bg-neutral-10">
<GNB />
{/* fixed GNB(h-20) 높이만큼 상단 여백 확보 */}
<main className="flex-grow pt-20">
<Outlet />
</main>
<Footer />
<PageNavigator />
</div>
);
}
+70
View File
@@ -0,0 +1,70 @@
import { useLocation, useNavigate } from "react-router-dom";
import ChevronLeftIcon from "@/assets/home/chevron-left.svg?react";
import ChevronRightIcon from "@/assets/home/chevron-right.svg?react";
const PAGE_FLOW = [
{ path: "/", label: "홈" },
{ path: "/report", label: "마케팅 분석" },
{ path: "/plan", label: "콘텐츠 기획" },
{ path: "/studio", label: "콘텐츠 제작" },
{ path: "/channels", label: "채널 연결" },
{ path: "/distribute", label: "콘텐츠 배포" },
{ path: "/performance", label: "성과 관리" },
];
export function PageNavigator() {
const location = useLocation();
const navigate = useNavigate();
const currentIndex = PAGE_FLOW.findIndex((p) => p.path === location.pathname);
if (currentIndex === -1) return null;
const prev = currentIndex > 0 ? PAGE_FLOW[currentIndex - 1] : null;
const next = currentIndex < PAGE_FLOW.length - 1 ? PAGE_FLOW[currentIndex + 1] : null;
return (
<div
data-no-print
className="fixed bottom-6 left-1/2 -translate-x-1/2 z-50 flex items-center gap-1 bg-white/90 backdrop-blur-xl border border-slate-200 rounded-full px-2 py-2 shadow-[0_4px_20px_rgba(0,0,0,0.08)]"
>
{/* 이전 페이지 */}
<button
onClick={() => prev && navigate(prev.path)}
disabled={!prev}
aria-label={prev ? `이전: ${prev.label}` : "이전 페이지 없음"}
className="body-14-medium flex items-center gap-2 px-3 py-2 rounded-full text-neutral-70 transition-all hover:bg-neutral-20 hover:text-navy-900 disabled:opacity-30 disabled:cursor-not-allowed cursor-pointer"
>
<ChevronLeftIcon aria-hidden="true" />
{prev && <span className="hidden sm:inline">{prev.label}</span>}
</button>
{/* 페이지 인디케이터 */}
<div className="flex items-center gap-2 px-2">
{PAGE_FLOW.map((page, i) => (
<button
key={page.path}
onClick={() => navigate(page.path)}
title={page.label}
aria-label={page.label}
className={`rounded-full transition-all cursor-pointer ${
i === currentIndex
? "w-6 h-2 bg-navy-900"
: "w-2 h-2 bg-neutral-40 hover:bg-neutral-60"
}`}
/>
))}
</div>
{/* 다음 페이지 */}
<button
onClick={() => next && navigate(next.path)}
disabled={!next}
aria-label={next ? `다음: ${next.label}` : "다음 페이지 없음"}
className="body-14-medium flex items-center gap-2 px-3 py-2 rounded-full text-neutral-70 transition-all hover:bg-neutral-20 hover:text-navy-900 disabled:opacity-30 disabled:cursor-not-allowed cursor-pointer"
>
{next && <span className="hidden sm:inline">{next.label}</span>}
<ChevronRightIcon aria-hidden="true" />
</button>
</div>
);
}
+2
View File
@@ -0,0 +1,2 @@
/// <reference types="vite/client" />
/// <reference types="vite-plugin-svgr/client" />