라우팅 추가 및 CSS 구성
- 개인 블로그 - 로또 - 여행 로고 이미지 추가 및 변경
This commit is contained in:
203
src/pages/home/Home.css
Normal file
203
src/pages/home/Home.css
Normal file
@@ -0,0 +1,203 @@
|
||||
.home {
|
||||
display: grid;
|
||||
gap: 60px;
|
||||
}
|
||||
|
||||
.home > section {
|
||||
animation: fadeUp 0.7s ease both;
|
||||
}
|
||||
|
||||
.home > section:nth-child(1) {
|
||||
animation-delay: 0.05s;
|
||||
}
|
||||
|
||||
.home > section:nth-child(2) {
|
||||
animation-delay: 0.12s;
|
||||
}
|
||||
|
||||
.home > section:nth-child(3) {
|
||||
animation-delay: 0.18s;
|
||||
}
|
||||
|
||||
.home-hero {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
|
||||
gap: 32px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.home-hero__kicker {
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.28em;
|
||||
color: var(--accent);
|
||||
margin: 0 0 12px;
|
||||
}
|
||||
|
||||
.home-hero h1 {
|
||||
font-family: var(--font-display);
|
||||
font-size: clamp(32px, 4vw, 46px);
|
||||
margin: 0 0 16px;
|
||||
}
|
||||
|
||||
.home-hero__lead {
|
||||
color: var(--muted);
|
||||
line-height: 1.7;
|
||||
margin: 0 0 24px;
|
||||
}
|
||||
|
||||
.home-hero__actions {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.home-hero__card {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 24px;
|
||||
padding: 24px;
|
||||
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.home-hero__card-title {
|
||||
margin: 0 0 12px;
|
||||
color: var(--muted);
|
||||
font-size: 13px;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.home-hero__card-body h2 {
|
||||
font-family: var(--font-display);
|
||||
font-size: 24px;
|
||||
margin: 0 0 12px;
|
||||
}
|
||||
|
||||
.home-hero__stats {
|
||||
margin-top: 20px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
border-top: 1px solid var(--line);
|
||||
padding-top: 16px;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
margin: 6px 0 0;
|
||||
font-weight: 600;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.home-section__header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.home-section__header h2 {
|
||||
margin: 0;
|
||||
font-size: 26px;
|
||||
font-family: var(--font-display);
|
||||
}
|
||||
|
||||
.home-section__header p {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.home-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.home-card {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
gap: 16px;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
padding: 18px;
|
||||
border-radius: 18px;
|
||||
border: 1px solid var(--line);
|
||||
background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
|
||||
transition: transform 0.2s ease, border-color 0.2s ease;
|
||||
}
|
||||
|
||||
.home-card:hover {
|
||||
transform: translateY(-4px);
|
||||
border-color: rgba(255, 255, 255, 0.22);
|
||||
}
|
||||
|
||||
.home-card__title {
|
||||
font-weight: 600;
|
||||
font-size: 18px;
|
||||
margin: 0 0 8px;
|
||||
}
|
||||
|
||||
.home-card__desc {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.home-card__cta {
|
||||
font-size: 13px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.2em;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
.home-posts {
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.home-post {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
border: 1px solid var(--line);
|
||||
padding: 16px 18px;
|
||||
border-radius: 16px;
|
||||
background: var(--surface);
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
transition: border-color 0.2s ease;
|
||||
}
|
||||
|
||||
.home-post:hover {
|
||||
border-color: rgba(255, 255, 255, 0.25);
|
||||
}
|
||||
|
||||
.home-post__title {
|
||||
margin: 0;
|
||||
font-weight: 600;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.home-post__excerpt {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.home-post__meta {
|
||||
font-size: 12px;
|
||||
color: var(--accent);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.14em;
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.home-hero {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
89
src/pages/home/Home.jsx
Normal file
89
src/pages/home/Home.jsx
Normal file
@@ -0,0 +1,89 @@
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { navLinks } from '../../routes.jsx';
|
||||
import { getBlogPosts } from '../../data/blog';
|
||||
import './Home.css';
|
||||
|
||||
const Home = () => {
|
||||
const posts = getBlogPosts().slice(0, 3);
|
||||
const highlights = navLinks.filter((link) => link.id !== 'home');
|
||||
|
||||
return (
|
||||
<div className="home">
|
||||
<section className="home-hero">
|
||||
<div className="home-hero__text">
|
||||
<p className="home-hero__kicker">Personal Archive</p>
|
||||
<h1>기록을 모으고, 이야기를 이어붙이는 작은 집.</h1>
|
||||
<p className="home-hero__lead">
|
||||
개발 실험, 여행 스냅, 그리고 생각을 모아두는 공간입니다. 블로그 글은
|
||||
마크다운으로 작성해 계속 추가할 수 있어요.
|
||||
</p>
|
||||
<div className="home-hero__actions">
|
||||
<Link className="button primary" to="/blog">
|
||||
블로그 둘러보기
|
||||
</Link>
|
||||
<Link className="button ghost" to="/travel">
|
||||
여행 갤러리 열기
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
<div className="home-hero__card">
|
||||
<p className="home-hero__card-title">이번 달 집중 테마</p>
|
||||
<div className="home-hero__card-body">
|
||||
<h2>느린 기록, 깊은 회고</h2>
|
||||
<p>
|
||||
빠르게 업데이트하는 대신, 한 번쯤 되돌아보며 기록하는 걸 목표로
|
||||
합니다. 글은 매주 한 편씩 추가될 예정이에요.
|
||||
</p>
|
||||
</div>
|
||||
<div className="home-hero__stats">
|
||||
<div>
|
||||
<p className="stat-label">게시 글</p>
|
||||
<p className="stat-value">{posts.length}편</p>
|
||||
</div>
|
||||
<div>
|
||||
<p className="stat-label">다음 업데이트</p>
|
||||
<p className="stat-value">이번 주말</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="home-section">
|
||||
<div className="home-section__header">
|
||||
<h2>공간 둘러보기</h2>
|
||||
<p>확장 가능한 구조로 구성해 이후에도 쉽게 페이지를 추가할 수 있습니다.</p>
|
||||
</div>
|
||||
<div className="home-grid">
|
||||
{highlights.map((item) => (
|
||||
<Link key={item.id} to={item.path} className="home-card">
|
||||
<div>
|
||||
<p className="home-card__title">{item.label}</p>
|
||||
<p className="home-card__desc">{item.description}</p>
|
||||
</div>
|
||||
<span className="home-card__cta">열기</span>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="home-section">
|
||||
<div className="home-section__header">
|
||||
<h2>최근 블로그</h2>
|
||||
<p>마크다운 파일을 추가하면 자동으로 목록에 반영됩니다.</p>
|
||||
</div>
|
||||
<div className="home-posts">
|
||||
{posts.map((post) => (
|
||||
<Link key={post.slug} to="/blog" className="home-post">
|
||||
<p className="home-post__title">{post.title}</p>
|
||||
<p className="home-post__excerpt">{post.excerpt}</p>
|
||||
<span className="home-post__meta">{post.date || '작성일 미정'}</span>
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Home;
|
||||
Reference in New Issue
Block a user