[feat] landing: 솔루션 랜딩페이지 신규 — 히어로·데모·ROI 시뮬레이터 섹션, docker 서비스(:3100) 추가
This commit is contained in:
1 parent
25e13d7b01
commit
03c22f9474
43 files changed
+5172
No files matched your search
@@ -0,0 +1,40 @@
|
||||
import * as React from "react"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
// CTA 버튼 토큰. 랜딩의 CTA 는 전부 앵커 스크롤이라 href 를 주면 <a> 로 렌더한다
|
||||
// (SSG 특성상 하이드레이션 전에도 동작).
|
||||
const buttonVariants = cva(
|
||||
"inline-flex items-center justify-center gap-2 transition-all cursor-pointer disabled:opacity-50",
|
||||
{
|
||||
variants: {
|
||||
variant: {
|
||||
primary: "bg-primary hover:bg-primary-deep text-white",
|
||||
secondary: "bg-fill hover:bg-fill-hover text-ink-soft hover:text-ink",
|
||||
// 밝은 배경 위 반투명 보조 버튼 (글라스 히어로)
|
||||
glass: "bg-white/70 hover:bg-white text-ink-soft hover:text-ink border border-white shadow-sm",
|
||||
},
|
||||
size: {
|
||||
pill: "px-4.5 py-2.5 text-sm font-semibold rounded-full",
|
||||
md: "px-6 py-2.5 text-xs font-bold rounded-full",
|
||||
lg: "px-8 py-4.5 text-base font-bold rounded-[20px]",
|
||||
xl: "px-10 py-5 text-base font-bold rounded-[22px]",
|
||||
},
|
||||
},
|
||||
defaultVariants: { variant: "primary", size: "lg" },
|
||||
},
|
||||
)
|
||||
|
||||
type ButtonProps = VariantProps<typeof buttonVariants> &
|
||||
React.ButtonHTMLAttributes<HTMLButtonElement> &
|
||||
React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
||||
href?: string
|
||||
}
|
||||
|
||||
function Button({ className, variant, size, href, ...props }: ButtonProps) {
|
||||
const Comp: React.ElementType = href ? "a" : "button"
|
||||
return <Comp href={href} className={cn(buttonVariants({ variant, size }), className)} {...props} />
|
||||
}
|
||||
|
||||
export { Button, buttonVariants }
|
||||
@@ -0,0 +1,35 @@
|
||||
import type * as React from "react"
|
||||
|
||||
/** 데스크톱 브라우저 목업 프레임 — 신호등 버튼 + 주소창 + 16:10 워크스페이스. */
|
||||
function BrowserFrame({ url, children }: { url: string; children: React.ReactNode }) {
|
||||
return (
|
||||
<div className="bg-white rounded-2xl border border-line-strong shadow-[0_12px_40px_rgba(0,0,0,0.06)] overflow-hidden w-full max-w-2xl">
|
||||
<div className="bg-fill px-4 py-3.5 flex items-center justify-between border-b border-line-strong">
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="w-3 h-3 rounded-full bg-[#FF5F56] inline-block" />
|
||||
<span className="w-3 h-3 rounded-full bg-[#FFBD2E] inline-block" />
|
||||
<span className="w-3 h-3 rounded-full bg-[#27C93F] inline-block" />
|
||||
<span className="text-[11px] text-ink-muted font-mono ml-3 font-semibold bg-white px-3 py-1 rounded-md border border-line-strong truncate max-w-[180px] sm:max-w-none">
|
||||
{url}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="relative bg-surface aspect-[16/10] flex flex-col justify-center items-center overflow-hidden">{children}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
/** 모바일 폰 목업 프레임 — 노치 포함 9:18 스크린. */
|
||||
function PhoneFrame({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<div className="relative bg-black rounded-[48px] p-3 shadow-[0_20px_50px_rgba(0,0,0,0.15)] border-4 border-line-strong w-full max-w-[290px] aspect-[9/18] overflow-hidden flex flex-col">
|
||||
<div className="absolute top-4 left-1/2 -translate-x-1/2 bg-black h-5 w-28 rounded-full z-20 flex items-center justify-around px-4">
|
||||
<span className="w-1.5 h-1.5 rounded-full bg-[#1F2022]" />
|
||||
<span className="w-10 h-1 bg-[#1F2022] rounded-full" />
|
||||
</div>
|
||||
<div className="bg-white rounded-[36px] flex-1 overflow-hidden relative flex flex-col justify-center items-center">{children}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export { BrowserFrame, PhoneFrame }
|
||||
@@ -0,0 +1,17 @@
|
||||
import * as React from "react"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
// 문의 폼 필드 공통 스타일 — 테두리 없는 회색 채움, 포커스 시 흰 배경 + 파란 링.
|
||||
const fieldClass =
|
||||
"w-full px-5 py-3.5 rounded-2xl bg-surface hover:bg-fill focus:bg-white border-0 focus:ring-2 focus:ring-primary/20 text-sm font-semibold text-ink transition-all placeholder:text-ink-faint outline-none"
|
||||
|
||||
function Input({ className, ...props }: React.InputHTMLAttributes<HTMLInputElement>) {
|
||||
return <input className={cn(fieldClass, className)} {...props} />
|
||||
}
|
||||
|
||||
function Textarea({ className, ...props }: React.TextareaHTMLAttributes<HTMLTextAreaElement>) {
|
||||
return <textarea className={cn(fieldClass, "resize-none", className)} {...props} />
|
||||
}
|
||||
|
||||
export { Input, Textarea }
|
||||
@@ -0,0 +1,8 @@
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
/** NEGOTIUM 워드마크 (public/logo.png). 헤더·푸터 공용 — 크기는 className 의 h-* 로 조정. */
|
||||
function Logo({ className }: { className?: string }) {
|
||||
return <img src="/logo.png" alt="NEGOTIUM" className={cn("h-4 w-auto", className)} />
|
||||
}
|
||||
|
||||
export { Logo }
|
||||
@@ -0,0 +1,28 @@
|
||||
type RangeSliderProps = {
|
||||
min: number
|
||||
max: number
|
||||
step: number
|
||||
value: number
|
||||
onChange: (value: number) => void
|
||||
}
|
||||
|
||||
/** 채워진 트랙이 값을 따라가는 파란 슬라이더 (ROI 시뮬레이터·히어로 콘솔 공용). */
|
||||
function RangeSlider({ min, max, step, value, onChange }: RangeSliderProps) {
|
||||
const filled = ((value - min) / (max - min)) * 100
|
||||
return (
|
||||
<input
|
||||
type="range"
|
||||
min={min}
|
||||
max={max}
|
||||
step={step}
|
||||
value={value}
|
||||
onChange={(e) => onChange(Number(e.target.value))}
|
||||
className="w-full h-1.5 rounded-lg appearance-none cursor-pointer accent-primary transition-all"
|
||||
style={{
|
||||
background: `linear-gradient(to right, var(--color-primary) 0%, var(--color-primary) ${filled}%, var(--color-line-strong) ${filled}%, var(--color-line-strong) 100%)`,
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export { RangeSlider }
|
||||
@@ -0,0 +1,32 @@
|
||||
import * as React from "react"
|
||||
|
||||
import { Typography } from "@/components/ui/typography"
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
type SectionHeadingProps = {
|
||||
eyebrow: string
|
||||
title: React.ReactNode
|
||||
description?: React.ReactNode
|
||||
align?: "left" | "center"
|
||||
className?: string
|
||||
/** 리드 문단 폭 제한 등 (예: "max-w-2xl") */
|
||||
descriptionClassName?: string
|
||||
}
|
||||
|
||||
function SectionHeading({ eyebrow, title, description, align = "left", className, descriptionClassName }: SectionHeadingProps) {
|
||||
return (
|
||||
<div className={cn(align === "center" && "text-center", className)}>
|
||||
<Typography variant="eyebrow" className="mb-3 block">
|
||||
{eyebrow}
|
||||
</Typography>
|
||||
<Typography variant="title">{title}</Typography>
|
||||
{description && (
|
||||
<Typography variant="lead" className={cn("mt-5", align === "center" && "mx-auto", descriptionClassName)}>
|
||||
{description}
|
||||
</Typography>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export { SectionHeading }
|
||||
@@ -0,0 +1,49 @@
|
||||
import * as React from "react"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
const sectionBg = {
|
||||
white: "bg-white",
|
||||
surface: "bg-surface",
|
||||
dark: "bg-ink text-white",
|
||||
}
|
||||
|
||||
const sectionWidth = {
|
||||
sm: "max-w-3xl",
|
||||
md: "max-w-4xl",
|
||||
lg: "max-w-5xl",
|
||||
}
|
||||
|
||||
type SectionProps = React.HTMLAttributes<HTMLElement> & {
|
||||
bg?: keyof typeof sectionBg
|
||||
/** 내부 컨테이너 최대폭 */
|
||||
width?: keyof typeof sectionWidth
|
||||
/** 상단 구분선. 하단까지 필요하면 className 에 border-b border-line 추가 */
|
||||
bordered?: boolean
|
||||
/** 컨테이너 밖(섹션 전체 기준)에 까는 장식 요소 — 배경 블롭 등 */
|
||||
decor?: React.ReactNode
|
||||
containerClassName?: string
|
||||
}
|
||||
|
||||
function Section({
|
||||
bg = "white",
|
||||
width = "md",
|
||||
bordered = false,
|
||||
decor,
|
||||
className,
|
||||
containerClassName,
|
||||
children,
|
||||
...props
|
||||
}: SectionProps) {
|
||||
return (
|
||||
<section
|
||||
className={cn("py-36 md:py-44", sectionBg[bg], bordered && "border-t border-line", decor && "relative overflow-hidden", className)}
|
||||
{...props}
|
||||
>
|
||||
{decor}
|
||||
<div className={cn("mx-auto px-6", sectionWidth[width], decor && "relative z-10", containerClassName)}>{children}</div>
|
||||
</section>
|
||||
)
|
||||
}
|
||||
|
||||
export { Section }
|
||||
@@ -0,0 +1,65 @@
|
||||
import type * as React from "react"
|
||||
|
||||
import type { SlateElement, SlateText } from "@/types"
|
||||
|
||||
function SlateRenderer({ nodes }: { nodes: SlateElement[] }) {
|
||||
return (
|
||||
<div className="space-y-1">
|
||||
{nodes.map((node, index) => (
|
||||
<SlateNode key={index} node={node} />
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
function SlateNode({ node }: { node: SlateElement }) {
|
||||
const alignClass = node.align === "center" ? "text-center" : node.align === "right" ? "text-right" : "text-left"
|
||||
|
||||
switch (node.type) {
|
||||
case "heading":
|
||||
return (
|
||||
<h4 className={`text-xs md:text-sm font-mono font-medium tracking-tight ${alignClass} mb-1.5`}>
|
||||
{node.children.map((child, idx) => (
|
||||
<SlateLeaf key={idx} leaf={child} />
|
||||
))}
|
||||
</h4>
|
||||
)
|
||||
case "bullet-list":
|
||||
return (
|
||||
<ul className="list-disc pl-5 mb-1.5 font-sans text-xs md:text-sm">
|
||||
{node.children.map((child, idx) => (
|
||||
<li key={idx} className={alignClass}>
|
||||
{child.text}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)
|
||||
case "paragraph":
|
||||
default:
|
||||
return (
|
||||
<div className={`text-xs md:text-sm leading-relaxed ${alignClass} font-sans`}>
|
||||
{node.children.map((child, idx) => (
|
||||
<SlateLeaf key={idx} leaf={child} />
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
function SlateLeaf({ leaf }: { leaf: SlateText }) {
|
||||
let children: React.ReactNode = leaf.text
|
||||
|
||||
if (leaf.bold) {
|
||||
children = <strong className="font-bold">{children}</strong>
|
||||
}
|
||||
if (leaf.italic) {
|
||||
children = <em className="italic">{children}</em>
|
||||
}
|
||||
if (leaf.code) {
|
||||
children = <code className="bg-primary/10 px-1.5 py-0.5 rounded-lg font-mono text-xs text-primary font-bold">{children}</code>
|
||||
}
|
||||
|
||||
return <span>{children}</span>
|
||||
}
|
||||
|
||||
export { SlateRenderer }
|
||||
@@ -0,0 +1,58 @@
|
||||
import * as React from "react"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
// 랜딩 텍스트 스케일 단일 소스. 페이지마다 text-[44px]/font-black/…을 직접 박지 말고
|
||||
// variant 로 통일한다. 색·크기 미세조정은 className 으로 합성.
|
||||
const typographyVariants = cva("", {
|
||||
variants: {
|
||||
variant: {
|
||||
// 히어로 h1
|
||||
display: "text-3xl sm:text-4xl md:text-[50px] font-black tracking-tight leading-[1.2] text-ink break-keep",
|
||||
// 섹션 제목 h2
|
||||
title: "text-3xl md:text-[44px] font-black tracking-tight leading-tight text-ink break-keep",
|
||||
// 섹션 내 서브 제목 (데모 패널 등)
|
||||
heading: "text-2xl md:text-3xl font-bold tracking-tight text-ink break-keep",
|
||||
// 카드 제목
|
||||
cardTitle: "text-lg font-bold text-ink break-keep",
|
||||
// 섹션 상단 오버라인 라벨
|
||||
eyebrow: "text-sm font-semibold text-primary tracking-wider uppercase",
|
||||
// 섹션 리드 문단
|
||||
lead: "text-base sm:text-lg text-ink-soft font-medium leading-relaxed break-keep",
|
||||
body: "text-[15px] text-ink-soft font-medium leading-relaxed break-keep",
|
||||
small: "text-sm text-ink-soft font-medium leading-relaxed break-keep",
|
||||
caption: "text-xs text-ink-muted font-semibold leading-relaxed break-keep",
|
||||
// 11px 트래킹 대문자 메타 라벨 (단가 패널·푸터 컬럼 제목 등)
|
||||
micro: "text-[11px] font-bold text-ink-muted uppercase tracking-wider",
|
||||
},
|
||||
},
|
||||
defaultVariants: { variant: "body" },
|
||||
})
|
||||
|
||||
const defaultTag: Record<NonNullable<VariantProps<typeof typographyVariants>["variant"]>, React.ElementType> = {
|
||||
display: "h1",
|
||||
title: "h2",
|
||||
heading: "h3",
|
||||
cardTitle: "h3",
|
||||
eyebrow: "span",
|
||||
lead: "p",
|
||||
body: "p",
|
||||
small: "p",
|
||||
caption: "p",
|
||||
micro: "span",
|
||||
}
|
||||
|
||||
type TypographyProps = React.HTMLAttributes<HTMLElement> &
|
||||
VariantProps<typeof typographyVariants> & {
|
||||
/** 의미상 태그를 강제로 바꾸고 싶을 때 (예: cardTitle 을 h4 로) */
|
||||
as?: React.ElementType
|
||||
htmlFor?: string
|
||||
}
|
||||
|
||||
function Typography({ className, variant, as, ...props }: TypographyProps) {
|
||||
const Comp = as ?? defaultTag[variant ?? "body"]
|
||||
return <Comp className={cn(typographyVariants({ variant }), className)} {...props} />
|
||||
}
|
||||
|
||||
export { Typography, typographyVariants }
|
||||
Reference in new issue
Block a user