라우팅 추가 및 CSS 구성
- 개인 블로그 - 로또 - 여행 로고 이미지 추가 및 변경
This commit is contained in:
109
src/pages/travel/Travel.css
Normal file
109
src/pages/travel/Travel.css
Normal file
@@ -0,0 +1,109 @@
|
||||
.travel {
|
||||
display: grid;
|
||||
gap: 28px;
|
||||
}
|
||||
|
||||
.travel-header {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
|
||||
gap: 24px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.travel-kicker {
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.3em;
|
||||
font-size: 12px;
|
||||
color: var(--accent);
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
|
||||
.travel-header h1 {
|
||||
font-family: var(--font-display);
|
||||
margin: 0 0 12px;
|
||||
font-size: clamp(30px, 4vw, 40px);
|
||||
}
|
||||
|
||||
.travel-sub {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.travel-note {
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 20px;
|
||||
padding: 20px;
|
||||
background: var(--surface);
|
||||
}
|
||||
|
||||
.travel-note__title {
|
||||
margin: 0 0 8px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.travel-note__desc {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.travel-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
||||
gap: 18px;
|
||||
}
|
||||
|
||||
.travel-card {
|
||||
position: relative;
|
||||
border-radius: 20px;
|
||||
overflow: hidden;
|
||||
border: 1px solid rgba(255, 255, 255, 0.12);
|
||||
min-height: 220px;
|
||||
}
|
||||
|
||||
.travel-card.is-wide {
|
||||
grid-column: span 2;
|
||||
}
|
||||
|
||||
.travel-card img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
filter: saturate(1.05);
|
||||
}
|
||||
|
||||
.travel-card__overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.7));
|
||||
color: #f8f4f0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
gap: 6px;
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
.travel-card__title {
|
||||
margin: 0;
|
||||
font-weight: 600;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.travel-card__meta {
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.16em;
|
||||
color: rgba(248, 244, 240, 0.8);
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.travel-header {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.travel-card.is-wide {
|
||||
grid-column: span 1;
|
||||
}
|
||||
}
|
||||
44
src/pages/travel/Travel.jsx
Normal file
44
src/pages/travel/Travel.jsx
Normal file
@@ -0,0 +1,44 @@
|
||||
import React from 'react';
|
||||
import { travelGallery } from '../../data/travel';
|
||||
import './Travel.css';
|
||||
|
||||
const Travel = () => {
|
||||
return (
|
||||
<div className="travel">
|
||||
<header className="travel-header">
|
||||
<div>
|
||||
<p className="travel-kicker">Visual Diary</p>
|
||||
<h1>Travel Archive</h1>
|
||||
<p className="travel-sub">
|
||||
여행에서 본 색감과 분위기를 모아 전시하는 페이지입니다.
|
||||
</p>
|
||||
</div>
|
||||
<div className="travel-note">
|
||||
<p className="travel-note__title">렌더링 포인트</p>
|
||||
<p className="travel-note__desc">
|
||||
사진마다 그리드 크기를 다르게 배치해 리듬을 만들었습니다.
|
||||
</p>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<section className="travel-grid">
|
||||
{travelGallery.map((photo, index) => (
|
||||
<article
|
||||
key={photo.id}
|
||||
className={`travel-card ${index % 3 === 0 ? 'is-wide' : ''}`}
|
||||
>
|
||||
<img src={photo.image} alt={photo.title} loading="lazy" />
|
||||
<div className="travel-card__overlay">
|
||||
<p className="travel-card__title">{photo.title}</p>
|
||||
<p className="travel-card__meta">
|
||||
{photo.location} · {photo.month}
|
||||
</p>
|
||||
</div>
|
||||
</article>
|
||||
))}
|
||||
</section>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Travel;
|
||||
Reference in New Issue
Block a user