commit 97c3574ae4154a6ac7be063e1a35311d828acefa
Author: root <root@hub.scroll.pub> Date: 2024-12-28 21:42:50 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..027efe3 --- /dev/null +++ b/body.html @@ -0,0 +1,42 @@ +<header> + <h1>Simulateur de Crédit Immobilier</h1> + <p>Calculez votre prêt immobilier en quelques clics</p> +</header> +<main> + <form id="creditForm"> + <label for="montantBien">Montant du bien (€):</label> + <input type="number" id="montantBien" required> + + <label for="apport">Apport personnel (€):</label> + <input type="number" id="apport" required> + + <label for="taux">Taux d'intérêt (%):</label> + <select id="taux" required> + <option value="1.5">1.5%</option> + <option value="2">2%</option> + <option value="2.5">2.5%</option> + <option value="3">3%</option> + </select> + + <label for="coutTravaux">Coût des travaux (€):</label> + <input type="number" id="coutTravaux" required> + + <label for="duree">Durée du prêt (années):</label> + <input type="number" id="duree" min="1" max="30" required> + + <button type="submit">Calculer</button> + </form> + + <div id="results" class="hidden"> + <h2>Résultats de la simulation</h2> + <p>Montant du prêt: <span id="montantPret"></span> €</p> + <p>Frais de notaire: <span id="fraisNotaire"></span> €</p> + <p>Mensualités: <span id="mensualites"></span> €</p> + <p>Coût total: <span id="coutTotal"></span> €</p> + <p>Coût des intérêts: <span id="coutInterets"></span> €</p> + <p>Frais annexes: <span id="fraisAnnexes"></span> €</p> + </div> +</main> +<footer> + <p>Simulateur de crédit immobilier pour la France</p> +</footer> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..ea2cff9 --- /dev/null +++ b/index.scroll @@ -0,0 +1,8 @@ +buildHtml +baseUrl https://creditimmo.scroll.pub +metaTags +editButton /edit.html +title Simulateur de Crédit Immobilier en France +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..e08a9f8 --- /dev/null +++ b/prompt.json @@ -0,0 +1,25 @@ +{ + "id": "17ebbc33-94a8-4948-a0eb-62abcbcc0351", + "object": "chat.completion", + "created": 1735422151, + "model": "deepseek-chat", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "---domain---\ncreditimmo.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://creditimmo.scroll.pub\nmetaTags\neditButton /edit.html\ntitle Simulateur de Crédit Immobilier en France\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>Simulateur de Crédit Immobilier</h1>\n <p>Calculez votre prêt immobilier en quelques clics</p>\n</header>\n<main>\n <form id=\"creditForm\">\n <label for=\"montantBien\">Montant du bien (€):</label>\n <input type=\"number\" id=\"montantBien\" required>\n \n <label for=\"apport\">Apport personnel (€):</label>\n <input type=\"number\" id=\"apport\" required>\n \n <label for=\"taux\">Taux d'intérêt (%):</label>\n <select id=\"taux\" required>\n <option value=\"1.5\">1.5%</option>\n <option value=\"2\">2%</option>\n <option value=\"2.5\">2.5%</option>\n <option value=\"3\">3%</option>\n </select>\n \n <label for=\"coutTravaux\">Coût des travaux (€):</label>\n <input type=\"number\" id=\"coutTravaux\" required>\n \n <label for=\"duree\">Durée du prêt (années):</label>\n <input type=\"number\" id=\"duree\" min=\"1\" max=\"30\" required>\n \n <button type=\"submit\">Calculer</button>\n </form>\n\n <div id=\"results\" class=\"hidden\">\n <h2>Résultats de la simulation</h2>\n <p>Montant du prêt: <span id=\"montantPret\"></span> €</p>\n <p>Frais de notaire: <span id=\"fraisNotaire\"></span> €</p>\n <p>Mensualités: <span id=\"mensualites\"></span> €</p>\n <p>Coût total: <span id=\"coutTotal\"></span> €</p>\n <p>Coût des intérêts: <span id=\"coutInterets\"></span> €</p>\n <p>Frais annexes: <span id=\"fraisAnnexes\"></span> €</p>\n </div>\n</main>\n<footer>\n <p>Simulateur de crédit immobilier pour la France</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #2c3e50;\n --secondary-color: #3498db;\n --background-color: #ecf0f1;\n --text-color: #333;\n --border-radius: 8px;\n --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);\n}\n\nbody {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n margin: 0;\n padding: 0;\n background-color: var(--background-color);\n color: var(--text-color);\n line-height: 1.6;\n}\n\nheader {\n background-color: var(--primary-color);\n color: white;\n padding: 2rem;\n text-align: center;\n}\n\nmain {\n max-width: 800px;\n margin: 2rem auto;\n padding: 1rem;\n background: white;\n border-radius: var(--border-radius);\n box-shadow: var(--box-shadow);\n}\n\nform {\n display: grid;\n gap: 1rem;\n}\n\nlabel {\n font-weight: bold;\n}\n\ninput, select, button {\n padding: 0.75rem;\n border: 1px solid #ddd;\n border-radius: var(--border-radius);\n font-size: 1rem;\n}\n\nbutton {\n background-color: var(--secondary-color);\n color: white;\n border: none;\n cursor: pointer;\n transition: background-color 0.3s ease;\n}\n\nbutton:hover {\n background-color: #2980b9;\n}\n\n#results {\n margin-top: 2rem;\n padding: 1rem;\n background-color: #f9f9f9;\n border-radius: var(--border-radius);\n}\n\n.hidden {\n display: none;\n}\n\nfooter {\n text-align: center;\n padding: 1rem;\n background-color: var(--primary-color);\n color: white;\n margin-top: 2rem;\n}\n\n@media (max-width: 768px) {\n main {\n margin: 1rem;\n padding: 1rem;\n }\n}\n---script.js---\ndocument.getElementById('creditForm').addEventListener('submit', function(e) {\n e.preventDefault();\n \n const montantBien = parseFloat(document.getElementById('montantBien').value);\n const apport = parseFloat(document.getElementById('apport').value);\n const taux = parseFloat(document.getElementById('taux').value) / 100;\n const coutTravaux = parseFloat(document.getElementById('coutTravaux').value);\n const duree = parseInt(document.getElementById('duree').value);\n \n const montantPret = montantBien + coutTravaux - apport;\n const fraisNotaire = montantBien * 0.08;\n const mensualites = calculateMonthlyPayment(montantPret, taux, duree);\n const coutTotal = mensualites * duree * 12;\n const coutInterets = coutTotal - montantPret;\n const fraisAnnexes = fraisNotaire + coutTravaux;\n \n document.getElementById('montantPret').textContent = montantPret.toFixed(2);\n document.getElementById('fraisNotaire').textContent = fraisNotaire.toFixed(2);\n document.getElementById('mensualites').textContent = mensualites.toFixed(2);\n document.getElementById('coutTotal').textContent = coutTotal.toFixed(2);\n document.getElementById('coutInterets').textContent = coutInterets.toFixed(2);\n document.getElementById('fraisAnnexes').textContent = fraisAnnexes.toFixed(2);\n \n document.getElementById('results').classList.remove('hidden');\n});\n\nfunction calculateMonthlyPayment(amount, rate, years) {\n const monthlyRate = rate / 12;\n const numberOfPayments = years * 12;\n return amount * monthlyRate / (1 - Math.pow(1 + monthlyRate, -numberOfPayments));\n}\n---end---" + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 297, + "completion_tokens": 1452, + "total_tokens": 1749, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 297 + }, + "system_fingerprint": "fp_f1afce2943" +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..3839623 --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# creditimmo3.scroll.pub +Website generated by DeepSeek from prompt: creer un site de credit immo pour la france. Entrées : montant du bien, apport, plusieurs possibilités de taux, cout travaux. sorties : montant prêt,frais notaires, mensualités, cout total, cout intérêt, frais n \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..96fe607 --- /dev/null +++ b/script.js @@ -0,0 +1,31 @@ +document.getElementById('creditForm').addEventListener('submit', function(e) { + e.preventDefault(); + + const montantBien = parseFloat(document.getElementById('montantBien').value); + const apport = parseFloat(document.getElementById('apport').value); + const taux = parseFloat(document.getElementById('taux').value) / 100; + const coutTravaux = parseFloat(document.getElementById('coutTravaux').value); + const duree = parseInt(document.getElementById('duree').value); + + const montantPret = montantBien + coutTravaux - apport; + const fraisNotaire = montantBien * 0.08; + const mensualites = calculateMonthlyPayment(montantPret, taux, duree); + const coutTotal = mensualites * duree * 12; + const coutInterets = coutTotal - montantPret; + const fraisAnnexes = fraisNotaire + coutTravaux; + + document.getElementById('montantPret').textContent = montantPret.toFixed(2); + document.getElementById('fraisNotaire').textContent = fraisNotaire.toFixed(2); + document.getElementById('mensualites').textContent = mensualites.toFixed(2); + document.getElementById('coutTotal').textContent = coutTotal.toFixed(2); + document.getElementById('coutInterets').textContent = coutInterets.toFixed(2); + document.getElementById('fraisAnnexes').textContent = fraisAnnexes.toFixed(2); + + document.getElementById('results').classList.remove('hidden'); +}); + +function calculateMonthlyPayment(amount, rate, years) { + const monthlyRate = rate / 12; + const numberOfPayments = years * 12; + return amount * monthlyRate / (1 - Math.pow(1 + monthlyRate, -numberOfPayments)); +} \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..4ef36d0 --- /dev/null +++ b/style.css @@ -0,0 +1,87 @@ +:root { + --primary-color: #2c3e50; + --secondary-color: #3498db; + --background-color: #ecf0f1; + --text-color: #333; + --border-radius: 8px; + --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); +} + +body { + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + margin: 0; + padding: 0; + background-color: var(--background-color); + color: var(--text-color); + line-height: 1.6; +} + +header { + background-color: var(--primary-color); + color: white; + padding: 2rem; + text-align: center; +} + +main { + max-width: 800px; + margin: 2rem auto; + padding: 1rem; + background: white; + border-radius: var(--border-radius); + box-shadow: var(--box-shadow); +} + +form { + display: grid; + gap: 1rem; +} + +label { + font-weight: bold; +} + +input, select, button { + padding: 0.75rem; + border: 1px solid #ddd; + border-radius: var(--border-radius); + font-size: 1rem; +} + +button { + background-color: var(--secondary-color); + color: white; + border: none; + cursor: pointer; + transition: background-color 0.3s ease; +} + +button:hover { + background-color: #2980b9; +} + +#results { + margin-top: 2rem; + padding: 1rem; + background-color: #f9f9f9; + border-radius: var(--border-radius); +} + +.hidden { + display: none; +} + +footer { + text-align: center; + padding: 1rem; + background-color: var(--primary-color); + color: white; + margin-top: 2rem; +} + +@media (max-width: 768px) { + main { + margin: 1rem; + padding: 1rem; + } +} \ No newline at end of file