- 순찰/점검 기능 개선 (zone-detail 페이지 추가) - 출근/근태 시스템 개선 (연차 조회, 근무현황) - 작업분석 대분류 그룹화 및 마이그레이션 스크립트 - 모바일 네비게이션 UI 추가 - NAS 배포 도구 및 문서 추가 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
733 lines
16 KiB
HTML
733 lines
16 KiB
HTML
<!-- components/navbar.html -->
|
|
<!-- 최신 대시보드 헤더 -->
|
|
<header class="dashboard-header">
|
|
<div class="header-content">
|
|
<div class="header-left">
|
|
<!-- 모바일 메뉴 버튼 -->
|
|
<button class="mobile-menu-btn" id="mobileMenuBtn" aria-label="메뉴 열기">
|
|
☰
|
|
</button>
|
|
<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="datetime-weather-box">
|
|
<div class="date-time-section">
|
|
<span class="date-value" id="dateValue">--월 --일 (--)</span>
|
|
<span class="time-value" id="timeValue">--시 --분 --초</span>
|
|
</div>
|
|
<div class="weather-section" id="weatherSection">
|
|
<span class="weather-icon" id="weatherIcon">🌤️</span>
|
|
<span class="weather-temp" id="weatherTemp">--°C</span>
|
|
<span class="weather-desc" id="weatherDesc">날씨 로딩중</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="header-right">
|
|
<!-- 알림 버튼 -->
|
|
<div class="notification-wrapper" id="notificationWrapper">
|
|
<button class="notification-btn" id="notificationBtn">
|
|
<svg class="notification-icon-svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path>
|
|
<path d="M13.73 21a2 2 0 0 1-3.46 0"></path>
|
|
</svg>
|
|
<span class="notification-badge" id="notificationBadge" style="display:none;">0</span>
|
|
</button>
|
|
<div class="notification-dropdown" id="notificationDropdown">
|
|
<div class="notification-header">
|
|
<h4>알림</h4>
|
|
<a href="/pages/admin/notifications.html" class="view-all-link">모두 보기</a>
|
|
</div>
|
|
<div class="notification-list" id="notificationList">
|
|
<div class="notification-empty">새 알림이 없습니다.</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<a href="/pages/dashboard.html" id="dashboardBtn" class="dashboard-btn">
|
|
<span class="btn-icon">📊</span>
|
|
<span class="btn-text">대시보드</span>
|
|
</a>
|
|
|
|
<a href="/pages/safety/report.html" class="report-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: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
z-index: 200;
|
|
height: 80px;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
/* 헤더 높이만큼 본문 여백 추가 */
|
|
body {
|
|
padding-top: 80px;
|
|
}
|
|
|
|
.header-content {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
width: 100%;
|
|
padding: 0 var(--space-4);
|
|
}
|
|
|
|
.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);
|
|
}
|
|
|
|
/* 날짜/시간/날씨 박스 */
|
|
.datetime-weather-box {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-4);
|
|
background: rgba(255, 255, 255, 0.1);
|
|
backdrop-filter: blur(10px);
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
border-radius: var(--radius-xl);
|
|
padding: var(--space-2) var(--space-5);
|
|
}
|
|
|
|
.date-time-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding-right: var(--space-4);
|
|
border-right: 1px solid rgba(255, 255, 255, 0.2);
|
|
}
|
|
|
|
.date-value {
|
|
font-size: var(--text-sm);
|
|
opacity: 0.9;
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
.time-value {
|
|
font-size: var(--text-xl);
|
|
font-weight: var(--font-bold);
|
|
font-family: 'Courier New', monospace;
|
|
}
|
|
|
|
.weather-section {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-2);
|
|
}
|
|
|
|
.weather-icon {
|
|
font-size: 1.75rem;
|
|
}
|
|
|
|
.weather-temp {
|
|
font-size: var(--text-lg);
|
|
font-weight: var(--font-bold);
|
|
}
|
|
|
|
.weather-desc {
|
|
font-size: var(--text-sm);
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.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;
|
|
}
|
|
|
|
/* 신고 버튼 */
|
|
.report-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-2);
|
|
padding: var(--space-2) var(--space-5);
|
|
background: rgba(239, 68, 68, 0.9);
|
|
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);
|
|
}
|
|
|
|
.report-btn:hover {
|
|
background: rgba(220, 38, 38, 1);
|
|
transform: translateY(-2px);
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
.report-btn .btn-icon {
|
|
font-size: var(--text-lg);
|
|
}
|
|
|
|
.report-btn .btn-text {
|
|
font-family: inherit;
|
|
}
|
|
|
|
/* 알림 버튼 스타일 */
|
|
.notification-wrapper {
|
|
position: relative;
|
|
}
|
|
|
|
.notification-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 44px;
|
|
height: 44px;
|
|
background: rgba(255, 255, 255, 0.15);
|
|
border: 1px solid rgba(255, 255, 255, 0.25);
|
|
border-radius: var(--radius-lg);
|
|
cursor: pointer;
|
|
transition: var(--transition-normal);
|
|
position: relative;
|
|
}
|
|
|
|
.notification-btn:hover {
|
|
background: rgba(255, 255, 255, 0.25);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.notification-icon-svg {
|
|
width: 20px;
|
|
height: 20px;
|
|
color: white;
|
|
}
|
|
|
|
.notification-btn.has-notifications {
|
|
animation: pulse-btn 2s infinite;
|
|
}
|
|
|
|
@keyframes pulse-btn {
|
|
0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
|
|
50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
|
|
}
|
|
|
|
.notification-badge {
|
|
position: absolute;
|
|
top: -4px;
|
|
right: -4px;
|
|
min-width: 18px;
|
|
height: 18px;
|
|
padding: 0 5px;
|
|
background: var(--error-500);
|
|
color: white;
|
|
font-size: 11px;
|
|
font-weight: var(--font-bold);
|
|
border-radius: var(--radius-full);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
animation: pulse-badge 2s infinite;
|
|
}
|
|
|
|
@keyframes pulse-badge {
|
|
0%, 100% { transform: scale(1); }
|
|
50% { transform: scale(1.1); }
|
|
}
|
|
|
|
.notification-dropdown {
|
|
position: absolute;
|
|
top: 100%;
|
|
right: 0;
|
|
margin-top: var(--space-2);
|
|
width: 320px;
|
|
max-height: 400px;
|
|
background: var(--bg-primary);
|
|
border-radius: var(--radius-lg);
|
|
box-shadow: var(--shadow-xl);
|
|
border: 1px solid var(--border-light);
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
transform: translateY(-10px);
|
|
transition: var(--transition-normal);
|
|
z-index: 1000;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.notification-dropdown.show {
|
|
opacity: 1;
|
|
visibility: visible;
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.notification-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: var(--space-3) var(--space-4);
|
|
border-bottom: 1px solid var(--border-light);
|
|
background: var(--bg-secondary);
|
|
}
|
|
|
|
.notification-header h4 {
|
|
margin: 0;
|
|
font-size: var(--text-base);
|
|
font-weight: var(--font-semibold);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.view-all-link {
|
|
font-size: var(--text-sm);
|
|
color: var(--primary-500);
|
|
text-decoration: none;
|
|
font-weight: var(--font-medium);
|
|
}
|
|
|
|
.view-all-link:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.notification-list {
|
|
max-height: 320px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.notification-item {
|
|
display: flex;
|
|
gap: var(--space-3);
|
|
padding: var(--space-3) var(--space-4);
|
|
border-bottom: 1px solid var(--border-light);
|
|
cursor: pointer;
|
|
transition: var(--transition-fast);
|
|
}
|
|
|
|
.notification-item:hover {
|
|
background: var(--bg-secondary);
|
|
}
|
|
|
|
.notification-item.unread {
|
|
background: rgba(14, 165, 233, 0.05);
|
|
}
|
|
|
|
.notification-item.unread::before {
|
|
content: '';
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
bottom: 0;
|
|
width: 3px;
|
|
background: var(--primary-500);
|
|
}
|
|
|
|
.notification-item {
|
|
position: relative;
|
|
}
|
|
|
|
.notification-item-icon {
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: var(--radius-full);
|
|
background: var(--warning-100);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 1rem;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.notification-item-icon.repair {
|
|
background: var(--warning-100);
|
|
}
|
|
|
|
.notification-item-content {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.notification-item-title {
|
|
font-size: var(--text-sm);
|
|
font-weight: var(--font-medium);
|
|
color: var(--text-primary);
|
|
margin-bottom: 2px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.notification-item-desc {
|
|
font-size: var(--text-xs);
|
|
color: var(--text-tertiary);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.notification-item-time {
|
|
font-size: var(--text-xs);
|
|
color: var(--text-tertiary);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.notification-empty {
|
|
padding: var(--space-6);
|
|
text-align: center;
|
|
color: var(--text-tertiary);
|
|
font-size: var(--text-sm);
|
|
}
|
|
|
|
/* 모바일 메뉴 버튼 */
|
|
.mobile-menu-btn {
|
|
display: none;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 44px;
|
|
height: 44px;
|
|
background: rgba(255, 255, 255, 0.15);
|
|
border: 1px solid rgba(255, 255, 255, 0.25);
|
|
border-radius: 10px;
|
|
cursor: pointer;
|
|
color: white;
|
|
font-size: 1.5rem;
|
|
transition: all 0.2s;
|
|
margin-right: var(--space-3);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.mobile-menu-btn:hover,
|
|
.mobile-menu-btn:active {
|
|
background: rgba(255, 255, 255, 0.25);
|
|
}
|
|
|
|
/* 반응형 디자인 */
|
|
@media (max-width: 1024px) {
|
|
.mobile-menu-btn {
|
|
display: flex;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.dashboard-header {
|
|
padding: var(--space-2) var(--space-3);
|
|
height: 64px;
|
|
}
|
|
|
|
body {
|
|
padding-top: 64px;
|
|
}
|
|
|
|
.header-content {
|
|
padding: 0 var(--space-2);
|
|
}
|
|
|
|
.brand-logo {
|
|
width: 36px;
|
|
height: 36px;
|
|
}
|
|
|
|
.brand-title {
|
|
font-size: var(--text-base);
|
|
}
|
|
|
|
.brand-subtitle {
|
|
display: none;
|
|
}
|
|
|
|
.header-center {
|
|
display: none;
|
|
}
|
|
|
|
.user-info {
|
|
display: none;
|
|
}
|
|
|
|
.user-avatar {
|
|
width: 36px;
|
|
height: 36px;
|
|
}
|
|
|
|
.dashboard-btn .btn-text,
|
|
.report-btn .btn-text {
|
|
display: none;
|
|
}
|
|
|
|
.dashboard-btn,
|
|
.report-btn {
|
|
padding: var(--space-2);
|
|
width: 40px;
|
|
height: 40px;
|
|
justify-content: center;
|
|
}
|
|
|
|
.dashboard-btn .btn-icon,
|
|
.report-btn .btn-icon {
|
|
margin: 0;
|
|
}
|
|
|
|
.notification-btn {
|
|
width: 40px;
|
|
height: 40px;
|
|
}
|
|
|
|
.notification-dropdown {
|
|
position: fixed;
|
|
top: 64px;
|
|
left: var(--space-3);
|
|
right: var(--space-3);
|
|
width: auto;
|
|
}
|
|
|
|
.header-right {
|
|
gap: var(--space-2);
|
|
}
|
|
|
|
.mobile-menu-btn {
|
|
width: 40px;
|
|
height: 40px;
|
|
margin-right: var(--space-2);
|
|
}
|
|
|
|
.user-profile {
|
|
padding: var(--space-1) var(--space-2);
|
|
}
|
|
|
|
.profile-menu {
|
|
position: fixed;
|
|
top: 64px;
|
|
right: var(--space-3);
|
|
left: auto;
|
|
width: 200px;
|
|
}
|
|
}
|
|
|
|
/* 모바일 사이드바 열릴 때 바디 스크롤 방지 */
|
|
body.sidebar-mobile-open {
|
|
overflow: hidden;
|
|
}
|
|
</style> |