Files
TK-FB-Project/web-ui/components/navbar.html
Hyungi Ahn 0ec099b493 feat: UI 표준화 Phase 1 - 네비게이션/헤더 통일
## 주요 변경사항

### 1. Design System 색상 업데이트
- 하늘색 계열 primary 색상으로 변경 (#0ea5e9, #38bdf8, #7dd3fc)
- CSS 변수 추가: --header-gradient

### 2. Navbar 컴포넌트 표준화
- 50개 이상의 하드코딩 값을 CSS 변수로 변경
- 모든 페이지에서 동일한 헤더 스타일 적용

### 3. 중복 코드 제거 (102줄)
- dashboard.html: 50줄 → 2줄 (navbar 컴포넌트로 교체)
- work/report-view.html: 54줄 → 2줄 (navbar 컴포넌트로 교체)
- modern-dashboard.css: 중복 헤더 스타일 제거
- project-management.css: 중복 헤더 스타일 제거

### 4. 표준 레이아웃 템플릿 생성
- dashboard-layout.html (대시보드용)
- work-layout.html (작업 페이지용)
- admin-layout.html (관리자 페이지용)
- simple-layout.html (프로필/설정용)
- templates/README.md (사용 가이드)

### 5. 누락된 design-system.css 추가
- work/report-view.html
- work/analysis.html
- admin/accounts.html

### 6. ES6 Module 문법 수정
- load-navbar.js: type="module" 추가
- modern-dashboard.js: navbar 엘리먼트 안전 처리

## 문서 업데이트
- CODING_GUIDE.md: 표준 컴포넌트 사용법 추가
- 개발 log/2026-01-20-ui-standardization-phase1.md: 상세 작업 로그

## 영향
- 수정: 10개 파일
- 신규: 6개 파일 (템플릿 5개 + 로그 1개)
- 코드 감소: -102줄

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-20 14:08:54 +09:00

327 lines
7.1 KiB
HTML

<!-- components/navbar.html -->
<!-- 최신 대시보드 헤더 -->
<header class="dashboard-header">
<div class="header-content">
<div class="header-left">
<div class="brand">
<img src="/img/logo.png" alt="테크니컬코리아" class="brand-logo">
<div class="brand-text">
<h1 class="brand-title">테크니컬코리아</h1>
<p class="brand-subtitle">생산팀 포털</p>
</div>
</div>
</div>
<div class="header-center">
<div class="current-time" id="currentTime">
<span class="time-label">현재 시각</span>
<span class="time-value" id="timeValue">--:--:--</span>
</div>
</div>
<div class="header-right">
<a href="#" id="dashboardBtn" class="dashboard-btn">
<span class="btn-icon">📊</span>
<span class="btn-text">대시보드</span>
</a>
<div class="user-profile" id="userProfile">
<div class="user-avatar">
<span class="avatar-text" id="userInitial"></span>
</div>
<div class="user-info">
<span class="user-name" id="userName">사용자</span>
<span class="user-role" id="userRole">작업자</span>
</div>
<div class="profile-menu" id="profileMenu">
<a href="/pages/profile/info.html" class="menu-item">
<span class="menu-icon">👤</span>
내 프로필
</a>
<a href="/pages/profile/password.html" class="menu-item">
<span class="menu-icon">🔐</span>
비밀번호 변경
</a>
<a href="/pages/admin/accounts.html" class="menu-item admin-only">
<span class="menu-icon">⚙️</span>
관리자 설정
</a>
<button class="menu-item logout-btn" id="logoutBtn">
<span class="menu-icon">🚪</span>
로그아웃
</button>
</div>
</div>
</div>
</div>
</header>
<style>
/* 최신 대시보드 헤더 스타일 */
.dashboard-header {
background: var(--header-gradient);
color: var(--text-inverse);
padding: var(--space-4) var(--space-6);
box-shadow: var(--shadow-lg);
position: sticky;
top: 0;
z-index: 100;
}
.header-content {
display: flex;
align-items: center;
justify-content: space-between;
max-width: 1400px;
margin: 0 auto;
}
.header-left .brand {
display: flex;
align-items: center;
gap: var(--space-3);
}
.header-right {
display: flex;
align-items: center;
gap: var(--space-4);
}
.brand-logo {
width: 48px;
height: 48px;
border-radius: var(--radius-lg);
box-shadow: var(--shadow-md);
}
.brand-title {
font-size: var(--text-2xl);
font-weight: var(--font-bold);
margin: 0;
line-height: 1.2;
}
.brand-subtitle {
font-size: var(--text-sm);
opacity: 0.9;
margin: 0;
font-weight: var(--font-normal);
}
.header-center .current-time {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: var(--radius-full);
padding: var(--space-3) var(--space-4);
text-align: center;
}
.time-label {
display: block;
font-size: var(--text-xs);
opacity: 0.8;
margin-bottom: var(--space-1);
}
.time-value {
display: block;
font-size: var(--text-lg);
font-weight: var(--font-bold);
font-family: 'Courier New', monospace;
}
.header-right .user-profile {
position: relative;
display: flex;
align-items: center;
gap: var(--space-3);
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: var(--radius-full);
padding: var(--space-2) var(--space-4);
cursor: pointer;
transition: var(--transition-normal);
}
.user-profile:hover {
background: rgba(255, 255, 255, 0.2);
}
.user-avatar {
width: 40px;
height: 40px;
border-radius: var(--radius-full);
background: var(--primary-200);
display: flex;
align-items: center;
justify-content: center;
font-weight: var(--font-bold);
color: var(--primary-900);
}
.user-info {
display: flex;
flex-direction: column;
}
.user-name {
font-size: var(--text-sm);
font-weight: var(--font-semibold);
line-height: 1.2;
}
.user-role {
font-size: var(--text-xs);
opacity: 0.8;
}
.profile-menu {
position: absolute;
top: 100%;
right: 0;
margin-top: var(--space-2);
background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
border-radius: var(--radius-lg);
box-shadow: var(--shadow-xl);
border: 2px solid rgba(14, 165, 233, 0.2);
min-width: 220px;
opacity: 0;
visibility: hidden;
transform: translateY(-10px);
transition: var(--transition-slow);
z-index: 1000;
backdrop-filter: blur(20px);
}
.user-profile:hover .profile-menu,
.profile-menu:hover {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.menu-item {
display: flex;
align-items: center;
gap: var(--space-3);
padding: var(--space-3) var(--space-5);
color: var(--text-secondary);
text-decoration: none;
border: none;
background: transparent;
width: 100%;
text-align: left;
font-size: var(--text-sm);
font-weight: var(--font-medium);
cursor: pointer;
transition: var(--transition-slow);
border-radius: var(--radius-md);
margin: var(--space-1);
font-family: inherit;
}
.menu-item:hover {
background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
color: var(--text-primary);
transform: translateX(2px);
}
.menu-item:first-child {
border-radius: var(--radius-md);
margin-top: var(--space-2);
}
.menu-item:last-child {
border-radius: var(--radius-md);
margin-bottom: var(--space-2);
}
.menu-icon {
font-size: var(--text-lg);
width: 1.5rem;
text-align: center;
opacity: 0.8;
}
.menu-item:hover .menu-icon {
opacity: 1;
}
.logout-btn {
color: var(--error-500) !important;
border-top: 1px solid var(--border-light);
margin-top: var(--space-2);
padding-top: var(--space-3);
font-weight: var(--font-semibold);
}
.logout-btn:hover {
background: linear-gradient(135deg, var(--error-50), #fee2e2) !important;
color: var(--error-700) !important;
}
/* 대시보드 버튼 */
.dashboard-btn {
display: flex;
align-items: center;
gap: var(--space-2);
padding: var(--space-2) var(--space-5);
background: rgba(255, 255, 255, 0.2);
color: white;
text-decoration: none;
border-radius: var(--radius-lg);
font-weight: var(--font-semibold);
font-size: var(--text-sm);
transition: var(--transition-slow);
border: 1px solid rgba(255, 255, 255, 0.3);
backdrop-filter: blur(10px);
}
.dashboard-btn:hover {
background: rgba(255, 255, 255, 0.3);
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}
.dashboard-btn .btn-icon {
font-size: var(--text-lg);
}
.dashboard-btn .btn-text {
font-family: inherit;
}
/* 반응형 디자인 */
@media (max-width: 768px) {
.dashboard-header {
padding: var(--space-3) var(--space-4);
}
.brand-title {
font-size: var(--text-lg);
}
.brand-subtitle {
font-size: var(--text-xs);
}
.header-center {
display: none;
}
.user-info {
display: none;
}
.dashboard-btn .btn-text {
display: none;
}
.dashboard-btn {
padding: var(--space-2) var(--space-3);
}
}
</style>