[HTML] 날짜: 2025년 6월 17일 화요일 오후 5:11:51

This commit is contained in:
김현주
2025-06-18 09:28:48 +09:00
parent 9a215b1221
commit 92df8a0245
3 changed files with 35 additions and 23 deletions

View File

@@ -226,34 +226,35 @@ etUI.utils.ready(function () {
});
};
// 2025.06.17 삭제
// [공통] appbar 아이콘 활성화
etUI.pages.activeAppbarOnPath = function () {
const appbar = document.querySelector('.footer-menu');
const currentPath = window.location.pathname;
// etUI.pages.activeAppbarOnPath = function () {
// const appbar = document.querySelector('.footer-menu');
// const currentPath = window.location.pathname;
if (!appbar) return;
// if (!appbar) return;
appbar.querySelectorAll('.active').forEach(el => el.classList.remove('active'));
// appbar.querySelectorAll('.active').forEach(el => el.classList.remove('active'));
// 경로와 클래스 매핑
const pathMap = {
'/pages/ACCO': 'menu-acco',
'/pages/REGI': 'menu-regi',
'/pages/STAT': 'menu-stat',
'/pages/INFO': 'menu-info',
};
// // 경로와 클래스 매핑
// const pathMap = {
// '/pages/ACCO': 'menu-acco',
// '/pages/REGI': 'menu-regi',
// '/pages/STAT': 'menu-stat',
// '/pages/INFO': 'menu-info',
// };
// 경로에 해당하는 앱바 아이콘 활성화
for (const [path, className] of Object.entries(pathMap)) {
if (currentPath.includes(path)) {
const targetElement = appbar.querySelector(`.${className}`);
if (targetElement) targetElement.classList.add('active');
break;
}
}
};
// // 경로에 해당하는 앱바 아이콘 활성화
// for (const [path, className] of Object.entries(pathMap)) {
// if (currentPath.includes(path)) {
// const targetElement = appbar.querySelector(`.${className}`);
// if (targetElement) targetElement.classList.add('active');
// break;
// }
// }
// };
// [공통] top 버튼
// [공통] top 버튼
etUI.pages.scrollTop = function () {
const floatingEl = document.querySelector('.floating-area');
const hasFooter = document.querySelector('.footer');
@@ -319,7 +320,6 @@ etUI.utils.ready(function () {
etUI.pages.radioSelectbox();
etUI.pages.initDirectInputToggle();
etUI.pages.updateContainerClassByLayout();
etUI.pages.activeAppbarOnPath();
etUI.pages.headerScroll();
etUI.pages.tabButtonToggle();
etUI.pages.scrollTop();