Freysa Agent commited on
Commit ·
686db59
0
Parent(s):
feat: independent 3D flipbook reader with embedded interactive financial worksheets
Browse files- README.md +16 -0
- index.html +769 -0
README.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: DocuFlow — 3D FlipBook Platform
|
| 3 |
+
emoji: 📖
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: indigo
|
| 6 |
+
sdk: static
|
| 7 |
+
pinned: false
|
| 8 |
+
license: mit
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# DocuFlow — 3D Interactive FlipBook Publication Platform
|
| 12 |
+
|
| 13 |
+
DocuFlow is a production-grade, open-source 3D FlipBook platform built with Next.js 14, StPageFlip, Tailwind CSS, and Supabase.
|
| 14 |
+
|
| 15 |
+
- **GitHub Repository**: [tingsterlott12-bit/docuflow](https://github.com/tingsterlott12-bit/docuflow)
|
| 16 |
+
- **Live Platform**: [https://zigg.freysa.dev](https://zigg.freysa.dev)
|
index.html
ADDED
|
@@ -0,0 +1,769 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en" class="h-full bg-slate-950">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
+
<title>DocuFlow — 3D Interactive FlipBook & Financial Worksheet Platform</title>
|
| 7 |
+
<!-- Tailwind CSS CDN -->
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<!-- Lucide Icons -->
|
| 10 |
+
<script src="https://unpkg.com/lucide@latest"></script>
|
| 11 |
+
<!-- StPageFlip CDN -->
|
| 12 |
+
<script src="https://cdn.jsdelivr.net/npm/page-flip/dist/js/page-flip.browser.js"></script>
|
| 13 |
+
<!-- PDF.js CDN for live PDF upload support -->
|
| 14 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js"></script>
|
| 15 |
+
<style>
|
| 16 |
+
.page-flip {
|
| 17 |
+
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
|
| 18 |
+
}
|
| 19 |
+
.page {
|
| 20 |
+
background-color: #ffffff;
|
| 21 |
+
overflow: hidden;
|
| 22 |
+
box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.05);
|
| 23 |
+
}
|
| 24 |
+
.page-hard {
|
| 25 |
+
background-color: #0f172a;
|
| 26 |
+
color: #ffffff;
|
| 27 |
+
font-weight: bold;
|
| 28 |
+
border: 1px solid #334155;
|
| 29 |
+
}
|
| 30 |
+
/* Custom Scrollbar */
|
| 31 |
+
::-webkit-scrollbar {
|
| 32 |
+
width: 6px;
|
| 33 |
+
height: 6px;
|
| 34 |
+
}
|
| 35 |
+
::-webkit-scrollbar-track {
|
| 36 |
+
background: #0f172a;
|
| 37 |
+
}
|
| 38 |
+
::-webkit-scrollbar-thumb {
|
| 39 |
+
background: #334155;
|
| 40 |
+
border-radius: 3px;
|
| 41 |
+
}
|
| 42 |
+
</style>
|
| 43 |
+
</head>
|
| 44 |
+
<body class="h-full flex flex-col bg-slate-950 text-slate-100 font-sans antialiased overflow-hidden select-none">
|
| 45 |
+
|
| 46 |
+
<!-- Top Action Bar -->
|
| 47 |
+
<header class="h-16 border-b border-slate-800 bg-slate-900/90 backdrop-blur px-4 sm:px-6 flex items-center justify-between z-20">
|
| 48 |
+
<div class="flex items-center gap-3">
|
| 49 |
+
<div class="w-9 h-9 rounded-xl bg-gradient-to-tr from-blue-600 to-indigo-500 flex items-center justify-center text-white shadow-lg shadow-blue-500/25">
|
| 50 |
+
<i data-lucide="book-open" class="w-5 h-5"></i>
|
| 51 |
+
</div>
|
| 52 |
+
<div>
|
| 53 |
+
<div class="flex items-center gap-2">
|
| 54 |
+
<span class="font-extrabold text-base tracking-tight text-white">DocuFlow</span>
|
| 55 |
+
<span class="px-2 py-0.5 rounded-full bg-blue-500/20 text-blue-400 text-[10px] font-semibold border border-blue-500/30">
|
| 56 |
+
Worksheet Edition
|
| 57 |
+
</span>
|
| 58 |
+
</div>
|
| 59 |
+
<div class="text-[11px] text-slate-400 hidden sm:block">Building Real Wealth · 3D Reader & Financial Studio</div>
|
| 60 |
+
</div>
|
| 61 |
+
</div>
|
| 62 |
+
|
| 63 |
+
<!-- Actions -->
|
| 64 |
+
<div class="flex items-center gap-2 sm:gap-3">
|
| 65 |
+
<!-- Worksheet Studio Button -->
|
| 66 |
+
<button
|
| 67 |
+
id="btn-open-worksheets"
|
| 68 |
+
class="inline-flex items-center gap-1.5 px-3.5 py-1.5 rounded-xl bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 text-white text-xs font-bold shadow-md shadow-blue-600/25 transition border border-blue-400/30 animate-pulse hover:animate-none"
|
| 69 |
+
>
|
| 70 |
+
<i data-lucide="calculator" class="w-4 h-4"></i>
|
| 71 |
+
<span>Worksheet Studio</span>
|
| 72 |
+
</button>
|
| 73 |
+
|
| 74 |
+
<!-- Upload Custom PDF Button -->
|
| 75 |
+
<label class="cursor-pointer inline-flex items-center gap-1.5 px-3 py-1.5 rounded-xl bg-slate-800 hover:bg-slate-700 text-slate-200 hover:text-white text-xs font-semibold border border-slate-700 transition">
|
| 76 |
+
<i data-lucide="upload" class="w-3.5 h-3.5"></i>
|
| 77 |
+
<span class="hidden md:inline">Upload PDF</span>
|
| 78 |
+
<input type="file" id="pdf-input" accept="application/pdf" class="hidden" />
|
| 79 |
+
</label>
|
| 80 |
+
|
| 81 |
+
<!-- GitHub Link -->
|
| 82 |
+
<a
|
| 83 |
+
href="https://github.com/tingsterlott12-bit/docuflow"
|
| 84 |
+
target="_blank"
|
| 85 |
+
class="hidden sm:inline-flex items-center gap-1.5 px-3 py-1.5 rounded-xl bg-slate-800 hover:bg-slate-700 text-slate-300 hover:text-white text-xs font-semibold border border-slate-700 transition"
|
| 86 |
+
>
|
| 87 |
+
<i data-lucide="github" class="w-3.5 h-3.5"></i>
|
| 88 |
+
<span>GitHub</span>
|
| 89 |
+
</a>
|
| 90 |
+
</div>
|
| 91 |
+
</header>
|
| 92 |
+
|
| 93 |
+
<!-- Main 3D Flipbook Stage -->
|
| 94 |
+
<main class="flex-1 relative flex flex-col items-center justify-center p-2 sm:p-6 overflow-hidden">
|
| 95 |
+
|
| 96 |
+
<!-- Left Navigation Arrow -->
|
| 97 |
+
<button
|
| 98 |
+
id="btn-prev"
|
| 99 |
+
class="absolute left-3 sm:left-8 z-10 w-11 h-11 rounded-full bg-slate-900/80 hover:bg-blue-600 text-white backdrop-blur flex items-center justify-center transition border border-white/10 shadow-2xl disabled:opacity-20 disabled:pointer-events-none"
|
| 100 |
+
title="Previous Page (←)"
|
| 101 |
+
>
|
| 102 |
+
<i data-lucide="chevron-left" class="w-6 h-6"></i>
|
| 103 |
+
</button>
|
| 104 |
+
|
| 105 |
+
<!-- FlipBook Canvas Holder -->
|
| 106 |
+
<div id="flipbook-wrapper" class="relative max-w-5xl h-[70vh] max-h-[750px] flex items-center justify-center transition-transform duration-200">
|
| 107 |
+
<div id="book" class="shadow-2xl">
|
| 108 |
+
|
| 109 |
+
<!-- Cover Spread -->
|
| 110 |
+
<div class="page page-hard flex flex-col justify-between p-8 bg-gradient-to-br from-slate-900 via-indigo-950 to-slate-900 text-white rounded-l-lg border-r border-indigo-900/50">
|
| 111 |
+
<div class="flex items-center justify-between">
|
| 112 |
+
<span class="px-2.5 py-1 rounded-md bg-blue-500/20 text-blue-300 text-[11px] font-mono tracking-wider border border-blue-500/30">
|
| 113 |
+
EXECUTIVE EDITION
|
| 114 |
+
</span>
|
| 115 |
+
<i data-lucide="sparkles" class="w-5 h-5 text-amber-400"></i>
|
| 116 |
+
</div>
|
| 117 |
+
|
| 118 |
+
<div class="space-y-4 my-auto">
|
| 119 |
+
<div class="w-12 h-1 bg-blue-500 rounded-full"></div>
|
| 120 |
+
<h1 class="text-3xl font-extrabold tracking-tight leading-tight">
|
| 121 |
+
Building Real Wealth
|
| 122 |
+
</h1>
|
| 123 |
+
<p class="text-xs text-slate-300 leading-relaxed">
|
| 124 |
+
A comprehensive curriculum on asset allocation, cash flow compounding, and tax efficiency with interactive embedded worksheets.
|
| 125 |
+
</p>
|
| 126 |
+
</div>
|
| 127 |
+
|
| 128 |
+
<div class="flex items-center justify-between pt-6 border-t border-slate-800 text-[11px] text-slate-400 font-mono">
|
| 129 |
+
<span>Interactive Workbook</span>
|
| 130 |
+
<span>2026 Brief</span>
|
| 131 |
+
</div>
|
| 132 |
+
</div>
|
| 133 |
+
|
| 134 |
+
<!-- Page 1: Executive Summary -->
|
| 135 |
+
<div class="page p-8 flex flex-col justify-between text-slate-900 bg-white relative">
|
| 136 |
+
<div class="flex items-center justify-between border-b border-slate-200 pb-3">
|
| 137 |
+
<span class="text-xs font-bold uppercase tracking-wider text-blue-600">Executive Summary</span>
|
| 138 |
+
<span class="text-xs text-slate-400 font-mono">01</span>
|
| 139 |
+
</div>
|
| 140 |
+
|
| 141 |
+
<div class="space-y-4 text-xs text-slate-700 leading-relaxed my-auto">
|
| 142 |
+
<h2 class="text-lg font-bold text-slate-900">The 4 Pillars of Durable Capital</h2>
|
| 143 |
+
<p>Wealth accumulation is governed by mathematical risk control and asymmetric asset allocation rather than speculative timing.</p>
|
| 144 |
+
|
| 145 |
+
<div class="p-4 bg-slate-50 rounded-2xl border border-slate-200 space-y-2">
|
| 146 |
+
<div class="flex items-center gap-2 font-bold text-slate-900 text-xs">
|
| 147 |
+
<i data-lucide="shield-check" class="w-4 h-4 text-emerald-600"></i>
|
| 148 |
+
<span>Fiduciary Liquidity Rule</span>
|
| 149 |
+
</div>
|
| 150 |
+
<p class="text-[11px] text-slate-600">
|
| 151 |
+
Automate cash flow sweep accounts and maintain 12 months of high-yield liquid buffers prior to risk expansion.
|
| 152 |
+
</p>
|
| 153 |
+
</div>
|
| 154 |
+
</div>
|
| 155 |
+
|
| 156 |
+
<div class="pt-3 border-t border-slate-100 flex items-center justify-between text-[10px] text-slate-400">
|
| 157 |
+
<span>Building Real Wealth</span>
|
| 158 |
+
<span>Section I</span>
|
| 159 |
+
</div>
|
| 160 |
+
</div>
|
| 161 |
+
|
| 162 |
+
<!-- Page 2: Net Worth Blueprint (With Interactive Hotspot) -->
|
| 163 |
+
<div class="page p-8 flex flex-col justify-between text-slate-900 bg-slate-50 relative">
|
| 164 |
+
<div class="flex items-center justify-between border-b border-slate-200 pb-3">
|
| 165 |
+
<span class="text-xs font-bold uppercase tracking-wider text-blue-600">Worksheet 1.1</span>
|
| 166 |
+
<span class="text-xs text-slate-400 font-mono">02</span>
|
| 167 |
+
</div>
|
| 168 |
+
|
| 169 |
+
<div class="space-y-4 text-xs text-slate-700 my-auto">
|
| 170 |
+
<div>
|
| 171 |
+
<h2 class="text-lg font-bold text-slate-900">Net Worth Architecture</h2>
|
| 172 |
+
<p className="text-[11px] text-slate-500">Calculate baseline solvency, liquid reserves, and debt obligations.</p>
|
| 173 |
+
</div>
|
| 174 |
+
|
| 175 |
+
<div class="space-y-2 text-xs">
|
| 176 |
+
<div class="flex justify-between p-2.5 bg-white rounded-xl border border-slate-200 shadow-sm">
|
| 177 |
+
<span class="font-medium text-slate-800">Liquid Equities & ETFs</span>
|
| 178 |
+
<span class="font-bold text-blue-600">$185,000</span>
|
| 179 |
+
</div>
|
| 180 |
+
<div class="flex justify-between p-2.5 bg-white rounded-xl border border-slate-200 shadow-sm">
|
| 181 |
+
<span class="font-medium text-slate-800">Primary Real Estate</span>
|
| 182 |
+
<span class="font-bold text-blue-600">$420,000</span>
|
| 183 |
+
</div>
|
| 184 |
+
<div class="flex justify-between p-2.5 bg-white rounded-xl border border-slate-200 shadow-sm">
|
| 185 |
+
<span class="font-medium text-slate-800">Total Liabilities & Debt</span>
|
| 186 |
+
<span class="font-bold text-rose-600">-$311,500</span>
|
| 187 |
+
</div>
|
| 188 |
+
</div>
|
| 189 |
+
|
| 190 |
+
<!-- Hotspot trigger -->
|
| 191 |
+
<div
|
| 192 |
+
onclick="openWorksheetTab('networth')"
|
| 193 |
+
class="cursor-pointer p-3.5 bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 text-white rounded-xl shadow-lg shadow-blue-500/20 flex items-center justify-between transition group"
|
| 194 |
+
>
|
| 195 |
+
<div class="flex items-center gap-2 text-xs font-bold">
|
| 196 |
+
<i data-lucide="calculator" class="w-4 h-4"></i>
|
| 197 |
+
<span>Launch Net Worth Blueprint</span>
|
| 198 |
+
</div>
|
| 199 |
+
<i data-lucide="arrow-right" class="w-4 h-4 group-hover:translate-x-1 transition"></i>
|
| 200 |
+
</div>
|
| 201 |
+
</div>
|
| 202 |
+
|
| 203 |
+
<div class="pt-3 border-t border-slate-200 flex items-center justify-between text-[10px] text-slate-400">
|
| 204 |
+
<span>Worksheet 1.1</span>
|
| 205 |
+
<span>Page 2</span>
|
| 206 |
+
</div>
|
| 207 |
+
</div>
|
| 208 |
+
|
| 209 |
+
<!-- Page 3: Cash Flow Engine (With Interactive Hotspot) -->
|
| 210 |
+
<div class="page p-8 flex flex-col justify-between text-slate-900 bg-white relative">
|
| 211 |
+
<div class="flex items-center justify-between border-b border-slate-200 pb-3">
|
| 212 |
+
<span class="text-xs font-bold uppercase tracking-wider text-blue-600">Worksheet 1.2</span>
|
| 213 |
+
<span class="text-xs text-slate-400 font-mono">03</span>
|
| 214 |
+
</div>
|
| 215 |
+
|
| 216 |
+
<div class="space-y-4 text-xs text-slate-700 my-auto">
|
| 217 |
+
<div>
|
| 218 |
+
<h2 class="text-lg font-bold text-slate-900">Cash Flow Optimization</h2>
|
| 219 |
+
<p class="text-[11px] text-slate-500">Maximize investable monthly surplus and automated savings rate.</p>
|
| 220 |
+
</div>
|
| 221 |
+
|
| 222 |
+
<div class="grid grid-cols-2 gap-2 text-center">
|
| 223 |
+
<div class="p-3 bg-slate-50 rounded-xl border border-slate-200">
|
| 224 |
+
<div class="text-[10px] text-slate-500 font-medium">Monthly Income</div>
|
| 225 |
+
<div class="text-sm font-bold text-slate-900">$12,500</div>
|
| 226 |
+
</div>
|
| 227 |
+
<div class="p-3 bg-emerald-50 rounded-xl border border-emerald-200">
|
| 228 |
+
<div class="text-[10px] text-emerald-700 font-medium">Target Savings Rate</div>
|
| 229 |
+
<div class="text-sm font-bold text-emerald-700">35.0%</div>
|
| 230 |
+
</div>
|
| 231 |
+
</div>
|
| 232 |
+
|
| 233 |
+
<!-- Hotspot trigger -->
|
| 234 |
+
<div
|
| 235 |
+
onclick="openWorksheetTab('cashflow')"
|
| 236 |
+
class="cursor-pointer p-3.5 bg-slate-900 hover:bg-slate-800 text-white rounded-xl shadow-lg flex items-center justify-between transition group"
|
| 237 |
+
>
|
| 238 |
+
<div class="flex items-center gap-2 text-xs font-bold">
|
| 239 |
+
<i data-lucide="pie-chart" class="w-4 h-4 text-blue-400"></i>
|
| 240 |
+
<span>Open Cash Flow Calculator</span>
|
| 241 |
+
</div>
|
| 242 |
+
<i data-lucide="arrow-right" class="w-4 h-4 group-hover:translate-x-1 transition"></i>
|
| 243 |
+
</div>
|
| 244 |
+
</div>
|
| 245 |
+
|
| 246 |
+
<div class="pt-3 border-t border-slate-100 flex items-center justify-between text-[10px] text-slate-400">
|
| 247 |
+
<span>Worksheet 1.2</span>
|
| 248 |
+
<span>Page 3</span>
|
| 249 |
+
</div>
|
| 250 |
+
</div>
|
| 251 |
+
|
| 252 |
+
<!-- Page 4: Asset Allocation & Compounding (With Simulator Hotspot) -->
|
| 253 |
+
<div class="page p-8 flex flex-col justify-between text-slate-900 bg-slate-50 relative">
|
| 254 |
+
<div class="flex items-center justify-between border-b border-slate-200 pb-3">
|
| 255 |
+
<span class="text-xs font-bold uppercase tracking-wider text-blue-600">Worksheet 1.3</span>
|
| 256 |
+
<span class="text-xs text-slate-400 font-mono">04</span>
|
| 257 |
+
</div>
|
| 258 |
+
|
| 259 |
+
<div class="space-y-4 text-xs text-slate-700 my-auto">
|
| 260 |
+
<div>
|
| 261 |
+
<h2 class="text-lg font-bold text-slate-900">Compound Growth Simulator</h2>
|
| 262 |
+
<p class="text-[11px] text-slate-500">Model long-term capital compounding across 10 to 30 year horizons.</p>
|
| 263 |
+
</div>
|
| 264 |
+
|
| 265 |
+
<div class="p-3.5 bg-indigo-50/70 border border-indigo-100 rounded-xl space-y-1">
|
| 266 |
+
<div class="flex justify-between font-bold text-indigo-950 text-xs">
|
| 267 |
+
<span>20-Year Projected Wealth</span>
|
| 268 |
+
<span class="text-blue-600">$1,791,240</span>
|
| 269 |
+
</div>
|
| 270 |
+
<p class="text-[10px] text-slate-600">Assuming $2,500/mo addition at 8.5% annualized index return.</p>
|
| 271 |
+
</div>
|
| 272 |
+
|
| 273 |
+
<!-- Hotspot trigger -->
|
| 274 |
+
<div
|
| 275 |
+
onclick="openWorksheetTab('compound')"
|
| 276 |
+
class="cursor-pointer p-3.5 bg-gradient-to-r from-indigo-900 to-blue-900 hover:from-indigo-800 hover:to-blue-800 text-white rounded-xl shadow-lg flex items-center justify-between transition group"
|
| 277 |
+
>
|
| 278 |
+
<div class="flex items-center gap-2 text-xs font-bold">
|
| 279 |
+
<i data-lucide="trending-up" class="w-4 h-4 text-emerald-400"></i>
|
| 280 |
+
<span>Run Compounding Simulator</span>
|
| 281 |
+
</div>
|
| 282 |
+
<i data-lucide="arrow-right" class="w-4 h-4 group-hover:translate-x-1 transition"></i>
|
| 283 |
+
</div>
|
| 284 |
+
</div>
|
| 285 |
+
|
| 286 |
+
<div class="pt-3 border-t border-slate-200 flex items-center justify-between text-[10px] text-slate-400">
|
| 287 |
+
<span>Worksheet 1.3</span>
|
| 288 |
+
<span>Page 4</span>
|
| 289 |
+
</div>
|
| 290 |
+
</div>
|
| 291 |
+
|
| 292 |
+
<!-- Back Cover -->
|
| 293 |
+
<div class="page page-hard flex flex-col justify-between p-8 bg-gradient-to-tl from-slate-900 via-indigo-950 to-slate-900 text-white rounded-r-lg border-l border-indigo-900/50 text-center">
|
| 294 |
+
<div class="text-xs text-slate-400 font-mono">DOCUFLOW 3D SUITE</div>
|
| 295 |
+
|
| 296 |
+
<div class="space-y-3 my-auto">
|
| 297 |
+
<div class="w-12 h-12 rounded-2xl bg-blue-600 text-white flex items-center justify-center mx-auto shadow-lg shadow-blue-500/30">
|
| 298 |
+
<i data-lucide="check-circle" class="w-6 h-6"></i>
|
| 299 |
+
</div>
|
| 300 |
+
<h3 class="text-xl font-bold">End of Workbook</h3>
|
| 301 |
+
<p class="text-xs text-slate-300 max-w-xs mx-auto leading-relaxed">
|
| 302 |
+
Export your financial blueprint or upload new publications with full 3D simulation.
|
| 303 |
+
</p>
|
| 304 |
+
</div>
|
| 305 |
+
|
| 306 |
+
<div class="text-[11px] text-slate-500 font-mono">
|
| 307 |
+
Open-Source · Zero Dependencies
|
| 308 |
+
</div>
|
| 309 |
+
</div>
|
| 310 |
+
|
| 311 |
+
</div>
|
| 312 |
+
</div>
|
| 313 |
+
|
| 314 |
+
<!-- Right Navigation Arrow -->
|
| 315 |
+
<button
|
| 316 |
+
id="btn-next"
|
| 317 |
+
class="absolute right-3 sm:right-8 z-10 w-11 h-11 rounded-full bg-slate-900/80 hover:bg-blue-600 text-white backdrop-blur flex items-center justify-center transition border border-white/10 shadow-2xl disabled:opacity-20 disabled:pointer-events-none"
|
| 318 |
+
title="Next Page (→)"
|
| 319 |
+
>
|
| 320 |
+
<i data-lucide="chevron-right" class="w-6 h-6"></i>
|
| 321 |
+
</button>
|
| 322 |
+
</main>
|
| 323 |
+
|
| 324 |
+
<!-- Bottom Navigation & Controls Bar -->
|
| 325 |
+
<footer class="h-16 border-t border-slate-800 bg-slate-900/90 backdrop-blur px-4 sm:px-6 flex items-center justify-between z-20">
|
| 326 |
+
<div class="flex items-center gap-2">
|
| 327 |
+
<button id="btn-zoom-out" class="p-2 rounded-lg text-slate-400 hover:text-white hover:bg-slate-800 transition" title="Zoom Out">
|
| 328 |
+
<i data-lucide="zoom-out" class="w-4 h-4"></i>
|
| 329 |
+
</button>
|
| 330 |
+
<span id="zoom-label" class="text-xs font-mono text-slate-400">100%</span>
|
| 331 |
+
<button id="btn-zoom-in" class="p-2 rounded-lg text-slate-400 hover:text-white hover:bg-slate-800 transition" title="Zoom In">
|
| 332 |
+
<i data-lucide="zoom-in" class="w-4 h-4"></i>
|
| 333 |
+
</button>
|
| 334 |
+
</div>
|
| 335 |
+
|
| 336 |
+
<!-- Scrubber -->
|
| 337 |
+
<div class="flex-1 max-w-sm mx-4 flex items-center gap-3">
|
| 338 |
+
<div class="w-full bg-slate-800 h-1.5 rounded-full overflow-hidden">
|
| 339 |
+
<div id="progress-bar" class="bg-blue-500 h-full w-[20%] transition-all duration-300"></div>
|
| 340 |
+
</div>
|
| 341 |
+
<span id="page-indicator" class="text-xs font-mono text-slate-400 whitespace-nowrap">Page 1 / 5</span>
|
| 342 |
+
</div>
|
| 343 |
+
|
| 344 |
+
<div class="flex items-center gap-2">
|
| 345 |
+
<button id="btn-sound" class="p-2 rounded-lg text-blue-400 hover:bg-slate-800 transition" title="Toggle Sound">
|
| 346 |
+
<i data-lucide="volume-2" class="w-4 h-4"></i>
|
| 347 |
+
</button>
|
| 348 |
+
<button id="btn-fullscreen" class="p-2 rounded-lg text-slate-300 hover:text-white hover:bg-slate-800 transition" title="Fullscreen (F)">
|
| 349 |
+
<i data-lucide="maximize" class="w-4 h-4"></i>
|
| 350 |
+
</button>
|
| 351 |
+
</div>
|
| 352 |
+
</footer>
|
| 353 |
+
|
| 354 |
+
<!-- EMBEDDED WORKSHEET STUDIO DRAWER -->
|
| 355 |
+
<div id="worksheet-drawer" class="fixed inset-0 z-50 flex justify-end bg-slate-950/70 backdrop-blur-sm hidden">
|
| 356 |
+
<div class="w-full max-w-2xl h-full bg-slate-900 border-l border-slate-800 shadow-2xl flex flex-col justify-between text-slate-100 overflow-hidden">
|
| 357 |
+
|
| 358 |
+
<!-- Drawer Header -->
|
| 359 |
+
<div class="p-5 sm:p-6 border-b border-slate-800 flex items-center justify-between bg-slate-900/90">
|
| 360 |
+
<div class="flex items-center gap-3">
|
| 361 |
+
<div class="w-10 h-10 rounded-2xl bg-gradient-to-tr from-blue-600 to-indigo-500 flex items-center justify-center text-white shadow-lg shadow-blue-500/25">
|
| 362 |
+
<i data-lucide="calculator" class="w-5 h-5"></i>
|
| 363 |
+
</div>
|
| 364 |
+
<div>
|
| 365 |
+
<div class="flex items-center gap-2">
|
| 366 |
+
<h2 class="text-lg font-bold text-white tracking-tight">Interactive Financial Studio</h2>
|
| 367 |
+
<span class="px-2 py-0.5 rounded-full bg-blue-500/20 text-blue-400 text-[10px] font-semibold border border-blue-500/30">
|
| 368 |
+
Live Companion
|
| 369 |
+
</span>
|
| 370 |
+
</div>
|
| 371 |
+
<p class="text-xs text-slate-400">Building Real Wealth Curriculum</p>
|
| 372 |
+
</div>
|
| 373 |
+
</div>
|
| 374 |
+
|
| 375 |
+
<button id="btn-close-worksheets" class="p-2 rounded-xl text-slate-400 hover:text-white hover:bg-slate-800 transition">
|
| 376 |
+
<i data-lucide="x" class="w-5 h-5"></i>
|
| 377 |
+
</button>
|
| 378 |
+
</div>
|
| 379 |
+
|
| 380 |
+
<!-- Tab Buttons -->
|
| 381 |
+
<div class="flex border-b border-slate-800 px-6 bg-slate-950/40 text-xs font-semibold overflow-x-auto">
|
| 382 |
+
<button id="tab-btn-networth" onclick="openWorksheetTab('networth')" class="py-3 px-4 border-b-2 border-blue-500 text-blue-400 flex items-center gap-1.5 whitespace-nowrap">
|
| 383 |
+
<i data-lucide="dollar-sign" class="w-3.5 h-3.5"></i>
|
| 384 |
+
<span>1.1 Net Worth</span>
|
| 385 |
+
</button>
|
| 386 |
+
<button id="tab-btn-cashflow" onclick="openWorksheetTab('cashflow')" class="py-3 px-4 border-b-2 border-transparent text-slate-400 hover:text-slate-200 flex items-center gap-1.5 whitespace-nowrap">
|
| 387 |
+
<i data-lucide="pie-chart" class="w-3.5 h-3.5"></i>
|
| 388 |
+
<span>1.2 Cash Flow</span>
|
| 389 |
+
</button>
|
| 390 |
+
<button id="tab-btn-compound" onclick="openWorksheetTab('compound')" class="py-3 px-4 border-b-2 border-transparent text-slate-400 hover:text-slate-200 flex items-center gap-1.5 whitespace-nowrap">
|
| 391 |
+
<i data-lucide="trending-up" class="w-3.5 h-3.5"></i>
|
| 392 |
+
<span>1.3 Compounding</span>
|
| 393 |
+
</button>
|
| 394 |
+
</div>
|
| 395 |
+
|
| 396 |
+
<!-- Tab Content Holder -->
|
| 397 |
+
<div class="flex-1 overflow-y-auto p-6 space-y-6">
|
| 398 |
+
|
| 399 |
+
<!-- TAB 1: NET WORTH -->
|
| 400 |
+
<div id="tab-content-networth" class="space-y-6">
|
| 401 |
+
<div class="p-5 rounded-2xl bg-gradient-to-br from-slate-800 to-slate-950 border border-slate-700 flex flex-col sm:flex-row sm:items-center justify-between gap-4">
|
| 402 |
+
<div>
|
| 403 |
+
<span class="text-[10px] font-bold uppercase tracking-wider text-slate-400">Calculated Net Worth</span>
|
| 404 |
+
<div id="nw-display-total" class="text-3xl font-extrabold text-white tracking-tight mt-1">$328,500</div>
|
| 405 |
+
</div>
|
| 406 |
+
<div class="flex items-center gap-4 text-xs border-t sm:border-t-0 sm:border-l border-slate-700 pt-3 sm:pt-0 sm:pl-5">
|
| 407 |
+
<div>
|
| 408 |
+
<div class="text-slate-400">Assets</div>
|
| 409 |
+
<div id="nw-display-assets" class="font-bold text-emerald-400">$640,000</div>
|
| 410 |
+
</div>
|
| 411 |
+
<div>
|
| 412 |
+
<div class="text-slate-400">Liabilities</div>
|
| 413 |
+
<div id="nw-display-liab" class="font-bold text-rose-400">$311,500</div>
|
| 414 |
+
</div>
|
| 415 |
+
<div>
|
| 416 |
+
<div class="text-slate-400">Debt Ratio</div>
|
| 417 |
+
<div id="nw-display-ratio" class="font-bold text-blue-400">48.7%</div>
|
| 418 |
+
</div>
|
| 419 |
+
</div>
|
| 420 |
+
</div>
|
| 421 |
+
|
| 422 |
+
<div class="space-y-3">
|
| 423 |
+
<h3 class="text-xs font-bold uppercase tracking-wider text-emerald-400">Assets</h3>
|
| 424 |
+
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3 text-xs">
|
| 425 |
+
<div>
|
| 426 |
+
<label class="text-slate-400">Liquid Cash ($)</label>
|
| 427 |
+
<input id="nw-cash" type="number" value="35000" class="w-full mt-1 px-3 py-2 bg-slate-800 border border-slate-700 rounded-xl text-white focus:ring-2 focus:ring-blue-500 focus:outline-none" />
|
| 428 |
+
</div>
|
| 429 |
+
<div>
|
| 430 |
+
<label class="text-slate-400">Equities & Portfolio ($)</label>
|
| 431 |
+
<input id="nw-equities" type="number" value="185000" class="w-full mt-1 px-3 py-2 bg-slate-800 border border-slate-700 rounded-xl text-white focus:ring-2 focus:ring-blue-500 focus:outline-none" />
|
| 432 |
+
</div>
|
| 433 |
+
<div>
|
| 434 |
+
<label class="text-slate-400">Real Estate ($)</label>
|
| 435 |
+
<input id="nw-realestate" type="number" value="420000" class="w-full mt-1 px-3 py-2 bg-slate-800 border border-slate-700 rounded-xl text-white focus:ring-2 focus:ring-blue-500 focus:outline-none" />
|
| 436 |
+
</div>
|
| 437 |
+
</div>
|
| 438 |
+
</div>
|
| 439 |
+
|
| 440 |
+
<div class="space-y-3">
|
| 441 |
+
<h3 class="text-xs font-bold uppercase tracking-wider text-rose-400">Liabilities</h3>
|
| 442 |
+
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3 text-xs">
|
| 443 |
+
<div>
|
| 444 |
+
<label class="text-slate-400">Mortgage ($)</label>
|
| 445 |
+
<input id="nw-mortgage" type="number" value="290000" class="w-full mt-1 px-3 py-2 bg-slate-800 border border-slate-700 rounded-xl text-white focus:ring-2 focus:ring-rose-500 focus:outline-none" />
|
| 446 |
+
</div>
|
| 447 |
+
<div>
|
| 448 |
+
<label class="text-slate-400">Loans & Other Debt ($)</label>
|
| 449 |
+
<input id="nw-loans" type="number" value="21500" class="w-full mt-1 px-3 py-2 bg-slate-800 border border-slate-700 rounded-xl text-white focus:ring-2 focus:ring-rose-500 focus:outline-none" />
|
| 450 |
+
</div>
|
| 451 |
+
</div>
|
| 452 |
+
</div>
|
| 453 |
+
</div>
|
| 454 |
+
|
| 455 |
+
<!-- TAB 2: CASH FLOW -->
|
| 456 |
+
<div id="tab-content-cashflow" class="space-y-6 hidden">
|
| 457 |
+
<div class="p-5 rounded-2xl bg-gradient-to-br from-slate-800 to-slate-950 border border-slate-700 flex flex-col sm:flex-row sm:items-center justify-between gap-4">
|
| 458 |
+
<div>
|
| 459 |
+
<span class="text-[10px] font-bold uppercase tracking-wider text-slate-400">Monthly Investable Surplus</span>
|
| 460 |
+
<div id="cf-display-surplus" class="text-3xl font-extrabold text-emerald-400 tracking-tight mt-1">$3,400 / mo</div>
|
| 461 |
+
</div>
|
| 462 |
+
<div class="flex items-center gap-4 text-xs border-t sm:border-t-0 sm:border-l border-slate-700 pt-3 sm:pt-0 sm:pl-5">
|
| 463 |
+
<div>
|
| 464 |
+
<div class="text-slate-400">Savings Rate</div>
|
| 465 |
+
<div id="cf-display-rate" class="font-bold text-blue-400">36.2%</div>
|
| 466 |
+
</div>
|
| 467 |
+
<div>
|
| 468 |
+
<div class="text-slate-400">Annual Surplus</div>
|
| 469 |
+
<div id="cf-display-annual" class="font-bold text-white">$40,800</div>
|
| 470 |
+
</div>
|
| 471 |
+
</div>
|
| 472 |
+
</div>
|
| 473 |
+
|
| 474 |
+
<div class="grid grid-cols-1 sm:grid-cols-2 gap-3 text-xs">
|
| 475 |
+
<div>
|
| 476 |
+
<label class="text-slate-400">Monthly Gross Revenue ($)</label>
|
| 477 |
+
<input id="cf-income" type="number" value="12500" class="w-full mt-1 px-3 py-2 bg-slate-800 border border-slate-700 rounded-xl text-white focus:ring-2 focus:ring-blue-500 focus:outline-none" />
|
| 478 |
+
</div>
|
| 479 |
+
<div>
|
| 480 |
+
<label class="text-slate-400">Income Taxes ($)</label>
|
| 481 |
+
<input id="cf-taxes" type="number" value="3100" class="w-full mt-1 px-3 py-2 bg-slate-800 border border-slate-700 rounded-xl text-white focus:ring-2 focus:ring-blue-500 focus:outline-none" />
|
| 482 |
+
</div>
|
| 483 |
+
<div>
|
| 484 |
+
<label class="text-slate-400">Housing & Fixed Costs ($)</label>
|
| 485 |
+
<input id="cf-housing" type="number" value="4200" class="w-full mt-1 px-3 py-2 bg-slate-800 border border-slate-700 rounded-xl text-white focus:ring-2 focus:ring-blue-500 focus:outline-none" />
|
| 486 |
+
</div>
|
| 487 |
+
<div>
|
| 488 |
+
<label class="text-slate-400">Discretionary & Living ($)</label>
|
| 489 |
+
<input id="cf-living" type="number" value="1800" class="w-full mt-1 px-3 py-2 bg-slate-800 border border-slate-700 rounded-xl text-white focus:ring-2 focus:ring-blue-500 focus:outline-none" />
|
| 490 |
+
</div>
|
| 491 |
+
</div>
|
| 492 |
+
</div>
|
| 493 |
+
|
| 494 |
+
<!-- TAB 3: COMPOUND SIMULATOR -->
|
| 495 |
+
<div id="tab-content-compound" class="space-y-6 hidden">
|
| 496 |
+
<div class="p-5 rounded-2xl bg-gradient-to-br from-indigo-950 to-slate-950 border border-indigo-900 flex flex-col sm:flex-row sm:items-center justify-between gap-4">
|
| 497 |
+
<div>
|
| 498 |
+
<span class="text-[10px] font-bold uppercase tracking-wider text-indigo-300">Projected Portfolio</span>
|
| 499 |
+
<div id="sim-display-total" class="text-3xl font-extrabold text-white tracking-tight mt-1">$1,791,240</div>
|
| 500 |
+
</div>
|
| 501 |
+
<div class="flex items-center gap-4 text-xs border-t sm:border-t-0 sm:border-l border-indigo-900 pt-3 sm:pt-0 sm:pl-5">
|
| 502 |
+
<div>
|
| 503 |
+
<div class="text-slate-400">Principal</div>
|
| 504 |
+
<div id="sim-display-principal" class="font-bold text-slate-200">$650,000</div>
|
| 505 |
+
</div>
|
| 506 |
+
<div>
|
| 507 |
+
<div class="text-indigo-300">Compound Gain</div>
|
| 508 |
+
<div id="sim-display-gain" class="font-bold text-emerald-400">+$1,141,240</div>
|
| 509 |
+
</div>
|
| 510 |
+
</div>
|
| 511 |
+
</div>
|
| 512 |
+
|
| 513 |
+
<div class="space-y-4 text-xs">
|
| 514 |
+
<div class="grid grid-cols-1 sm:grid-cols-3 gap-3">
|
| 515 |
+
<div>
|
| 516 |
+
<label class="text-slate-400">Starting Portfolio ($)</label>
|
| 517 |
+
<input id="sim-starting" type="number" value="50000" class="w-full mt-1 px-3 py-2 bg-slate-800 border border-slate-700 rounded-xl text-white focus:ring-2 focus:ring-blue-500 focus:outline-none" />
|
| 518 |
+
</div>
|
| 519 |
+
<div>
|
| 520 |
+
<label class="text-slate-400">Monthly Contribution ($)</label>
|
| 521 |
+
<input id="sim-monthly" type="number" value="2500" class="w-full mt-1 px-3 py-2 bg-slate-800 border border-slate-700 rounded-xl text-white focus:ring-2 focus:ring-blue-500 focus:outline-none" />
|
| 522 |
+
</div>
|
| 523 |
+
<div>
|
| 524 |
+
<label class="text-slate-400">Return Rate (% / yr)</label>
|
| 525 |
+
<input id="sim-rate" type="number" step="0.5" value="8.5" class="w-full mt-1 px-3 py-2 bg-slate-800 border border-slate-700 rounded-xl text-white focus:ring-2 focus:ring-blue-500 focus:outline-none" />
|
| 526 |
+
</div>
|
| 527 |
+
</div>
|
| 528 |
+
|
| 529 |
+
<div>
|
| 530 |
+
<div class="flex justify-between text-slate-400 mb-1">
|
| 531 |
+
<span>Horizon</span>
|
| 532 |
+
<span id="sim-years-label" class="font-bold text-blue-400">20 Years</span>
|
| 533 |
+
</div>
|
| 534 |
+
<input id="sim-years" type="range" min="5" max="40" step="1" value="20" class="w-full accent-blue-500 cursor-pointer" />
|
| 535 |
+
</div>
|
| 536 |
+
</div>
|
| 537 |
+
</div>
|
| 538 |
+
|
| 539 |
+
</div>
|
| 540 |
+
|
| 541 |
+
<!-- Drawer Footer -->
|
| 542 |
+
<div class="p-5 border-t border-slate-800 bg-slate-900/90 flex items-center justify-between">
|
| 543 |
+
<button id="btn-save-blueprint" class="inline-flex items-center gap-1.5 px-4 py-2 rounded-xl bg-blue-600 hover:bg-blue-500 text-white font-semibold text-xs shadow-md transition">
|
| 544 |
+
<i data-lucide="save" class="w-4 h-4"></i>
|
| 545 |
+
<span>Save Progress</span>
|
| 546 |
+
</button>
|
| 547 |
+
<button id="btn-export-blueprint" class="inline-flex items-center gap-1.5 px-3 py-2 rounded-xl bg-slate-800 hover:bg-slate-700 text-slate-300 font-semibold text-xs border border-slate-700 transition">
|
| 548 |
+
<i data-lucide="download" class="w-4 h-4"></i>
|
| 549 |
+
<span>Export JSON</span>
|
| 550 |
+
</button>
|
| 551 |
+
</div>
|
| 552 |
+
|
| 553 |
+
</div>
|
| 554 |
+
</div>
|
| 555 |
+
|
| 556 |
+
<script>
|
| 557 |
+
lucide.createIcons();
|
| 558 |
+
|
| 559 |
+
// Sound synthesis
|
| 560 |
+
let soundEnabled = true;
|
| 561 |
+
function playFlipSound() {
|
| 562 |
+
if (!soundEnabled) return;
|
| 563 |
+
try {
|
| 564 |
+
const AudioContext = window.AudioContext || window.webkitAudioContext;
|
| 565 |
+
if (!AudioContext) return;
|
| 566 |
+
const ctx = new AudioContext();
|
| 567 |
+
const bufferSize = ctx.sampleRate * 0.08;
|
| 568 |
+
const buffer = ctx.createBuffer(1, bufferSize, ctx.sampleRate);
|
| 569 |
+
const data = buffer.getChannelData(0);
|
| 570 |
+
for (let i = 0; i < bufferSize; i++) data[i] = Math.random() * 2 - 1;
|
| 571 |
+
|
| 572 |
+
const noise = ctx.createBufferSource();
|
| 573 |
+
noise.buffer = buffer;
|
| 574 |
+
const filter = ctx.createBiquadFilter();
|
| 575 |
+
filter.type = 'bandpass';
|
| 576 |
+
filter.frequency.setValueAtTime(800, ctx.currentTime);
|
| 577 |
+
filter.frequency.exponentialRampToValueAtTime(300, ctx.currentTime + 0.08);
|
| 578 |
+
|
| 579 |
+
const gain = ctx.createGain();
|
| 580 |
+
gain.gain.setValueAtTime(0.01, ctx.currentTime);
|
| 581 |
+
gain.gain.linearRampToValueAtTime(0.18, ctx.currentTime + 0.02);
|
| 582 |
+
gain.gain.exponentialRampToValueAtTime(0.001, ctx.currentTime + 0.08);
|
| 583 |
+
|
| 584 |
+
noise.connect(filter);
|
| 585 |
+
filter.connect(gain);
|
| 586 |
+
gain.connect(ctx.destination);
|
| 587 |
+
noise.start();
|
| 588 |
+
} catch (e) {}
|
| 589 |
+
}
|
| 590 |
+
|
| 591 |
+
// PageFlip instance
|
| 592 |
+
let pageFlip = null;
|
| 593 |
+
|
| 594 |
+
function initReader() {
|
| 595 |
+
const bookEl = document.getElementById('book');
|
| 596 |
+
const isMobile = window.innerWidth < 768;
|
| 597 |
+
const width = isMobile ? 360 : 450;
|
| 598 |
+
const height = isMobile ? 520 : 620;
|
| 599 |
+
|
| 600 |
+
pageFlip = new St.PageFlip(bookEl, {
|
| 601 |
+
width,
|
| 602 |
+
height,
|
| 603 |
+
size: 'stretch',
|
| 604 |
+
minWidth: 320,
|
| 605 |
+
maxWidth: 600,
|
| 606 |
+
minHeight: 480,
|
| 607 |
+
maxHeight: 800,
|
| 608 |
+
maxShadowOpacity: 0.6,
|
| 609 |
+
showCover: true,
|
| 610 |
+
mobileScrollSupport: true,
|
| 611 |
+
useMouseEvents: true,
|
| 612 |
+
swipeDistance: 30
|
| 613 |
+
});
|
| 614 |
+
|
| 615 |
+
pageFlip.loadFromHTML(document.querySelectorAll('.page'));
|
| 616 |
+
|
| 617 |
+
pageFlip.on('flip', (e) => {
|
| 618 |
+
playFlipSound();
|
| 619 |
+
const total = pageFlip.getPageCount();
|
| 620 |
+
const current = e.data + 1;
|
| 621 |
+
document.getElementById('page-indicator').textContent = `Page ${current} / ${total}`;
|
| 622 |
+
document.getElementById('progress-bar').style.width = `${(current / total) * 100}%`;
|
| 623 |
+
});
|
| 624 |
+
}
|
| 625 |
+
|
| 626 |
+
// Worksheet Drawer Controls
|
| 627 |
+
function openWorksheetTab(tabName) {
|
| 628 |
+
document.getElementById('worksheet-drawer').classList.remove('hidden');
|
| 629 |
+
['networth', 'cashflow', 'compound'].forEach((tab) => {
|
| 630 |
+
const btn = document.getElementById(`tab-btn-${tab}`);
|
| 631 |
+
const content = document.getElementById(`tab-content-${tab}`);
|
| 632 |
+
if (tab === tabName) {
|
| 633 |
+
btn.className = 'py-3 px-4 border-b-2 border-blue-500 text-blue-400 flex items-center gap-1.5 whitespace-nowrap';
|
| 634 |
+
content.classList.remove('hidden');
|
| 635 |
+
} else {
|
| 636 |
+
btn.className = 'py-3 px-4 border-b-2 border-transparent text-slate-400 hover:text-slate-200 flex items-center gap-1.5 whitespace-nowrap';
|
| 637 |
+
content.classList.add('hidden');
|
| 638 |
+
}
|
| 639 |
+
});
|
| 640 |
+
}
|
| 641 |
+
|
| 642 |
+
// Calculation updates
|
| 643 |
+
function updateCalculations() {
|
| 644 |
+
// Net worth
|
| 645 |
+
const cash = Number(document.getElementById('nw-cash').value) || 0;
|
| 646 |
+
const eq = Number(document.getElementById('nw-equities').value) || 0;
|
| 647 |
+
const re = Number(document.getElementById('nw-realestate').value) || 0;
|
| 648 |
+
const mort = Number(document.getElementById('nw-mortgage').value) || 0;
|
| 649 |
+
const loans = Number(document.getElementById('nw-loans').value) || 0;
|
| 650 |
+
|
| 651 |
+
const assets = cash + eq + re;
|
| 652 |
+
const liab = mort + loans;
|
| 653 |
+
const nw = assets - liab;
|
| 654 |
+
const ratio = assets > 0 ? ((liab / assets) * 100).toFixed(1) : 0;
|
| 655 |
+
|
| 656 |
+
document.getElementById('nw-display-total').textContent = `$${nw.toLocaleString()}`;
|
| 657 |
+
document.getElementById('nw-display-assets').textContent = `$${assets.toLocaleString()}`;
|
| 658 |
+
document.getElementById('nw-display-liab').textContent = `$${liab.toLocaleString()}`;
|
| 659 |
+
document.getElementById('nw-display-ratio').textContent = `${ratio}%`;
|
| 660 |
+
|
| 661 |
+
// Cash flow
|
| 662 |
+
const inc = Number(document.getElementById('cf-income').value) || 0;
|
| 663 |
+
const tax = Number(document.getElementById('cf-taxes').value) || 0;
|
| 664 |
+
const house = Number(document.getElementById('cf-housing').value) || 0;
|
| 665 |
+
const liv = Number(document.getElementById('cf-living').value) || 0;
|
| 666 |
+
|
| 667 |
+
const surplus = Math.max(0, inc - (tax + house + liv));
|
| 668 |
+
const rate = inc > tax ? (((surplus) / (inc - tax)) * 100).toFixed(1) : 0;
|
| 669 |
+
|
| 670 |
+
document.getElementById('cf-display-surplus').textContent = `$${surplus.toLocaleString()} / mo`;
|
| 671 |
+
document.getElementById('cf-display-rate').textContent = `${rate}%`;
|
| 672 |
+
document.getElementById('cf-display-annual').textContent = `$${(surplus * 12).toLocaleString()}`;
|
| 673 |
+
|
| 674 |
+
// Compound simulator
|
| 675 |
+
const p = Number(document.getElementById('sim-starting').value) || 0;
|
| 676 |
+
const pmt = Number(document.getElementById('sim-monthly').value) || 0;
|
| 677 |
+
const rYr = Number(document.getElementById('sim-rate').value) || 0;
|
| 678 |
+
const yrs = Number(document.getElementById('sim-years').value) || 20;
|
| 679 |
+
|
| 680 |
+
document.getElementById('sim-years-label').textContent = `${yrs} Years`;
|
| 681 |
+
const rM = (rYr / 100) / 12;
|
| 682 |
+
const n = yrs * 12;
|
| 683 |
+
const fv = Math.round(p * Math.pow(1 + rM, n) + pmt * ((Math.pow(1 + rM, n) - 1) / rM));
|
| 684 |
+
const principal = p + pmt * n;
|
| 685 |
+
const gain = Math.max(0, fv - principal);
|
| 686 |
+
|
| 687 |
+
document.getElementById('sim-display-total').textContent = `$${fv.toLocaleString()}`;
|
| 688 |
+
document.getElementById('sim-display-principal').textContent = `$${principal.toLocaleString()}`;
|
| 689 |
+
document.getElementById('sim-display-gain').textContent = `+$${gain.toLocaleString()}`;
|
| 690 |
+
}
|
| 691 |
+
|
| 692 |
+
window.addEventListener('DOMContentLoaded', () => {
|
| 693 |
+
initReader();
|
| 694 |
+
|
| 695 |
+
// Hook inputs
|
| 696 |
+
['nw-cash', 'nw-equities', 'nw-realestate', 'nw-mortgage', 'nw-loans', 'cf-income', 'cf-taxes', 'cf-housing', 'cf-living', 'sim-starting', 'sim-monthly', 'sim-rate', 'sim-years'].forEach((id) => {
|
| 697 |
+
document.getElementById(id)?.addEventListener('input', updateCalculations);
|
| 698 |
+
});
|
| 699 |
+
|
| 700 |
+
// Controls
|
| 701 |
+
document.getElementById('btn-prev').addEventListener('click', () => pageFlip?.flipPrev());
|
| 702 |
+
document.getElementById('btn-next').addEventListener('click', () => pageFlip?.flipNext());
|
| 703 |
+
document.getElementById('btn-open-worksheets').addEventListener('click', () => openWorksheetTab('networth'));
|
| 704 |
+
document.getElementById('btn-close-worksheets').addEventListener('click', () => {
|
| 705 |
+
document.getElementById('worksheet-drawer').classList.add('hidden');
|
| 706 |
+
});
|
| 707 |
+
|
| 708 |
+
document.getElementById('btn-sound').addEventListener('click', () => {
|
| 709 |
+
soundEnabled = !soundEnabled;
|
| 710 |
+
document.getElementById('btn-sound').className = soundEnabled
|
| 711 |
+
? 'p-2 rounded-lg text-blue-400 hover:bg-slate-800 transition'
|
| 712 |
+
: 'p-2 rounded-lg text-slate-500 hover:bg-slate-800 transition';
|
| 713 |
+
});
|
| 714 |
+
|
| 715 |
+
let zoom = 1;
|
| 716 |
+
document.getElementById('btn-zoom-in').addEventListener('click', () => {
|
| 717 |
+
zoom = Math.min(1.4, zoom + 0.1);
|
| 718 |
+
document.getElementById('flipbook-wrapper').style.transform = `scale(${zoom})`;
|
| 719 |
+
document.getElementById('zoom-label').textContent = `${Math.round(zoom * 100)}%`;
|
| 720 |
+
});
|
| 721 |
+
document.getElementById('btn-zoom-out').addEventListener('click', () => {
|
| 722 |
+
zoom = Math.max(0.8, zoom - 0.1);
|
| 723 |
+
document.getElementById('flipbook-wrapper').style.transform = `scale(${zoom})`;
|
| 724 |
+
document.getElementById('zoom-label').textContent = `${Math.round(zoom * 100)}%`;
|
| 725 |
+
});
|
| 726 |
+
|
| 727 |
+
document.getElementById('btn-fullscreen').addEventListener('click', () => {
|
| 728 |
+
if (!document.fullscreenElement) {
|
| 729 |
+
document.documentElement.requestFullscreen().catch(() => {});
|
| 730 |
+
} else {
|
| 731 |
+
document.exitFullscreen().catch(() => {});
|
| 732 |
+
}
|
| 733 |
+
});
|
| 734 |
+
|
| 735 |
+
// Export JSON
|
| 736 |
+
document.getElementById('btn-export-blueprint').addEventListener('click', () => {
|
| 737 |
+
const data = {
|
| 738 |
+
curriculum: 'Building Real Wealth — Personal Blueprint',
|
| 739 |
+
exportedAt: new Date().toISOString(),
|
| 740 |
+
netWorth: document.getElementById('nw-display-total').textContent,
|
| 741 |
+
monthlySurplus: document.getElementById('cf-display-surplus').textContent,
|
| 742 |
+
savingsRate: document.getElementById('cf-display-rate').textContent,
|
| 743 |
+
projectedWealth: document.getElementById('sim-display-total').textContent
|
| 744 |
+
};
|
| 745 |
+
const blob = new Blob([JSON.stringify(data, null, 2)], { type: 'application/json' });
|
| 746 |
+
const url = URL.createObjectURL(blob);
|
| 747 |
+
const a = document.createElement('a');
|
| 748 |
+
a.href = url;
|
| 749 |
+
a.download = `BRW_Blueprint_${new Date().toISOString().split('T')[0]}.json`;
|
| 750 |
+
a.click();
|
| 751 |
+
URL.revokeObjectURL(url);
|
| 752 |
+
});
|
| 753 |
+
|
| 754 |
+
// Save toast
|
| 755 |
+
document.getElementById('btn-save-blueprint').addEventListener('click', () => {
|
| 756 |
+
alert('Your financial inputs have been saved to this session!');
|
| 757 |
+
});
|
| 758 |
+
|
| 759 |
+
// Keyboard
|
| 760 |
+
window.addEventListener('keydown', (e) => {
|
| 761 |
+
if (e.target.tagName === 'INPUT') return;
|
| 762 |
+
if (e.key === 'ArrowRight' || e.key === ' ') pageFlip?.flipNext();
|
| 763 |
+
if (e.key === 'ArrowLeft') pageFlip?.flipPrev();
|
| 764 |
+
if (e.key === 'w' || e.key === 'W') openWorksheetTab('networth');
|
| 765 |
+
});
|
| 766 |
+
});
|
| 767 |
+
</script>
|
| 768 |
+
</body>
|
| 769 |
+
</html>
|