UI 디자인 대대적으로 대시보드 형태의 전문적인 느낌으로 재구성

This commit is contained in:
2026-03-04 01:39:26 +09:00
parent 840b0a5300
commit 618d5f8e6f
21 changed files with 3499 additions and 374 deletions

61
src/components/Icons.jsx Normal file
View File

@@ -0,0 +1,61 @@
const S = {
fill: 'none',
stroke: 'currentColor',
strokeWidth: '1.6',
strokeLinecap: 'round',
strokeLinejoin: 'round',
};
const svg = (children) => (
<svg width="18" height="18" viewBox="0 0 24 24" {...S}>
{children}
</svg>
);
export const IconHome = () =>
svg(
<>
<path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" />
<polyline points="9,22 9,12 15,12 15,22" />
</>
);
export const IconBlog = () =>
svg(
<>
<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" />
<path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" />
</>
);
export const IconLotto = () =>
svg(
<>
<circle cx="12" cy="12" r="10" />
<circle cx="8.5" cy="9.5" r="1.4" fill="currentColor" strokeWidth="0" />
<circle cx="15.5" cy="9.5" r="1.4" fill="currentColor" strokeWidth="0" />
<circle cx="8.5" cy="14.5" r="1.4" fill="currentColor" strokeWidth="0" />
<circle cx="15.5" cy="14.5" r="1.4" fill="currentColor" strokeWidth="0" />
<circle cx="12" cy="12" r="1.4" fill="currentColor" strokeWidth="0" />
</>
);
export const IconStock = () =>
svg(
<>
<polyline points="22,7 13.5,15.5 8.5,10.5 2,17" />
<polyline points="16,7 22,7 22,13" />
</>
);
export const IconTravel = () =>
svg(<polygon points="3,11 22,2 13,21 11,13 3,11" />);
export const IconLab = () =>
svg(
<>
<line x1="9" y1="3" x2="15" y2="3" />
<path d="M10 3v6.5L5.5 17.5A2 2 0 0 0 7.3 20h9.4a2 2 0 0 0 1.8-2.5L14 9.5V3" />
<line x1="6.5" y1="15" x2="17.5" y2="15" />
</>
);

View File

@@ -8,49 +8,58 @@
}
.loading-spinner__circle {
width: 32px;
height: 32px;
border: 3px solid rgba(255, 255, 255, 0.1);
width: 28px;
height: 28px;
border: 2px solid rgba(255, 255, 255, 0.08);
border-radius: 50%;
border-top-color: var(--accent, #f7a8a5);
animation: spin 0.8s linear infinite;
animation: loading-spin 0.75s linear infinite;
}
.loading-spinner__text {
font-size: 13px;
color: var(--muted, #b6b1a9);
font-size: 12px;
color: var(--muted, #9b9490);
margin: 0;
letter-spacing: 0.04em;
}
@keyframes spin {
@keyframes loading-spin {
to {
transform: rotate(360deg);
}
}
/* ── Skeleton ─────────────────────────────────────────────────────── */
.loading-skeleton {
display: grid;
gap: 12px;
padding: 16px;
gap: 14px;
padding: 4px 0;
width: 100%;
}
.loading-skeleton__line {
height: 16px;
border-radius: 4px;
height: 14px;
border-radius: 7px;
background: linear-gradient(
90deg,
rgba(255, 255, 255, 0.05) 25%,
rgba(255, 255, 255, 0.1) 50%,
rgba(255, 255, 255, 0.05) 75%
90deg,
rgba(255, 255, 255, 0.04) 0%,
rgba(255, 255, 255, 0.09) 40%,
rgba(255, 255, 255, 0.04) 80%
);
background-size: 200% 100%;
animation: pulse 1.5s ease-in-out infinite;
background-size: 300% 100%;
animation: loading-shimmer 1.8s ease-in-out infinite;
}
@keyframes pulse {
.loading-skeleton__line:nth-child(1) { width: 65%; }
.loading-skeleton__line:nth-child(2) { width: 85%; animation-delay: 0.1s; }
.loading-skeleton__line:nth-child(3) { width: 50%; animation-delay: 0.2s; }
.loading-skeleton__line:nth-child(4) { width: 75%; animation-delay: 0.15s; }
.loading-skeleton__line:nth-child(5) { width: 60%; animation-delay: 0.25s; }
@keyframes loading-shimmer {
0% {
background-position: 200% 0;
background-position: 100% 0;
}
100% {
background-position: -200% 0;

View File

@@ -1,126 +1,357 @@
.site-nav {
position: sticky;
/* ── 사이드바 본체 ───────────────────────────────────────────────────── */
.sidebar {
position: fixed;
left: 0;
top: 0;
z-index: 10;
background: rgba(16, 16, 24, 0.82);
backdrop-filter: blur(10px);
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-nav__inner {
max-width: 1200px;
margin: 0 auto;
padding: 18px 20px;
bottom: 0;
width: var(--sidebar-w);
z-index: 200;
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
flex-direction: column;
background: rgba(7, 12, 28, 0.92);
backdrop-filter: blur(20px) saturate(1.5);
-webkit-backdrop-filter: blur(20px) saturate(1.5);
border-right: 1px solid rgba(0, 212, 255, 0.08);
box-shadow: 4px 0 40px rgba(0, 0, 0, 0.5), 1px 0 0 rgba(0, 212, 255, 0.05);
transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
overflow: hidden;
}
.site-nav__brand {
display: flex;
align-items: center;
gap: 14px;
}
/* ── 브랜드 섹션 ─────────────────────────────────────────────────────── */
.site-nav__logo-image {
width: 42px;
height: 42px;
border-radius: 14px;
object-fit: cover;
box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}
.site-nav__logo {
width: 42px;
height: 42px;
border-radius: 14px;
display: grid;
place-items: center;
font-family: var(--font-display);
font-size: 20px;
color: #1b1a24;
background: linear-gradient(135deg, #fdd4b1, #f7a8a5);
box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}
.site-nav__title {
margin: 0;
font-weight: 600;
letter-spacing: 0.02em;
}
.site-nav__subtitle {
margin: 4px 0 0;
font-size: 12px;
color: var(--muted);
}
.site-nav__links {
.sidebar__brand {
display: flex;
align-items: center;
gap: 12px;
flex-wrap: wrap;
padding: 20px 16px;
flex-shrink: 0;
}
.site-nav__link {
.sidebar__logo {
width: 38px;
height: 38px;
border-radius: 12px;
object-fit: cover;
flex-shrink: 0;
box-shadow:
0 0 0 1px rgba(0, 212, 255, 0.2),
0 0 12px rgba(0, 212, 255, 0.15),
0 4px 12px rgba(0, 0, 0, 0.4);
}
.sidebar__brand-text {
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
}
.sidebar__brand-name {
margin: 0;
font-family: 'Space Grotesk', 'Manrope', sans-serif;
font-weight: 700;
font-size: 15px;
color: var(--text-bright);
letter-spacing: 0.01em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.sidebar__brand-sub {
margin: 0;
font-size: 10px;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.18em;
color: var(--neon-cyan);
white-space: nowrap;
}
/* ── 구분선 ──────────────────────────────────────────────────────────── */
.sidebar__divider {
height: 1px;
background: var(--line, rgba(255, 255, 255, 0.1));
margin: 8px 0;
flex-shrink: 0;
}
/* ── 네비게이션 ──────────────────────────────────────────────────────── */
.sidebar__nav {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
padding: 4px 0;
/* 스크롤바 숨김 */
scrollbar-width: none;
}
.sidebar__nav::-webkit-scrollbar {
display: none;
}
.sidebar__section-label {
margin: 0;
padding: 8px 24px 4px;
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.2em;
color: var(--text-muted);
}
/* ── 네비게이션 아이템 ───────────────────────────────────────────────── */
.sidebar__item {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 14px;
border-radius: var(--radius-sm, 12px);
margin: 2px 10px;
text-decoration: none;
color: var(--text-dim);
font-size: 14px;
letter-spacing: 0.02em;
color: var(--text);
padding: 8px 12px;
border-radius: 999px;
font-weight: 500;
font-family: var(--font-body, 'Manrope', sans-serif);
border: 1px solid transparent;
transition: all 0.2s ease;
position: relative;
transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
overflow: hidden;
}
.site-nav__link:hover {
border-color: rgba(255, 255, 255, 0.18);
background: rgba(255, 255, 255, 0.06);
.sidebar__item:hover {
background: rgba(255, 255, 255, 0.05);
color: var(--text, #f0ebe4);
border-color: rgba(255, 255, 255, 0.08);
}
.site-nav__link.is-active {
border-color: rgba(247, 168, 165, 0.6);
background: rgba(247, 168, 165, 0.16);
color: #ffe9e2;
/* 활성 아이템 */
.sidebar__item.is-active {
background: linear-gradient(90deg, rgba(0, 212, 255, 0.12) 0%, rgba(0, 212, 255, 0.04) 100%);
border-color: rgba(0, 212, 255, 0.2);
color: var(--text-bright);
}
@media (max-width: 800px) {
.site-nav__inner {
flex-direction: column;
align-items: flex-start;
}
/* 활성 아이템 좌측 네온 바 */
.sidebar__item.is-active::before {
content: '';
position: absolute;
left: 0;
top: 20%;
bottom: 20%;
width: 2px;
background: var(--neon-cyan);
border-radius: 0 2px 2px 0;
box-shadow: 0 0 8px var(--neon-cyan), 0 0 16px rgba(0, 212, 255, 0.4);
}
/* ── 아이콘 ──────────────────────────────────────────────────────────── */
.sidebar__item-icon {
display: flex;
align-items: center;
justify-content: center;
width: 18px;
height: 18px;
flex-shrink: 0;
color: inherit;
transition: color 0.2s ease;
}
.sidebar__item.is-active .sidebar__item-icon {
color: var(--neon-cyan);
}
/* ── 라벨 ────────────────────────────────────────────────────────────── */
.sidebar__item-label {
flex: 1;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
/* ── 도트 인디케이터 ─────────────────────────────────────────────────── */
.sidebar__item-dot {
width: 5px;
height: 5px;
border-radius: 50%;
background: var(--neon-cyan);
box-shadow: 0 0 6px var(--neon-cyan);
flex-shrink: 0;
opacity: 0;
transition: opacity 0.2s ease;
}
.sidebar__item.is-active .sidebar__item-dot {
opacity: 1;
}
/* ── 사이드바 푸터 ───────────────────────────────────────────────────── */
.sidebar__footer {
flex-shrink: 0;
margin-top: auto;
}
.sidebar__footer-content {
padding: 12px 16px 16px;
display: flex;
align-items: center;
justify-content: space-between;
}
.sidebar__status {
display: flex;
align-items: center;
gap: 7px;
}
.sidebar__status-dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: #34d399;
box-shadow: 0 0 6px rgba(52, 211, 153, 0.8), 0 0 12px rgba(52, 211, 153, 0.4);
flex-shrink: 0;
animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(52, 211, 153, 0.8), 0 0 12px rgba(52, 211, 153, 0.4); }
50% { opacity: 0.7; box-shadow: 0 0 3px rgba(52, 211, 153, 0.5), 0 0 6px rgba(52, 211, 153, 0.2); }
}
.sidebar__status-text {
font-size: 11px;
color: var(--text-muted);
font-weight: 500;
letter-spacing: 0.02em;
}
.sidebar__version {
margin: 0;
font-size: 10px;
color: var(--text-muted);
font-family: 'JetBrains Mono', 'Fira Code', monospace;
letter-spacing: 0.05em;
opacity: 0.6;
}
/* ── 모바일 토글 버튼 ────────────────────────────────────────────────── */
.sidebar-toggle {
display: none;
position: fixed;
top: 10px;
left: 10px;
z-index: 201;
width: 40px;
height: 40px;
border-radius: 10px;
border: 1px solid rgba(255, 255, 255, 0.12);
background: rgba(7, 12, 28, 0.88);
backdrop-filter: blur(12px) saturate(1.4);
-webkit-backdrop-filter: blur(12px) saturate(1.4);
cursor: pointer;
padding: 0;
align-items: center;
justify-content: center;
transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.sidebar-toggle:hover {
background: rgba(0, 212, 255, 0.1);
border-color: rgba(0, 212, 255, 0.25);
box-shadow: 0 2px 16px rgba(0, 0, 0, 0.4), 0 0 8px rgba(0, 212, 255, 0.15);
}
.sidebar-toggle__icon {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 5px;
width: 18px;
height: 18px;
}
.sidebar-toggle__icon span {
display: block;
width: 16px;
height: 1.5px;
background: var(--text-bright, #ffffff);
border-radius: 2px;
transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
opacity 0.28s ease,
width 0.28s ease;
transform-origin: center;
}
.sidebar-toggle__icon.is-open span:nth-child(1) {
transform: translateY(6.5px) rotate(45deg);
}
.sidebar-toggle__icon.is-open span:nth-child(2) {
opacity: 0;
width: 0;
}
.sidebar-toggle__icon.is-open span:nth-child(3) {
transform: translateY(-6.5px) rotate(-45deg);
}
/* ── 오버레이 ────────────────────────────────────────────────────────── */
.sidebar__overlay {
position: fixed;
inset: 0;
z-index: 199;
background: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
opacity: 0;
pointer-events: none;
transition: opacity 0.3s ease;
}
.sidebar__overlay.is-visible {
opacity: 1;
pointer-events: auto;
}
/* ── 모바일 반응형 ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
.site-nav__inner {
padding: 14px 16px;
gap: 12px;
.sidebar {
transform: translateX(-100%);
}
.site-nav__brand {
gap: 10px;
.sidebar.is-open {
transform: translateX(0);
}
.site-nav__logo-image {
width: 36px;
height: 36px;
}
.site-nav__title {
font-size: 14px;
}
.site-nav__subtitle {
font-size: 11px;
}
.site-nav__links {
gap: 8px;
}
.site-nav__link {
font-size: 13px;
padding: 6px 10px;
.sidebar-toggle {
display: flex;
}
}
/* ── 데스크톱: 토글 버튼 숨김 ────────────────────────────────────────── */
@media (min-width: 769px) {
.sidebar-toggle {
display: none;
}
.sidebar__overlay {
display: none;
}
}

View File

@@ -1,35 +1,92 @@
import React from 'react';
import React, { useEffect, useState } from 'react';
import { NavLink } from 'react-router-dom';
import { navLinks } from '../routes.jsx';
import mainLogo from '../assets/main_logo.png';
import './Navbar.css';
const Navbar = () => {
const [menuOpen, setMenuOpen] = useState(false);
const closeMenu = () => setMenuOpen(false);
useEffect(() => {
document.body.style.overflow = menuOpen ? 'hidden' : '';
return () => {
document.body.style.overflow = '';
};
}, [menuOpen]);
return (
<header className="site-nav">
<div className="site-nav__inner">
<div className="site-nav__brand">
<img src={mainLogo} alt="Logo" className="site-nav__logo-image" />
<div>
<p className="site-nav__title">Jaeoh Archive</p>
<p className="site-nav__subtitle">Stories, notes, and snapshots</p>
<>
{/* 모바일 오버레이 */}
<div
className={`sidebar__overlay${menuOpen ? ' is-visible' : ''}`}
onClick={closeMenu}
aria-hidden="true"
/>
{/* 모바일 토글 버튼 */}
<button
type="button"
className="sidebar-toggle"
onClick={() => setMenuOpen((prev) => !prev)}
aria-label="메뉴 열기/닫기"
aria-expanded={menuOpen}
>
<span className={`sidebar-toggle__icon${menuOpen ? ' is-open' : ''}`}>
<span />
<span />
<span />
</span>
</button>
{/* 사이드바 본체 */}
<aside className={`sidebar${menuOpen ? ' is-open' : ''}`}>
{/* 브랜드 섹션 */}
<div className="sidebar__brand">
<img src={mainLogo} alt="Logo" className="sidebar__logo" />
<div className="sidebar__brand-text">
<p className="sidebar__brand-name">Jaeoh</p>
<p className="sidebar__brand-sub">Dashboard</p>
</div>
</div>
<nav className="site-nav__links">
{/* 구분선 */}
<div className="sidebar__divider" />
{/* 네비게이션 */}
<nav className="sidebar__nav">
<p className="sidebar__section-label">NAVIGATION</p>
{navLinks.map((link) => (
<NavLink
key={link.id}
to={link.path}
onClick={closeMenu}
className={({ isActive }) =>
`site-nav__link${isActive ? ' is-active' : ''}`
`sidebar__item${isActive ? ' is-active' : ''}`
}
style={{ '--item-accent': link.accent }}
end={link.path === '/'}
>
{link.label}
<span className="sidebar__item-icon">{link.icon}</span>
<span className="sidebar__item-label">{link.label}</span>
<span className="sidebar__item-dot" />
</NavLink>
))}
</nav>
</div>
</header>
{/* 사이드바 푸터 */}
<div className="sidebar__footer">
<div className="sidebar__divider" />
<div className="sidebar__footer-content">
<div className="sidebar__status">
<span className="sidebar__status-dot" />
<span className="sidebar__status-text">System Online</span>
</div>
<p className="sidebar__version">v2.0.0</p>
</div>
</div>
</aside>
</>
);
};