commit 3f28dfa2089c7f01babb0e95e92a94b89257a45e
Author: root <root@hub.scroll.pub> Date: 2024-12-27 23:52:12 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..f84ef14 --- /dev/null +++ b/body.html @@ -0,0 +1,27 @@ +<div class="container"> + <h1>Dividend Growth Calculator</h1> + <p>Calculate the growth of your investments by DRIPing a percentage of your total dividends.</p> + <form id="calculator-form"> + <div class="form-group"> + <label for="initialInvestment">Initial Investment ($):</label> + <input type="number" id="initialInvestment" required> + </div> + <div class="form-group"> + <label for="annualDividendYield">Annual Dividend Yield (%):</label> + <input type="number" id="annualDividendYield" required> + </div> + <div class="form-group"> + <label for="dripPercentage">DRIP Percentage (%):</label> + <input type="number" id="dripPercentage" required> + </div> + <div class="form-group"> + <label for="years">Number of Years:</label> + <input type="number" id="years" required> + </div> + <button type="submit">Calculate</button> + </form> + <div id="result" class="hidden"> + <h2>Result</h2> + <p>Your investment will grow to: <span id="finalAmount"></span></p> + </div> +</div> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..123f3a4 --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://dripgrowth.scroll.pub +metaTags +editButton /edit.html +title Dividend Growth Calculator with Partial DRIP +style.css +body.html +script.js \ No newline at end of file diff --git a/prompt.json b/prompt.json new file mode 100644 index 0000000..ef3e055 --- /dev/null +++ b/prompt.json @@ -0,0 +1,25 @@ +{ + "id": "96e345a5-91e1-4b6f-ba0d-e8891e9e88c5", + "object": "chat.completion", + "created": 1735343520, + "model": "deepseek-chat", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "---domain---\ndripgrowth.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://dripgrowth.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Dividend Growth Calculator with Partial DRIP\nstyle.css\nbody.html\nscript.js\n---body.html---\n<div class=\"container\">\n <h1>Dividend Growth Calculator</h1>\n <p>Calculate the growth of your investments by DRIPing a percentage of your total dividends.</p>\n <form id=\"calculator-form\">\n <div class=\"form-group\">\n <label for=\"initialInvestment\">Initial Investment ($):</label>\n <input type=\"number\" id=\"initialInvestment\" required>\n </div>\n <div class=\"form-group\">\n <label for=\"annualDividendYield\">Annual Dividend Yield (%):</label>\n <input type=\"number\" id=\"annualDividendYield\" required>\n </div>\n <div class=\"form-group\">\n <label for=\"dripPercentage\">DRIP Percentage (%):</label>\n <input type=\"number\" id=\"dripPercentage\" required>\n </div>\n <div class=\"form-group\">\n <label for=\"years\">Number of Years:</label>\n <input type=\"number\" id=\"years\" required>\n </div>\n <button type=\"submit\">Calculate</button>\n </form>\n <div id=\"result\" class=\"hidden\">\n <h2>Result</h2>\n <p>Your investment will grow to: <span id=\"finalAmount\"></span></p>\n </div>\n</div>\n---style.css---\nbody {\n font-family: 'Arial', sans-serif;\n background-color: #f4f4f9;\n color: #333;\n margin: 0;\n padding: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100vh;\n}\n\n.container {\n background: white;\n padding: 2rem;\n border-radius: 10px;\n box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);\n max-width: 400px;\n width: 100%;\n}\n\nh1 {\n font-size: 2rem;\n margin-bottom: 1rem;\n text-align: center;\n}\n\np {\n font-size: 1rem;\n margin-bottom: 2rem;\n text-align: center;\n}\n\n.form-group {\n margin-bottom: 1rem;\n}\n\nlabel {\n display: block;\n margin-bottom: 0.5rem;\n font-weight: bold;\n}\n\ninput {\n width: 100%;\n padding: 0.5rem;\n border: 1px solid #ccc;\n border-radius: 5px;\n font-size: 1rem;\n}\n\nbutton {\n width: 100%;\n padding: 0.75rem;\n background-color: #007bff;\n color: white;\n border: none;\n border-radius: 5px;\n font-size: 1rem;\n cursor: pointer;\n}\n\nbutton:hover {\n background-color: #0056b3;\n}\n\n#result {\n margin-top: 2rem;\n text-align: center;\n}\n\n.hidden {\n display: none;\n}\n\n#finalAmount {\n font-weight: bold;\n color: #007bff;\n}\n---script.js---\ndocument.getElementById('calculator-form').addEventListener('submit', function(event) {\n event.preventDefault();\n\n const initialInvestment = parseFloat(document.getElementById('initialInvestment').value);\n const annualDividendYield = parseFloat(document.getElementById('annualDividendYield').value) / 100;\n const dripPercentage = parseFloat(document.getElementById('dripPercentage').value) / 100;\n const years = parseInt(document.getElementById('years').value);\n\n let finalAmount = initialInvestment;\n\n for (let i = 0; i < years; i++) {\n const dividends = finalAmount * annualDividendYield;\n const reinvestedDividends = dividends * dripPercentage;\n finalAmount += reinvestedDividends;\n }\n\n document.getElementById('finalAmount').textContent = `$${finalAmount.toFixed(2)}`;\n document.getElementById('result').classList.remove('hidden');\n});\n---end---" + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 255, + "completion_tokens": 918, + "total_tokens": 1173, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 255 + }, + "system_fingerprint": "fp_f1afce2943" +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..e523489 --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# dripgrowth.scroll.pub +Website generated by DeepSeek from prompt: A dividend growth calculator which allows you to see growth if only DRIPing a percentage of the total dividends \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..26eaf39 --- /dev/null +++ b/script.js @@ -0,0 +1,19 @@ +document.getElementById('calculator-form').addEventListener('submit', function(event) { + event.preventDefault(); + + const initialInvestment = parseFloat(document.getElementById('initialInvestment').value); + const annualDividendYield = parseFloat(document.getElementById('annualDividendYield').value) / 100; + const dripPercentage = parseFloat(document.getElementById('dripPercentage').value) / 100; + const years = parseInt(document.getElementById('years').value); + + let finalAmount = initialInvestment; + + for (let i = 0; i < years; i++) { + const dividends = finalAmount * annualDividendYield; + const reinvestedDividends = dividends * dripPercentage; + finalAmount += reinvestedDividends; + } + + document.getElementById('finalAmount').textContent = `$${finalAmount.toFixed(2)}`; + document.getElementById('result').classList.remove('hidden'); +}); \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..c59ac4a --- /dev/null +++ b/style.css @@ -0,0 +1,79 @@ +body { + font-family: 'Arial', sans-serif; + background-color: #f4f4f9; + color: #333; + margin: 0; + padding: 0; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; +} + +.container { + background: white; + padding: 2rem; + border-radius: 10px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + max-width: 400px; + width: 100%; +} + +h1 { + font-size: 2rem; + margin-bottom: 1rem; + text-align: center; +} + +p { + font-size: 1rem; + margin-bottom: 2rem; + text-align: center; +} + +.form-group { + margin-bottom: 1rem; +} + +label { + display: block; + margin-bottom: 0.5rem; + font-weight: bold; +} + +input { + width: 100%; + padding: 0.5rem; + border: 1px solid #ccc; + border-radius: 5px; + font-size: 1rem; +} + +button { + width: 100%; + padding: 0.75rem; + background-color: #007bff; + color: white; + border: none; + border-radius: 5px; + font-size: 1rem; + cursor: pointer; +} + +button:hover { + background-color: #0056b3; +} + +#result { + margin-top: 2rem; + text-align: center; +} + +.hidden { + display: none; +} + +#finalAmount { + font-weight: bold; + color: #007bff; +} \ No newline at end of file