adding food logging, phase 0

This commit is contained in:
Joren de Graaf
2026-10-03 20:37:04 +02:00
parent c0eda95f26
commit 11ded97ed1
12 changed files with 227 additions and 5 deletions
+62 -2
View File
@@ -478,8 +478,68 @@ body[data-theme="light"] .hydration-widget__day--partial { color:#704915; backgr
body[data-theme="light"] .hydration-widget__day--goal { color:#245537; background:#d2ead7; }
body[data-theme="light"] .hydration-widget__day--today { outline-color:#537c60; }
body[data-theme="light"] .hydration-widget button:focus-visible, body[data-theme="light"] .hydration-widget summary:focus-visible, body[data-theme="light"] .hydration-widget input:focus-visible { outline-color:#376e49; }
.ntfy-check { display: flex; align-items: center; gap: .6rem; }
.ntfy-check label { margin: 0; }
.settings-switch-row {
border: 1px solid #e3e9e2;
border-radius: 15px;
background: #f8fbf8;
transition: border-color .18s ease, background .18s ease;
&:hover { border-color: #b9d6c1; background: #f3f9f4; }
}
.settings-switch {
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
gap: 18px;
min-height: 70px;
padding: 13px 16px;
cursor: pointer;
}
.settings-switch__copy { display: grid; gap: 2px; min-width: 0; }
.settings-switch__copy strong { color: $ink; font-size: .92rem; line-height: 1.25; }
.settings-switch__copy small { color: $muted; font-size: .77rem; line-height: 1.35; }
.settings-switch input[type='checkbox'] {
position: absolute;
width: 1px;
height: 1px;
margin: 0;
opacity: 0;
}
.settings-switch__track {
position: relative;
flex: 0 0 51px;
width: 51px;
height: 31px;
border-radius: 999px;
background: #cfd5d0;
box-shadow: inset 0 0 0 1px rgba(31, 48, 37, .08);
transition: background .2s ease, box-shadow .2s ease;
&::before {
content: '';
position: absolute;
top: 2px;
left: 2px;
width: 27px;
height: 27px;
border-radius: 50%;
background: #fff;
box-shadow: 0 2px 5px rgba(20, 40, 26, .22);
transition: transform .2s ease;
}
}
.settings-switch input:checked + .settings-switch__track { background: #34c76a; }
.settings-switch input:checked + .settings-switch__track::before { transform: translateX(20px); }
.settings-switch input:focus-visible + .settings-switch__track { outline: 3px solid rgba(35, 89, 67, .42); outline-offset: 3px; }
.settings-switch input:disabled + .settings-switch__track { opacity: .5; }
body[data-theme='dark'] .settings-switch-row { border-color: #3a4c3f; background: #1b2a20; }
body[data-theme='dark'] .settings-switch-row:hover { border-color: #568368; background: #213427; }
body[data-theme='dark'] .settings-switch__copy strong { color: #edf5ef; }
body[data-theme='dark'] .settings-switch__copy small { color: #b8c3bb; }
body[data-theme='dark'] .settings-switch__track { background: #627168; }
body[data-theme='dark'] .settings-switch input:checked + .settings-switch__track { background: #34c76a; }
@media (prefers-reduced-motion: reduce) {
.settings-switch-row, .settings-switch__track, .settings-switch__track::before { transition: none; }
}
#ntfy-url { width: 100%; box-sizing: border-box; min-height: 2.8rem; }
.ntfy-result { margin: 0; padding: .75rem; border-radius: .55rem; }
.ntfy-result--success { color: #14532d; background: #d1fae5; }