diff --git a/assets/css/style.css b/assets/css/style.css index 9f43c45..d87c691 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -609,6 +609,50 @@ body.header-tone-light .app-header .tab.active { font-weight: 600; } +.banking-hero { + border-radius: 0.8rem; + padding: 0.9rem 1rem; + background: linear-gradient(135deg, rgba(74, 144, 226, 0.12), rgba(74, 226, 168, 0.1)); + border: 1px solid rgba(74, 144, 226, 0.2); +} + +.banking-overview-card { + overflow: hidden; + position: relative; +} + +@media (prefers-reduced-motion: no-preference) { + .banking-overview-card { + animation: banking-card-in 0.55s var(--fh-ease-out) both; + } + + .banking-overview-card:nth-child(1) { animation-delay: 0.04s; } + .banking-overview-card:nth-child(2) { animation-delay: 0.1s; } + .banking-overview-card:nth-child(3) { animation-delay: 0.16s; } + .banking-overview-card:nth-child(4) { animation-delay: 0.22s; } +} + +.banking-overview-card::after { + content: ""; + position: absolute; + inset: auto -20% -45% auto; + width: 140px; + height: 140px; + border-radius: 50%; + opacity: 0.2; + pointer-events: none; +} + +.banking-overview-checking::after { background: #4a90e2; } +.banking-overview-savings::after { background: #2fbf71; } +.banking-overview-charity::after { background: #8f65ff; } +.banking-overview-donated::after { background: #f2994a; } + +@keyframes banking-card-in { + from { opacity: 0; transform: translateY(10px) scale(0.98); } + to { opacity: 1; transform: translateY(0) scale(1); } +} + @media (prefers-reduced-motion: reduce) { *, *::before, diff --git a/tabs/currency.php b/tabs/currency.php index 4b9a18a..014ed7b 100644 --- a/tabs/currency.php +++ b/tabs/currency.php @@ -78,13 +78,74 @@ foreach ($bankRows as $row) { } $donatedByPersonThisMonth[$pid] = ($donatedByPersonThisMonth[$pid] ?? 0) + (float) ($row['amount'] ?? 0); } +$activePersonId = (string) ($activePerson['id'] ?? ''); +$activeBankPerson = null; +foreach ($people as $p) { + if (($p['id'] ?? '') === $activePersonId) { + $activeBankPerson = $p; + break; + } +} +$activeChecking = is_numeric($activeBankPerson['checking_balance'] ?? null) ? (float) $activeBankPerson['checking_balance'] : 0.0; +$activeSavings = is_numeric($activeBankPerson['savings_balance'] ?? null) ? (float) $activeBankPerson['savings_balance'] : 0.0; +$activeCharityPending = is_numeric($activeBankPerson['charity_pending_balance'] ?? null) ? (float) $activeBankPerson['charity_pending_balance'] : 0.0; +$activeCharityDonated = is_numeric($activeBankPerson['charity_donated_total'] ?? null) ? (float) $activeBankPerson['charity_donated_total'] : 0.0; ?>
Leaderboard and expenses use the family currency from Family settings.
+ + +| # | +Name | +Total = htmlspecialchars($name, ENT_QUOTES, 'UTF-8') ?> | +
|---|---|---|
| = (int) $rank + 1 ?> | += sanitizeInput($p['name'] ?? '') ?> You | += htmlspecialchars(number_format($total, 2, '.', ''), ENT_QUOTES, 'UTF-8') ?> = htmlspecialchars($sym, ENT_QUOTES, 'UTF-8') ?> | +
Track your accounts and move money with one tap.
+No bank transactions recorded yet.
+ +| Date | Person | Type | Category | Note | Amount | |
|---|---|---|---|---|---|---|
| = sanitizeInput((string) ($row['created_at'] ?? '')) ?> | += sanitizeInput($nameById[$pid] ?? '') ?> | += sanitizeInput($type) ?> | += sanitizeInput((string) ($row['category'] ?? '')) ?> | += sanitizeInput((string) ($row['note'] ?? '')) ?> | += $amtSign ?>= htmlspecialchars(number_format($rawAmt, 2, '.', ''), ENT_QUOTES, 'UTF-8') ?> = htmlspecialchars($sym, ENT_QUOTES, 'UTF-8') ?> | ++ |