Files
tk-factory-services/system1-factory/web/components/mobile-nav.html
Hyungi Ahn 550633b89d feat: 3-System 분리 프로젝트 초기 코드 작성
TK-FB(공장관리+신고)와 M-Project(부적합관리)를 3개 독립 시스템으로
분리하기 위한 전체 코드 구조 작성.
- SSO 인증 서비스 (bcrypt + pbkdf2 이중 해시 지원)
- System 1: 공장관리 (TK-FB 기반, 신고 코드 제거)
- System 2: 신고 (TK-FB에서 workIssue 코드 추출)
- System 3: 부적합관리 (M-Project 기반)
- Gateway 포털 (path-based 라우팅)
- 통합 docker-compose.yml 및 배포 스크립트

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 14:40:11 +09:00

136 lines
3.4 KiB
HTML

<!-- components/mobile-nav.html -->
<!-- 모바일 하단 네비게이션 -->
<nav class="mobile-bottom-nav" id="mobileBottomNav">
<a href="/pages/dashboard.html" class="mobile-nav-item" data-page="dashboard">
<span class="mobile-nav-icon">🏠</span>
<span class="mobile-nav-label"></span>
</a>
<a href="/pages/work/tbm.html" class="mobile-nav-item" data-page="tbm">
<span class="mobile-nav-icon">📋</span>
<span class="mobile-nav-label">TBM</span>
</a>
<a href="/pages/work/report-create.html" class="mobile-nav-item" data-page="report">
<span class="mobile-nav-icon">📝</span>
<span class="mobile-nav-label">작업보고</span>
</a>
<a href="/pages/attendance/checkin.html" class="mobile-nav-item" data-page="checkin">
<span class="mobile-nav-icon"></span>
<span class="mobile-nav-label">출근</span>
</a>
<button class="mobile-nav-item" id="mobileMoreBtn">
<span class="mobile-nav-icon"></span>
<span class="mobile-nav-label">메뉴</span>
</button>
</nav>
<style>
/* 모바일 하단 네비게이션 */
.mobile-bottom-nav {
display: none;
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 64px;
background: #ffffff;
border-top: 1px solid #e5e7eb;
box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
z-index: 1000;
padding-bottom: env(safe-area-inset-bottom);
}
@media (max-width: 768px) {
.mobile-bottom-nav {
display: flex;
align-items: center;
justify-content: space-around;
}
/* 바디 패딩 추가 */
body {
padding-bottom: calc(64px + env(safe-area-inset-bottom)) !important;
}
}
.mobile-nav-item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex: 1;
height: 100%;
text-decoration: none;
color: #6b7280;
background: none;
border: none;
font-family: inherit;
cursor: pointer;
transition: color 0.2s;
padding: 0.5rem;
-webkit-tap-highlight-color: transparent;
}
.mobile-nav-item:active {
background: #f3f4f6;
}
.mobile-nav-item.active {
color: #2563eb;
}
.mobile-nav-icon {
font-size: 1.5rem;
line-height: 1;
margin-bottom: 0.25rem;
}
.mobile-nav-label {
font-size: 0.6875rem;
font-weight: 500;
line-height: 1;
}
/* 활성 상태 */
.mobile-nav-item.active .mobile-nav-icon {
transform: scale(1.1);
}
.mobile-nav-item.active .mobile-nav-label {
font-weight: 600;
}
</style>
<script>
(function() {
// 현재 페이지 하이라이트
const currentPath = window.location.pathname;
const navItems = document.querySelectorAll('.mobile-nav-item[data-page]');
navItems.forEach(item => {
const href = item.getAttribute('href');
if (href && currentPath.includes(href.replace('/pages/', '').replace('.html', ''))) {
item.classList.add('active');
}
});
// 대시보드 페이지 체크
if (currentPath.includes('dashboard')) {
document.querySelector('[data-page="dashboard"]')?.classList.add('active');
}
// 더보기 버튼 - 사이드바 열기
const moreBtn = document.getElementById('mobileMoreBtn');
if (moreBtn) {
moreBtn.addEventListener('click', () => {
const sidebar = document.getElementById('sidebarNav');
const overlay = document.getElementById('sidebarOverlay');
if (sidebar) {
sidebar.classList.add('mobile-open');
overlay?.classList.add('show');
document.body.classList.add('sidebar-mobile-open');
}
});
}
})();
</script>