tkqc 5개 페이지 인라인 JS/CSS를 외부 파일로 추출 (HTML 82% 감소) tkuser index.html을 CSS 1개 + JS 10개 모듈로 분리 (3283→1155줄) - 공통 유틸 추출: issue-helpers, photo-modal, toast - 공통 CSS 확장: tkqc-common.css (모바일 반응형 포함) - 모바일 하단 네비게이션 추가 (mobile-bottom-nav.js) - nginx: JS/CSS 1시간 캐싱 + gzip 압축 활성화 - Tailwind CDN preload, 캐시버스터 통일 (?v=20260213) - 카메라 capture="environment" 추가 - tkuser Dockerfile에 static/ 디렉토리 복사 추가 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
35 lines
1.2 KiB
JavaScript
35 lines
1.2 KiB
JavaScript
/**
|
|
* mobile-bottom-nav.js — tkqc 모바일 하단 네비게이션
|
|
* 768px 이하에서 고정 하단바 표시
|
|
*/
|
|
|
|
(function() {
|
|
// 이미 삽입되었으면 스킵
|
|
if (document.getElementById('tkqcMobileNav')) return;
|
|
|
|
const nav = document.createElement('nav');
|
|
nav.id = 'tkqcMobileNav';
|
|
nav.className = 'tkqc-mobile-nav';
|
|
|
|
const currentPath = window.location.pathname;
|
|
|
|
const items = [
|
|
{ href: '/issues-dashboard.html', icon: 'fas fa-chart-line', label: '현황판', page: 'dashboard' },
|
|
{ href: '/issues-inbox.html', icon: 'fas fa-inbox', label: '수신함', page: 'inbox' },
|
|
{ href: '/issues-management.html', icon: 'fas fa-tasks', label: '관리함', page: 'management' },
|
|
{ href: '/issues-archive.html', icon: 'fas fa-archive', label: '폐기함', page: 'archive' }
|
|
];
|
|
|
|
nav.innerHTML = items.map(item => {
|
|
const isActive = currentPath.includes(item.page) || currentPath === item.href;
|
|
return `
|
|
<a href="${item.href}" class="tkqc-mobile-nav-item ${isActive ? 'active' : ''}">
|
|
<i class="${item.icon}"></i>
|
|
<span>${item.label}</span>
|
|
</a>
|
|
`;
|
|
}).join('');
|
|
|
|
document.body.appendChild(nav);
|
|
})();
|