commit b621e8ebf7286b27f35a215e2f2f2bddf6de685e
Author: root <root@hub.scroll.pub> Date: 2024-12-27 14:13:07 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..1f55e8b --- /dev/null +++ b/body.html @@ -0,0 +1,39 @@ +<header class="header"> + <h1>BudgetWise</h1> + <p>Your simple, smart budgeting companion</p> +</header> + +<main class="container"> + <section class="budget-form"> + <h2>Create Your Budget</h2> + <form id="budgetForm"> + <div class="form-group"> + <label for="income">Monthly Income:</label> + <input type="number" id="income" required> + </div> + <div class="form-group"> + <label for="expenses">Monthly Expenses:</label> + <input type="number" id="expenses" required> + </div> + <button type="submit">Calculate Budget</button> + </form> + </section> + + <section class="results"> + <h2>Your Budget Summary</h2> + <div class="summary-cards"> + <div class="card"> + <h3>Remaining Balance</h3> + <p id="balance">$0.00</p> + </div> + <div class="card"> + <h3>Savings Potential</h3> + <p id="savings">$0.00</p> + </div> + </div> + </section> +</main> + +<footer class="footer"> + <p>Take control of your finances with BudgetWise</p> +</footer> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..bc582b1 --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://budgetwise.scroll.pub +metaTags +editButton /edit.html +title BudgetWise - Simple & Smart Budgeting +style.css +body.html +script.js \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..d471f97 --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# budgetwise.scroll.pub +Website generated by DeepSeek from prompt: Build a budgeting app \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..f2dedf3 --- /dev/null +++ b/script.js @@ -0,0 +1,17 @@ +document.getElementById('budgetForm').addEventListener('submit', function(e) { + e.preventDefault(); + + const income = parseFloat(document.getElementById('income').value); + const expenses = parseFloat(document.getElementById('expenses').value); + + if (isNaN(income) || isNaN(expenses)) { + alert('Please enter valid numbers for both fields'); + return; + } + + const balance = income - expenses; + const savings = balance * 0.2; // Assuming 20% savings + + document.getElementById('balance').textContent = `$${balance.toFixed(2)}`; + document.getElementById('savings').textContent = `$${savings.toFixed(2)}`; +}); \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..9db4d79 --- /dev/null +++ b/style.css @@ -0,0 +1,126 @@ +:root { + --primary-color: #4a90e2; + --secondary-color: #50e3c2; + --background-color: #f5f7fa; + --text-color: #333; + --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); +} + +body { + font-family: 'Segoe UI', system-ui, sans-serif; + line-height: 1.6; + margin: 0; + padding: 0; + background-color: var(--background-color); + color: var(--text-color); +} + +.header { + background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); + color: white; + padding: 2rem; + text-align: center; +} + +.header h1 { + margin: 0; + font-size: 2.5rem; +} + +.container { + max-width: 800px; + margin: 2rem auto; + padding: 0 1rem; +} + +.budget-form { + background: white; + padding: 2rem; + border-radius: 8px; + box-shadow: var(--card-shadow); + margin-bottom: 2rem; +} + +.form-group { + margin-bottom: 1.5rem; +} + +label { + display: block; + margin-bottom: 0.5rem; + font-weight: 600; +} + +input { + width: 100%; + padding: 0.8rem; + border: 1px solid #ddd; + border-radius: 4px; + font-size: 1rem; +} + +button { + background-color: var(--primary-color); + color: white; + padding: 0.8rem 1.5rem; + border: none; + border-radius: 4px; + cursor: pointer; + font-size: 1rem; + transition: background-color 0.3s ease; +} + +button:hover { + background-color: darken(var(--primary-color), 10%); +} + +.results { + text-align: center; +} + +.summary-cards { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + gap: 1rem; + margin-top: 1.5rem; +} + +.card { + background: white; + padding: 1.5rem; + border-radius: 8px; + box-shadow: var(--card-shadow); +} + +.card h3 { + margin-top: 0; + color: var(--primary-color); +} + +.card p { + font-size: 1.5rem; + font-weight: bold; + margin: 1rem 0; +} + +.footer { + text-align: center; + padding: 1.5rem; + background: var(--primary-color); + color: white; + margin-top: 2rem; +} + +@media (max-width: 600px) { + .header h1 { + font-size: 2rem; + } + + .container { + padding: 0 0.5rem; + } + + .budget-form { + padding: 1rem; + } +} \ No newline at end of file