commit ef964757879973057be745713fb69747d47c0887
Author: root <root@hub.scroll.pub> Date: 2024-12-28 21:08:41 +0000 Subject: Initial commit diff --git a/body.html b/body.html new file mode 100644 index 0000000..f8e3de0 --- /dev/null +++ b/body.html @@ -0,0 +1,42 @@ +<header> + <h1>Simulateur de Crédit Immobilier</h1> + <p>Comparez les mensualités, coûts d'intérêt, frais de notaire et apport pour plusieurs taux simultanément.</p> +</header> + +<main> + <form id="creditForm"> + <div class="input-group"> + <label for="montant">Montant du prêt (€):</label> + <input type="number" id="montant" required min="10000" step="1000"> + </div> + + <div class="input-group"> + <label for="duree">Durée (années):</label> + <input type="number" id="duree" required min="5" max="30" step="1"> + </div> + + <div class="input-group"> + <label for="apport">Apport personnel (€):</label> + <input type="number" id="apport" min="0" step="1000"> + </div> + + <div class="input-group"> + <label for="fraisNotaire">Frais de notaire (€):</label> + <input type="number" id="fraisNotaire" min="0" step="100"> + </div> + + <div class="input-group"> + <label for="taux">Taux d'intérêt (%):</label> + <input type="text" id="taux" placeholder="Ex: 1.5, 2.0, 2.5" required> + <small>Séparez les taux par des virgules pour comparer</small> + </div> + + <button type="submit">Calculer</button> + </form> + + <div id="results" class="results-grid"></div> +</main> + +<footer> + <p>Simulateur de crédit immobilier - Comparez les offres facilement</p> +</footer> \ No newline at end of file diff --git a/index.scroll b/index.scroll new file mode 100644 index 0000000..dccc0b5 --- /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 - Comparez les Taux +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..60c049b --- /dev/null +++ b/prompt.json @@ -0,0 +1,25 @@ +{ + "id": "e92554dd-b37e-4f2f-9042-65b4eba4a5d0", + "object": "chat.completion", + "created": 1735420100, + "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 - Comparez les Taux\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>Simulateur de Crédit Immobilier</h1>\n <p>Comparez les mensualités, coûts d'intérêt, frais de notaire et apport pour plusieurs taux simultanément.</p>\n</header>\n\n<main>\n <form id=\"creditForm\">\n <div class=\"input-group\">\n <label for=\"montant\">Montant du prêt (€):</label>\n <input type=\"number\" id=\"montant\" required min=\"10000\" step=\"1000\">\n </div>\n\n <div class=\"input-group\">\n <label for=\"duree\">Durée (années):</label>\n <input type=\"number\" id=\"duree\" required min=\"5\" max=\"30\" step=\"1\">\n </div>\n\n <div class=\"input-group\">\n <label for=\"apport\">Apport personnel (€):</label>\n <input type=\"number\" id=\"apport\" min=\"0\" step=\"1000\">\n </div>\n\n <div class=\"input-group\">\n <label for=\"fraisNotaire\">Frais de notaire (€):</label>\n <input type=\"number\" id=\"fraisNotaire\" min=\"0\" step=\"100\">\n </div>\n\n <div class=\"input-group\">\n <label for=\"taux\">Taux d'intérêt (%):</label>\n <input type=\"text\" id=\"taux\" placeholder=\"Ex: 1.5, 2.0, 2.5\" required>\n <small>Séparez les taux par des virgules pour comparer</small>\n </div>\n\n <button type=\"submit\">Calculer</button>\n </form>\n\n <div id=\"results\" class=\"results-grid\"></div>\n</main>\n\n<footer>\n <p>Simulateur de crédit immobilier - Comparez les offres facilement</p>\n</footer>\n---style.css---\n:root {\n --primary: #2563eb;\n --primary-hover: #1d4ed8;\n --background: #f8fafc;\n --text: #1e293b;\n --border: #e2e8f0;\n --shadow: 0 1px 3px rgba(0,0,0,0.1);\n}\n\n* {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n}\n\nbody {\n font-family: system-ui, -apple-system, sans-serif;\n line-height: 1.5;\n color: var(--text);\n background-color: var(--background);\n padding: 2rem 1rem;\n max-width: 800px;\n margin: 0 auto;\n}\n\nheader {\n text-align: center;\n margin-bottom: 2rem;\n}\n\nheader h1 {\n font-size: 2rem;\n color: var(--primary);\n margin-bottom: 0.5rem;\n}\n\nheader p {\n color: #64748b;\n}\n\nform {\n background: white;\n padding: 1.5rem;\n border-radius: 0.5rem;\n box-shadow: var(--shadow);\n margin-bottom: 2rem;\n}\n\n.input-group {\n margin-bottom: 1rem;\n}\n\nlabel {\n display: block;\n margin-bottom: 0.5rem;\n font-weight: 500;\n}\n\ninput {\n width: 100%;\n padding: 0.75rem;\n border: 1px solid var(--border);\n border-radius: 0.25rem;\n font-size: 1rem;\n}\n\nbutton {\n width: 100%;\n padding: 0.75rem;\n background: var(--primary);\n color: white;\n border: none;\n border-radius: 0.25rem;\n font-size: 1rem;\n cursor: pointer;\n transition: background 0.2s;\n}\n\nbutton:hover {\n background: var(--primary-hover);\n}\n\n.results-grid {\n display: grid;\n gap: 1rem;\n}\n\n.result-card {\n background: white;\n padding: 1.5rem;\n border-radius: 0.5rem;\n box-shadow: var(--shadow);\n}\n\n.result-card h3 {\n color: var(--primary);\n margin-bottom: 1rem;\n}\n\n.result-card p {\n margin-bottom: 0.5rem;\n}\n\nfooter {\n text-align: center;\n margin-top: 2rem;\n color: #64748b;\n}\n\n@media (min-width: 600px) {\n .results-grid {\n grid-template-columns: repeat(2, 1fr);\n }\n}\n---script.js---\ndocument.getElementById('creditForm').addEventListener('submit', function(e) {\n e.preventDefault();\n \n const montant = parseFloat(document.getElementById('montant').value);\n const duree = parseFloat(document.getElementById('duree').value);\n const apport = parseFloat(document.getElementById('apport').value) || 0;\n const fraisNotaire = parseFloat(document.getElementById('fraisNotaire').value) || 0;\n const tauxList = document.getElementById('taux').value.split(',').map(t => parseFloat(t.trim()));\n \n const resultsContainer = document.getElementById('results');\n resultsContainer.innerHTML = '';\n \n tauxList.forEach(taux => {\n const tauxDecimal = taux / 100;\n const n = duree * 12;\n const mensualite = (montant * tauxDecimal / 12) / (1 - Math.pow(1 + tauxDecimal / 12, -n));\n const coutTotal = mensualite * n;\n const coutInteret = coutTotal - montant;\n \n const resultCard = document.createElement('div');\n resultCard.className = 'result-card';\n resultCard.innerHTML = `\n <h3>Taux: ${taux}%</h3>\n <p>Mensualité: ${mensualite.toFixed(2)}€</p>\n <p>Coût total des intérêts: ${coutInteret.toFixed(2)}€</p>\n <p>Coût total du crédit: ${coutTotal.toFixed(2)}€</p>\n <p>Apport + frais de notaire: ${(apport + fraisNotaire).toFixed(2)}€</p>\n <p>Coût global: ${(coutTotal + apport + fraisNotaire).toFixed(2)}€</p>\n `;\n \n resultsContainer.appendChild(resultCard);\n });\n});\n---end---" + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 288, + "completion_tokens": 1510, + "total_tokens": 1798, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 288 + }, + "system_fingerprint": "fp_f1afce2943" +} \ No newline at end of file diff --git a/readme.scroll b/readme.scroll new file mode 100644 index 0000000..1d24f65 --- /dev/null +++ b/readme.scroll @@ -0,0 +1,2 @@ +# creditimmo.scroll.pub +Website generated by DeepSeek from prompt: creer un site pour credit immo en france avec mensualité, cout interet, frais notaire, apport. avec la possibilité de faire le calcul pour plusieurs taux simultanement et comparer les resultats. soyez créatif \ No newline at end of file diff --git a/script.js b/script.js new file mode 100644 index 0000000..94f4f2f --- /dev/null +++ b/script.js @@ -0,0 +1,33 @@ +document.getElementById('creditForm').addEventListener('submit', function(e) { + e.preventDefault(); + + const montant = parseFloat(document.getElementById('montant').value); + const duree = parseFloat(document.getElementById('duree').value); + const apport = parseFloat(document.getElementById('apport').value) || 0; + const fraisNotaire = parseFloat(document.getElementById('fraisNotaire').value) || 0; + const tauxList = document.getElementById('taux').value.split(',').map(t => parseFloat(t.trim())); + + const resultsContainer = document.getElementById('results'); + resultsContainer.innerHTML = ''; + + tauxList.forEach(taux => { + const tauxDecimal = taux / 100; + const n = duree * 12; + const mensualite = (montant * tauxDecimal / 12) / (1 - Math.pow(1 + tauxDecimal / 12, -n)); + const coutTotal = mensualite * n; + const coutInteret = coutTotal - montant; + + const resultCard = document.createElement('div'); + resultCard.className = 'result-card'; + resultCard.innerHTML = ` + <h3>Taux: ${taux}%</h3> + <p>Mensualité: ${mensualite.toFixed(2)}€</p> + <p>Coût total des intérêts: ${coutInteret.toFixed(2)}€</p> + <p>Coût total du crédit: ${coutTotal.toFixed(2)}€</p> + <p>Apport + frais de notaire: ${(apport + fraisNotaire).toFixed(2)}€</p> + <p>Coût global: ${(coutTotal + apport + fraisNotaire).toFixed(2)}€</p> + `; + + resultsContainer.appendChild(resultCard); + }); +}); \ No newline at end of file diff --git a/style.css b/style.css new file mode 100644 index 0000000..d14093b --- /dev/null +++ b/style.css @@ -0,0 +1,114 @@ +:root { + --primary: #2563eb; + --primary-hover: #1d4ed8; + --background: #f8fafc; + --text: #1e293b; + --border: #e2e8f0; + --shadow: 0 1px 3px rgba(0,0,0,0.1); +} + +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font-family: system-ui, -apple-system, sans-serif; + line-height: 1.5; + color: var(--text); + background-color: var(--background); + padding: 2rem 1rem; + max-width: 800px; + margin: 0 auto; +} + +header { + text-align: center; + margin-bottom: 2rem; +} + +header h1 { + font-size: 2rem; + color: var(--primary); + margin-bottom: 0.5rem; +} + +header p { + color: #64748b; +} + +form { + background: white; + padding: 1.5rem; + border-radius: 0.5rem; + box-shadow: var(--shadow); + margin-bottom: 2rem; +} + +.input-group { + margin-bottom: 1rem; +} + +label { + display: block; + margin-bottom: 0.5rem; + font-weight: 500; +} + +input { + width: 100%; + padding: 0.75rem; + border: 1px solid var(--border); + border-radius: 0.25rem; + font-size: 1rem; +} + +button { + width: 100%; + padding: 0.75rem; + background: var(--primary); + color: white; + border: none; + border-radius: 0.25rem; + font-size: 1rem; + cursor: pointer; + transition: background 0.2s; +} + +button:hover { + background: var(--primary-hover); +} + +.results-grid { + display: grid; + gap: 1rem; +} + +.result-card { + background: white; + padding: 1.5rem; + border-radius: 0.5rem; + box-shadow: var(--shadow); +} + +.result-card h3 { + color: var(--primary); + margin-bottom: 1rem; +} + +.result-card p { + margin-bottom: 0.5rem; +} + +footer { + text-align: center; + margin-top: 2rem; + color: #64748b; +} + +@media (min-width: 600px) { + .results-grid { + grid-template-columns: repeat(2, 1fr); + } +} \ No newline at end of file