diff --git a/docker/index.html b/docker/index.html index 90af93a..778f555 100644 --- a/docker/index.html +++ b/docker/index.html @@ -800,12 +800,6 @@ body { display: flex; align-items: flex-end; justify-content: center; - animation: fadeIn 0.2s; -} - -@keyframes fadeIn { - from { opacity: 0; } - to { opacity: 1; } } .modal-sheet { @@ -816,15 +810,9 @@ body { max-height: 85vh; max-height: 85dvh; overflow-y: auto; - animation: slideUp 0.25s ease-out; padding-bottom: env(safe-area-inset-bottom, 0); } -@keyframes slideUp { - from { transform: translateY(100%); } - to { transform: translateY(0); } -} - .modal-handle { width: 36px; height: 4px; @@ -1824,34 +1812,6 @@ body { cursor: not-allowed; } -/* ===== Toast Notification ===== */ -.toast { - position: fixed; - bottom: 80px; - left: 50%; - transform: translateX(-50%); - background: var(--text); - color: var(--white); - padding: 10px 20px; - border-radius: 20px; - font-size: var(--font-sm); - font-weight: 500; - z-index: 300; - animation: toastIn 0.3s, toastOut 0.3s 1.7s forwards; - pointer-events: none; - max-width: calc(100% - 32px); - text-align: center; -} - -@keyframes toastIn { - from { opacity: 0; transform: translateX(-50%) translateY(10px); } - to { opacity: 1; transform: translateX(-50%) translateY(0); } -} - -@keyframes toastOut { - from { opacity: 1; } - to { opacity: 0; } -} /* ===== Utility ===== */ .hidden { @@ -1958,26 +1918,45 @@ button:active, .btn:active, .meal-card-main:active, .dagboek-item:active, .food- animation: slideDown 0.25s ease-in both; } -/* -- Tab content transition -- */ +/* -- Tab content transition — crossfade effect on switch only -- */ .tab-content { - animation: fadeIn 0.25s ease both; + /* no default animation; applied via JS .switching class during tab switches */ } .tab-content.switching { - animation: fadeIn 0.2s ease both; + animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) both; +} + +/* -- Page content transition on tab switch -- */ +.main-content.page-transition { + animation: fadeIn 0.3s ease both; } /* -- Staggered list fade-in -- */ -.search-result-item, .food-item, .meal-card, .dagboek-item, .maaltijd-item { - animation: fadeIn 0.3s ease both; +.search-result-item, .food-item, .meal-card, .dagboek-item, .maaltijd-item, +.eetmoment-card, .eetmoment-item, .meal-add-option { + animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--i, 0) * 50ms); } /* -- Toast notification -- */ .toast { - animation: slideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; + position: fixed; + bottom: 80px; + left: 16px; + right: 16px; + background: var(--text); + color: var(--white); + padding: 10px 20px; + border-radius: 20px; + font-size: var(--font-sm); + font-weight: 500; + z-index: 300; + animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; + text-align: center; + pointer-events: none; } .toast.hiding { - animation: slideOutRight 0.3s ease-in both; + animation: slideDown 0.25s ease-in both; } /* -- Stepper -- */ @@ -2782,7 +2761,7 @@ button:active, .btn:active, .meal-card-main:active, .dagboek-item:active, .food- // Eating moments const listEl = document.getElementById('eetmomentList'); - listEl.innerHTML = EETMOMENTEN.map(moment => { + listEl.innerHTML = EETMOMENTEN.map((moment, mi) => { const items = dayData[moment.id] || []; const momentKh = berekenEetmomentKh(activeDate, moment.id); const roundedKh = Math.round(momentKh); @@ -2864,7 +2843,7 @@ button:active, .btn:active, .meal-card-main:active, .dagboek-item:active, .food- const cardOverLimit = overLimit && momentKh > 0; return ` -