작업 보고서
@@ -497,6 +534,12 @@
await window.commonHeader.init(user, 'issues_create');
window.commonHeaderInitialized = true;
console.log('✅ 공통 헤더 초기화 완료');
+
+ // 헤더 초기화 후 부드러운 애니메이션 시작
+ setTimeout(() => {
+ animateHeaderAppearance();
+ }, 100);
+
} else {
console.error('❌ 공통 헤더 모듈이 로드되지 않음');
// 지연 재시도
@@ -505,11 +548,56 @@
console.log('🔄 지연된 공통 헤더 초기화');
await window.commonHeader.init(user, 'issues_create');
window.commonHeaderInitialized = true;
+
+ // 지연된 헤더도 애니메이션 적용
+ setTimeout(() => {
+ animateHeaderAppearance();
+ }, 100);
}
}, 200);
}
}
+ // 단계적 애니메이션 함수
+ function animateHeaderAppearance() {
+ console.log('🎨 헤더 애니메이션 시작');
+
+ // 헤더 요소 찾기 (공통 헤더가 생성한 요소)
+ const headerElement = document.querySelector('header') || document.querySelector('[class*="header"]') || document.querySelector('nav');
+
+ if (headerElement) {
+ headerElement.classList.add('header-fade-in');
+ setTimeout(() => {
+ headerElement.classList.add('visible');
+ console.log('✨ 헤더 페이드인 완료');
+
+ // 헤더 애니메이션 완료 후 본문 애니메이션
+ setTimeout(() => {
+ animateContentAppearance();
+ }, 200);
+ }, 50);
+ } else {
+ // 헤더를 찾지 못했으면 바로 본문 애니메이션
+ console.log('⚠️ 헤더 요소를 찾지 못함 - 본문 애니메이션 시작');
+ animateContentAppearance();
+ }
+ }
+
+ // 본문 컨텐츠 애니메이션
+ function animateContentAppearance() {
+ console.log('🎨 본문 컨텐츠 애니메이션 시작');
+
+ // 모든 content-fade-in 요소들을 순차적으로 애니메이션
+ const contentElements = document.querySelectorAll('.content-fade-in');
+
+ contentElements.forEach((element, index) => {
+ setTimeout(() => {
+ element.classList.add('visible');
+ console.log(`✨ 컨텐츠 ${index + 1} 페이드인 완료`);
+ }, index * 100); // 100ms씩 지연
+ });
+ }
+
// 수동 초기화 함수 (initializeApp 함수가 로드되지 않을 때 사용)
async function manualInitialize() {
console.log('🔧 수동 초기화 시작');
@@ -711,10 +799,21 @@
window.addEventListener('hashchange', handleUrlHash);
function showSection(section) {
- // 모든 섹션 숨기기
- document.querySelectorAll('section').forEach(s => s.classList.add('hidden'));
+ // 모든 섹션 숨기기 (애니메이션 리셋)
+ document.querySelectorAll('section').forEach(s => {
+ s.classList.add('hidden');
+ s.classList.remove('visible');
+ });
+
// 선택된 섹션 표시
- document.getElementById(section + 'Section').classList.remove('hidden');
+ const targetSection = document.getElementById(section + 'Section');
+ targetSection.classList.remove('hidden');
+
+ // 부드러운 페이드인 애니메이션
+ setTimeout(() => {
+ targetSection.classList.add('visible');
+ console.log(`✨ ${section} 섹션 페이드인 완료`);
+ }, 50);
// 공통 헤더 현재 페이지 업데이트
if (window.commonHeader && currentUser) {