feat(ux): 전체 시스템 모바일 UX 개선 — 햄버거메뉴·필터반응형·터치타겟·iOS줌방지
7개 시스템(tkpurchase/tksafety/tksupport/tkuser/system1/system2/system3)의 모바일 사용성 일괄 개선. system1(tkfb)의 모바일 메뉴 패턴을 3개 신규 시스템에 적용. 주요 변경: - 모바일 햄버거 메뉴: tkpurchase/tksafety/tksupport에 toggleMobileMenu+overlay 추가 - 필터 반응형: 768px 이하 2열 그리드 전환 (filter-bar/filter-actions 클래스) - 터치 타겟 44px: 테이블 액션 버튼 36px+gap, tksafety ±버튼 w-11 - iOS 줌 방지: input/select/textarea font-size 16px - tkuser: 탭 가로스크롤+fade힌트, 사이드바·grid·드롭다운 반응형 - system1: 대시보드 인라인 width 제거, 이동설비 그리드 1열 - system2: 사진그리드 4열, 유형버튼 2열 (480px 이하) - system3: 카드 내 액션 버튼 stopPropagation 추가 - 캐시 무효화: 전체 HTML ?v=2026031401 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,9 @@
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex justify-between items-center h-14">
|
||||
<div class="flex items-center gap-3">
|
||||
<button id="mobileMenuBtn" onclick="toggleMobileMenu()" class="lg:hidden text-blue-200 hover:text-white">
|
||||
<i class="fas fa-bars text-xl"></i>
|
||||
</button>
|
||||
<i class="fas fa-shield-alt text-xl text-blue-200"></i>
|
||||
<h1 class="text-lg font-semibold">TK 안전관리</h1>
|
||||
</div>
|
||||
@@ -161,8 +164,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/tksafety-core.js?v=3"></script>
|
||||
<script src="/static/js/tksafety-checklist.js?v=3"></script>
|
||||
<script src="/static/js/tksafety-core.js?v=2026031401"></script>
|
||||
<script src="/static/js/tksafety-checklist.js?v=2026031401"></script>
|
||||
<script>initChecklistPage();</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<title>안전교육 - TK 안전관리</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||
<link rel="stylesheet" href="/static/css/tksafety.css?v=20260313">
|
||||
<link rel="stylesheet" href="/static/css/tksafety.css?v=2026031401">
|
||||
</head>
|
||||
<body>
|
||||
<!-- Header -->
|
||||
@@ -14,6 +14,9 @@
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex justify-between items-center h-14">
|
||||
<div class="flex items-center gap-3">
|
||||
<button id="mobileMenuBtn" onclick="toggleMobileMenu()" class="lg:hidden text-blue-200 hover:text-white">
|
||||
<i class="fas fa-bars text-xl"></i>
|
||||
</button>
|
||||
<i class="fas fa-shield-alt text-xl text-blue-200"></i>
|
||||
<h1 class="text-lg font-semibold">TK 안전관리</h1>
|
||||
</div>
|
||||
@@ -187,8 +190,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/tksafety-core.js?v=3"></script>
|
||||
<script src="/static/js/tksafety-education.js?v=20260313"></script>
|
||||
<script src="/static/js/tksafety-core.js?v=2026031401"></script>
|
||||
<script src="/static/js/tksafety-education.js?v=2026031401"></script>
|
||||
<script>initEducationPage();</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex justify-between items-center h-14">
|
||||
<div class="flex items-center gap-3">
|
||||
<button id="mobileMenuBtn" onclick="toggleMobileMenu()" class="lg:hidden text-blue-200 hover:text-white">
|
||||
<i class="fas fa-bars text-xl"></i>
|
||||
</button>
|
||||
<i class="fas fa-shield-alt text-xl text-blue-200"></i>
|
||||
<h1 class="text-lg font-semibold">TK 안전관리</h1>
|
||||
</div>
|
||||
@@ -103,8 +106,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/tksafety-core.js?v=3"></script>
|
||||
<script src="/static/js/tksafety-entry-dashboard.js?v=1"></script>
|
||||
<script src="/static/js/tksafety-core.js?v=2026031401"></script>
|
||||
<script src="/static/js/tksafety-entry-dashboard.js?v=2026031401"></script>
|
||||
<script>initEntryDashboard();</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<title>방문 관리 - TK 안전관리</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||
<link rel="stylesheet" href="/static/css/tksafety.css?v=20260313">
|
||||
<link rel="stylesheet" href="/static/css/tksafety.css?v=2026031401">
|
||||
</head>
|
||||
<body>
|
||||
<!-- Header -->
|
||||
@@ -14,6 +14,9 @@
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex justify-between items-center h-14">
|
||||
<div class="flex items-center gap-3">
|
||||
<button id="mobileMenuBtn" onclick="toggleMobileMenu()" class="lg:hidden text-blue-200 hover:text-white">
|
||||
<i class="fas fa-bars text-xl"></i>
|
||||
</button>
|
||||
<i class="fas fa-shield-alt text-xl text-blue-200"></i>
|
||||
<h1 class="text-lg font-semibold">TK 안전관리</h1>
|
||||
</div>
|
||||
@@ -83,10 +86,10 @@
|
||||
<!-- 인원 -->
|
||||
<div>
|
||||
<label class="block text-xs font-medium text-gray-600 mb-1">인원</label>
|
||||
<div class="flex items-center gap-1">
|
||||
<button type="button" id="countMinus" class="w-9 h-9 flex items-center justify-center border rounded-lg hover:bg-gray-50 text-gray-600"><i class="fas fa-minus text-xs"></i></button>
|
||||
<div class="flex items-center gap-2">
|
||||
<button type="button" id="countMinus" class="w-11 h-11 flex items-center justify-center border rounded-lg hover:bg-gray-50 text-gray-600"><i class="fas fa-minus text-xs"></i></button>
|
||||
<input type="number" id="visitorCount" value="1" min="1" class="input-field w-14 text-center px-1 py-2 rounded-lg text-sm">
|
||||
<button type="button" id="countPlus" class="w-9 h-9 flex items-center justify-center border rounded-lg hover:bg-gray-50 text-gray-600"><i class="fas fa-plus text-xs"></i></button>
|
||||
<button type="button" id="countPlus" class="w-11 h-11 flex items-center justify-center border rounded-lg hover:bg-gray-50 text-gray-600"><i class="fas fa-plus text-xs"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 목적 -->
|
||||
@@ -221,7 +224,7 @@
|
||||
<button onclick="closeEditVisit()" class="text-gray-400 hover:text-gray-600"><i class="fas fa-times"></i></button>
|
||||
</div>
|
||||
<form id="editVisitForm">
|
||||
<div class="grid grid-cols-2 gap-3">
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3">
|
||||
<div>
|
||||
<label class="block text-xs font-medium text-gray-600 mb-1">방문자명</label>
|
||||
<input type="text" id="editVisitorName" class="input-field w-full px-3 py-2 rounded-lg text-sm" required>
|
||||
@@ -274,8 +277,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/tksafety-core.js?v=3"></script>
|
||||
<script src="/static/js/tksafety-visit.js?v=20260313"></script>
|
||||
<script src="/static/js/tksafety-core.js?v=2026031401"></script>
|
||||
<script src="/static/js/tksafety-visit.js?v=2026031401"></script>
|
||||
<script>initVisitPage();</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -66,3 +66,48 @@ body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; b
|
||||
.visit-table th, .visit-table td { padding: 0.5rem; }
|
||||
.hide-mobile { display: none; }
|
||||
}
|
||||
|
||||
/* Mobile menu */
|
||||
#mobileOverlay { z-index: 30; }
|
||||
#sideNav { transition: transform 0.3s ease; }
|
||||
@media (max-width: 1023px) {
|
||||
#sideNav {
|
||||
position: fixed; top: 3.5rem; left: 0; bottom: 0;
|
||||
width: 14rem; background: white; z-index: 40;
|
||||
transform: translateX(-100%);
|
||||
box-shadow: 2px 0 8px rgba(0,0,0,0.1);
|
||||
padding: 0.5rem; overflow-y: auto;
|
||||
display: flex !important; flex-direction: column; gap: 0.25rem;
|
||||
}
|
||||
#sideNav.mobile-open { transform: translateX(0); }
|
||||
}
|
||||
|
||||
/* Filter responsive */
|
||||
@media (max-width: 768px) {
|
||||
.filter-bar {
|
||||
display: grid !important; grid-template-columns: 1fr 1fr;
|
||||
gap: 0.5rem; align-items: end;
|
||||
}
|
||||
.filter-bar > div { width: 100%; }
|
||||
.filter-bar > div > input,
|
||||
.filter-bar > div > select { width: 100%; }
|
||||
.filter-actions {
|
||||
grid-column: 1 / -1; display: flex; gap: 0.5rem;
|
||||
}
|
||||
.filter-actions > * { flex: 1; }
|
||||
}
|
||||
|
||||
/* Table action button touch targets */
|
||||
@media (max-width: 768px) {
|
||||
.visit-table td:last-child button,
|
||||
.visit-table td:last-child a {
|
||||
display: inline-flex; align-items: center; justify-content: center;
|
||||
min-width: 36px; min-height: 36px; padding: 6px;
|
||||
}
|
||||
.visit-table td:last-child { gap: 2px; display: flex; flex-wrap: nowrap; justify-content: flex-end; align-items: center; }
|
||||
}
|
||||
|
||||
/* iOS zoom prevention */
|
||||
@media (max-width: 768px) {
|
||||
input, select, textarea { font-size: 16px !important; }
|
||||
}
|
||||
|
||||
@@ -81,6 +81,25 @@ function doLogout() {
|
||||
location.href = getLoginUrl() + '&logout=1';
|
||||
}
|
||||
|
||||
/* ===== Mobile Menu ===== */
|
||||
function toggleMobileMenu() {
|
||||
const nav = document.getElementById('sideNav');
|
||||
const overlay = document.getElementById('mobileOverlay');
|
||||
if (!overlay) {
|
||||
const o = document.createElement('div');
|
||||
o.id = 'mobileOverlay';
|
||||
o.className = 'fixed inset-0 bg-black bg-opacity-30 hidden';
|
||||
o.style.zIndex = '30';
|
||||
o.onclick = toggleMobileMenu;
|
||||
document.body.appendChild(o);
|
||||
toggleMobileMenu();
|
||||
return;
|
||||
}
|
||||
const open = nav.classList.toggle('mobile-open');
|
||||
overlay.classList.toggle('hidden', !open);
|
||||
document.body.style.overflow = open ? 'hidden' : '';
|
||||
}
|
||||
|
||||
/* ===== Navbar ===== */
|
||||
function renderNavbar() {
|
||||
const currentPage = location.pathname.replace(/\//g, '') || 'index.html';
|
||||
@@ -101,6 +120,12 @@ function renderNavbar() {
|
||||
return `<a href="${l.href}" class="nav-link flex items-center gap-3 px-4 py-2.5 rounded-lg text-sm transition-colors ${active ? 'active' : 'text-gray-600 hover:bg-gray-100'}">
|
||||
<i class="fas ${l.icon} w-5 text-center"></i><span>${l.label}</span></a>`;
|
||||
}).join('');
|
||||
// 모바일: nav-link 클릭 시 메뉴 닫기
|
||||
nav.querySelectorAll('.nav-link').forEach(a => {
|
||||
a.addEventListener('click', () => {
|
||||
if (nav.classList.contains('mobile-open')) toggleMobileMenu();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/* ===== State ===== */
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex justify-between items-center h-14">
|
||||
<div class="flex items-center gap-3">
|
||||
<button id="mobileMenuBtn" onclick="toggleMobileMenu()" class="lg:hidden text-blue-200 hover:text-white">
|
||||
<i class="fas fa-bars text-xl"></i>
|
||||
</button>
|
||||
<i class="fas fa-shield-alt text-xl text-blue-200"></i>
|
||||
<h1 class="text-lg font-semibold">TK 안전관리</h1>
|
||||
</div>
|
||||
@@ -211,7 +214,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/tksafety-core.js?v=3"></script>
|
||||
<script src="/static/js/tksafety-core.js?v=2026031401"></script>
|
||||
<script src="/static/js/tksafety-training.js"></script>
|
||||
<script>initTrainingPage();</script>
|
||||
</body>
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex justify-between items-center h-14">
|
||||
<div class="flex items-center gap-3">
|
||||
<button id="mobileMenuBtn" onclick="toggleMobileMenu()" class="lg:hidden text-blue-200 hover:text-white">
|
||||
<i class="fas fa-bars text-xl"></i>
|
||||
</button>
|
||||
<i class="fas fa-shield-alt text-xl text-blue-200"></i>
|
||||
<h1 class="text-lg font-semibold">TK 안전관리</h1>
|
||||
</div>
|
||||
@@ -181,8 +184,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/tksafety-core.js?v=3"></script>
|
||||
<script src="/static/js/tksafety-visit-management.js?v=2"></script>
|
||||
<script src="/static/js/tksafety-core.js?v=2026031401"></script>
|
||||
<script src="/static/js/tksafety-visit-management.js?v=2026031401"></script>
|
||||
<script>initVisitManagementPage();</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="flex justify-between items-center h-14">
|
||||
<div class="flex items-center gap-3">
|
||||
<button id="mobileMenuBtn" onclick="toggleMobileMenu()" class="lg:hidden text-blue-200 hover:text-white">
|
||||
<i class="fas fa-bars text-xl"></i>
|
||||
</button>
|
||||
<i class="fas fa-shield-alt text-xl text-blue-200"></i>
|
||||
<h1 class="text-lg font-semibold">TK 안전관리</h1>
|
||||
</div>
|
||||
@@ -145,8 +148,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/tksafety-core.js?v=3"></script>
|
||||
<script src="/static/js/tksafety-visit-request.js?v=2"></script>
|
||||
<script src="/static/js/tksafety-core.js?v=2026031401"></script>
|
||||
<script src="/static/js/tksafety-visit-request.js?v=2026031401"></script>
|
||||
<script>initVisitRequestPage();</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user