Skip to content

Commit 73ac9b2

Browse files
committed
Add downloads hub page
1 parent 620f449 commit 73ac9b2

3 files changed

Lines changed: 110 additions & 1 deletion

File tree

src/app/downloads/page.tsx

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
import type { Metadata } from 'next';
2+
import Image from 'next/image';
3+
import Link from 'next/link';
4+
5+
const DOWNLOADS_DESCRIPTION =
6+
'Dechive에서 만든 무료 전자책과 자료를 모아둔 다운로드 서가입니다.';
7+
8+
const downloads = [
9+
{
10+
title: 'AI가 낯선 사람들을 위한 AI 이해 가이드',
11+
description: 'AI에 낯선 사람들이 AI를 제대로 이해할 수 있도록 정리한 무료 전자책입니다.',
12+
href: '/downloads/parents-ai-guide',
13+
image: '/downloads/parents-ai-guide-cover.webp',
14+
meta: 'PDF · 무료 전자책',
15+
},
16+
];
17+
18+
export const metadata: Metadata = {
19+
title: 'Downloads',
20+
description: DOWNLOADS_DESCRIPTION,
21+
alternates: {
22+
canonical: 'https://dechive.dev/downloads',
23+
},
24+
openGraph: {
25+
title: 'Downloads | Dechive',
26+
description: DOWNLOADS_DESCRIPTION,
27+
url: 'https://dechive.dev/downloads',
28+
siteName: 'Dechive',
29+
locale: 'ko_KR',
30+
type: 'website',
31+
images: [
32+
{
33+
url: 'https://dechive.dev/images/thumb.webp',
34+
width: 1200,
35+
height: 630,
36+
alt: 'Dechive Downloads',
37+
},
38+
],
39+
},
40+
twitter: {
41+
card: 'summary_large_image',
42+
title: 'Downloads | Dechive',
43+
description: DOWNLOADS_DESCRIPTION,
44+
images: ['https://dechive.dev/images/thumb.webp'],
45+
},
46+
};
47+
48+
export default function DownloadsPage() {
49+
return (
50+
<main className="min-h-[calc(100vh-5rem)] bg-[#f8f6f1] px-6 py-16 text-[#19140f] sm:px-8 lg:py-20">
51+
<section className="mx-auto max-w-5xl">
52+
<div className="border-b border-[#ded6c9] pb-10">
53+
<p className="text-xs font-medium tracking-[0.24em] text-[#9a7a3f] uppercase">
54+
Dechive Downloads
55+
</p>
56+
<h1 className="mt-5 font-[family-name:var(--font-header-serif)] text-4xl font-medium text-[#2a211b] sm:text-5xl">
57+
무료 자료 서가
58+
</h1>
59+
<p className="mt-5 max-w-2xl text-sm leading-7 text-[#6f6257]">
60+
Dechive에서 만든 전자책과 자료를 모아둡니다.
61+
<br className="hidden sm:block" />
62+
AI 시대의 답을 더 천천히 이해하고 검증하기 위한 다운로드 공간입니다.
63+
</p>
64+
</div>
65+
66+
<div className="mt-10 grid gap-6 md:grid-cols-2">
67+
{downloads.map((download) => (
68+
<Link
69+
key={download.href}
70+
href={download.href}
71+
className="group grid overflow-hidden rounded-md border border-[#d8c9b0] bg-[#fbfaf7] shadow-[0_18px_60px_rgba(42,33,27,0.06)] transition-colors hover:border-[#b08d57]/70 sm:grid-cols-[10rem_1fr]"
72+
>
73+
<div className="relative min-h-64 bg-[#efe7da] sm:min-h-0">
74+
<Image
75+
src={download.image}
76+
alt=""
77+
fill
78+
sizes="(min-width: 768px) 160px, 100vw"
79+
className="object-cover transition-transform duration-500 group-hover:scale-[1.03]"
80+
/>
81+
</div>
82+
<div className="flex flex-col justify-between p-6">
83+
<div>
84+
<p className="text-xs font-semibold tracking-[0.18em] text-[#9a7a3f] uppercase">
85+
{download.meta}
86+
</p>
87+
<h2 className="mt-4 font-[family-name:var(--font-header-serif)] text-2xl font-medium leading-snug text-[#2a211b]">
88+
{download.title}
89+
</h2>
90+
<p className="mt-4 text-sm leading-7 text-[#6f6257]">
91+
{download.description}
92+
</p>
93+
</div>
94+
<span className="mt-7 text-sm font-semibold text-[#7a5d2c] transition-colors group-hover:text-[#17120d]">
95+
무료 전자책 보기
96+
</span>
97+
</div>
98+
</Link>
99+
))}
100+
</div>
101+
</section>
102+
</main>
103+
);
104+
}

src/app/sitemap.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export default function sitemap(): MetadataRoute.Sitemap {
2323
{ url: `${BASE_URL}/en/archive`, lastModified: new Date(), changeFrequency: 'daily', priority: 0.8 },
2424
{ url: `${BASE_URL}/deep-dive`, lastModified: new Date(), changeFrequency: 'monthly', priority: 0.8 },
2525
{ url: `${BASE_URL}/en/deep-dive`, lastModified: new Date(), changeFrequency: 'monthly', priority: 0.7 },
26+
{ url: `${BASE_URL}/downloads`, lastModified: new Date(), changeFrequency: 'monthly', priority: 0.6 },
2627
{ url: `${BASE_URL}/about`, lastModified: new Date(), changeFrequency: 'monthly', priority: 0.6 },
2728
{ url: `${BASE_URL}/guestbook`, lastModified: new Date(), changeFrequency: 'monthly', priority: 0.4 },
2829
{ url: `${BASE_URL}/privacy-policy`, lastModified: new Date(), changeFrequency: 'yearly', priority: 0.3 },

src/components/layout/Header.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import MusicToggle from './MusicToggle';
1111
const NAV_ITEMS = [
1212
{ name: 'Archive', href: '/archive' },
1313
{ name: 'Deep Dive', href: '/deep-dive' },
14+
{ name: 'Downloads', href: '/downloads' },
1415
{ name: 'About', href: '/about' },
1516
];
1617

@@ -35,6 +36,9 @@ export default function Header() {
3536
if (href === '/deep-dive') {
3637
return pathname.startsWith('/deep-dive') || pathname.startsWith('/en/deep-dive');
3738
}
39+
if (href === '/downloads') {
40+
return pathname.startsWith('/downloads');
41+
}
3842
return pathname === href;
3943
};
4044

@@ -53,7 +57,7 @@ export default function Header() {
5357
</Link>
5458

5559
<nav className="absolute left-1/2 hidden -translate-x-1/2 items-center md:flex">
56-
<ul className="flex items-center gap-11">
60+
<ul className="flex items-center gap-8 xl:gap-11">
5761
{NAV_ITEMS.map((item) => (
5862
<li key={item.name}>
5963
<Link

0 commit comments

Comments
 (0)