commit fb4093d4f555d281bdc8792ce34ed534a6bee4d8
Author: root <root@hub.scroll.pub>
Date: 2024-12-28 21:45:45 +0000
Subject: Initial commit
diff --git a/body.html b/body.html
new file mode 100644
index 0000000..3450042
--- /dev/null
+++ b/body.html
@@ -0,0 +1,55 @@
+<header>
+ <h1>Simulateur de Crédit Immobilier</h1>
+ <p>Calculez votre prêt immobilier en quelques clics</p>
+</header>
+<main>
+ <section class="input-section">
+ <h2>Entrées</h2>
+ <form id="creditForm">
+ <label for="propertyPrice">Montant du bien (€):</label>
+ <input type="number" id="propertyPrice" required>
+
+ <label for="downPayment">Apport personnel (€):</label>
+ <input type="number" id="downPayment" required>
+
+ <label for="loanDuration">Durée du prêt (années):</label>
+ <input type="number" id="loanDuration" min="1" max="30" required>
+
+ <label for="interestRates">Taux d'intérêt (%):</label>
+ <input type="text" id="interestRates" placeholder="Ex: 1.5, 2.0, 2.5" required>
+
+ <label for="renovationCost">Coût des travaux (€):</label>
+ <input type="number" id="renovationCost" value="0">
+
+ <button type="submit">Calculer</button>
+ </form>
+ </section>
+
+ <section class="output-section">
+ <h2>Résultats</h2>
+ <div id="results">
+ <p>Montant du prêt: <span id="loanAmount"></span></p>
+ <p>Frais de notaire: <span id="notaryFees"></span></p>
+ <p>Mensualités: <span id="monthlyPayment"></span></p>
+ <p>Coût total: <span id="totalCost"></span></p>
+ <p>Coût des intérêts: <span id="interestCost"></span></p>
+ </div>
+
+ <h3>Comparaison des taux</h3>
+ <table id="comparisonTable">
+ <thead>
+ <tr>
+ <th>Taux</th>
+ <th>Mensualité</th>
+ <th>Coût total</th>
+ <th>Intérêts</th>
+ </tr>
+ </thead>
+ <tbody>
+ </tbody>
+ </table>
+ </section>
+</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..c989bd6
--- /dev/null
+++ b/prompt.json
@@ -0,0 +1,25 @@
+{
+ "id": "565560c5-c076-4ddf-8f4d-ef2578b3fca5",
+ "object": "chat.completion",
+ "created": 1735422323,
+ "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 <section class=\"input-section\">\n <h2>Entrées</h2>\n <form id=\"creditForm\">\n <label for=\"propertyPrice\">Montant du bien (€):</label>\n <input type=\"number\" id=\"propertyPrice\" required>\n \n <label for=\"downPayment\">Apport personnel (€):</label>\n <input type=\"number\" id=\"downPayment\" required>\n \n <label for=\"loanDuration\">Durée du prêt (années):</label>\n <input type=\"number\" id=\"loanDuration\" min=\"1\" max=\"30\" required>\n \n <label for=\"interestRates\">Taux d'intérêt (%):</label>\n <input type=\"text\" id=\"interestRates\" placeholder=\"Ex: 1.5, 2.0, 2.5\" required>\n \n <label for=\"renovationCost\">Coût des travaux (€):</label>\n <input type=\"number\" id=\"renovationCost\" value=\"0\">\n \n <button type=\"submit\">Calculer</button>\n </form>\n </section>\n \n <section class=\"output-section\">\n <h2>Résultats</h2>\n <div id=\"results\">\n <p>Montant du prêt: <span id=\"loanAmount\"></span></p>\n <p>Frais de notaire: <span id=\"notaryFees\"></span></p>\n <p>Mensualités: <span id=\"monthlyPayment\"></span></p>\n <p>Coût total: <span id=\"totalCost\"></span></p>\n <p>Coût des intérêts: <span id=\"interestCost\"></span></p>\n </div>\n \n <h3>Comparaison des taux</h3>\n <table id=\"comparisonTable\">\n <thead>\n <tr>\n <th>Taux</th>\n <th>Mensualité</th>\n <th>Coût total</th>\n <th>Intérêts</th>\n </tr>\n </thead>\n <tbody>\n </tbody>\n </table>\n </section>\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: #34495e;\n --border-radius: 8px;\n --box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n}\n\nbody {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n line-height: 1.6;\n margin: 0;\n padding: 0;\n background-color: var(--background-color);\n color: var(--text-color);\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: 1200px;\n margin: 2rem auto;\n padding: 0 1rem;\n}\n\nsection {\n background: white;\n border-radius: var(--border-radius);\n box-shadow: var(--box-shadow);\n padding: 2rem;\n margin-bottom: 2rem;\n}\n\nh2 {\n color: var(--primary-color);\n margin-bottom: 1.5rem;\n}\n\nform {\n display: grid;\n gap: 1rem;\n}\n\nlabel {\n font-weight: bold;\n}\n\ninput {\n padding: 0.5rem;\n border: 1px solid #ddd;\n border-radius: var(--border-radius);\n}\n\nbutton {\n background-color: var(--secondary-color);\n color: white;\n padding: 0.75rem;\n border: none;\n border-radius: var(--border-radius);\n cursor: pointer;\n transition: background-color 0.3s;\n}\n\nbutton:hover {\n background-color: #2980b9;\n}\n\n#results {\n display: grid;\n gap: 1rem;\n margin-bottom: 2rem;\n}\n\ntable {\n width: 100%;\n border-collapse: collapse;\n margin-top: 1rem;\n}\n\nth, td {\n padding: 0.75rem;\n text-align: left;\n border-bottom: 1px solid #ddd;\n}\n\nth {\n background-color: var(--primary-color);\n color: white;\n}\n\nfooter {\n text-align: center;\n padding: 1rem;\n background-color: var(--primary-color);\n color: white;\n}\n\n@media (max-width: 768px) {\n form {\n grid-template-columns: 1fr;\n }\n \n main {\n padding: 0 0.5rem;\n }\n \n section {\n padding: 1rem;\n }\n}\n---script.js---\nfunction formatCurrency(amount) {\n return new Intl.NumberFormat('fr-FR', { style: 'currency', currency: 'EUR' }).format(Math.round(amount));\n}\n\nfunction calculateLoan() {\n const propertyPrice = parseFloat(document.getElementById('propertyPrice').value);\n const downPayment = parseFloat(document.getElementById('downPayment').value);\n const loanDuration = parseFloat(document.getElementById('loanDuration').value);\n const interestRates = document.getElementById('interestRates').value.split(',').map(Number);\n const renovationCost = parseFloat(document.getElementById('renovationCost').value) || 0;\n\n const notaryFees = propertyPrice * 0.08;\n const loanAmount = propertyPrice + renovationCost + notaryFees - downPayment;\n\n const results = interestRates.map(rate => {\n const monthlyRate = rate / 100 / 12;\n const numberOfPayments = loanDuration * 12;\n const monthlyPayment = loanAmount * monthlyRate / (1 - Math.pow(1 + monthlyRate, -numberOfPayments));\n const totalCost = monthlyPayment * numberOfPayments;\n const interestCost = totalCost - loanAmount;\n\n return {\n rate,\n monthlyPayment,\n totalCost,\n interestCost\n };\n });\n\n displayResults(results[0], loanAmount, notaryFees);\n displayComparisonTable(results);\n}\n\nfunction displayResults(result, loanAmount, notaryFees) {\n document.getElementById('loanAmount').textContent = formatCurrency(loanAmount);\n document.getElementById('notaryFees').textContent = formatCurrency(notaryFees);\n document.getElementById('monthlyPayment').textContent = formatCurrency(result.monthlyPayment);\n document.getElementById('totalCost').textContent = formatCurrency(result.totalCost);\n document.getElementById('interestCost').textContent = formatCurrency(result.interestCost);\n}\n\nfunction displayComparisonTable(results) {\n const tableBody = document.querySelector('#comparisonTable tbody');\n tableBody.innerHTML = results.map(result => `\n <tr>\n <td>${result.rate}%</td>\n <td>${formatCurrency(result.monthlyPayment)}</td>\n <td>${formatCurrency(result.totalCost)}</td>\n <td>${formatCurrency(result.interestCost)}</td>\n </tr>\n `).join('');\n}\n\ndocument.getElementById('creditForm').addEventListener('submit', function(e) {\n e.preventDefault();\n calculateLoan();\n});\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 322,
+ "completion_tokens": 1735,
+ "total_tokens": 2057,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 322
+ },
+ "system_fingerprint": "fp_f1afce2943"
+}
\ No newline at end of file
diff --git a/readme.scroll b/readme.scroll
new file mode 100644
index 0000000..307ebf5
--- /dev/null
+++ b/readme.scroll
@@ -0,0 +1,2 @@
+# creditimmo4.scroll.pub
+Website generated by DeepSeek from prompt: creer un site de credit immo pour la france. Entrées : montant du bien, apport, durée, plusieurs possibilités de taux, cout travaux. sorties : montant prêt,frais notaires, mensualités, cout total, cout intérêt. Soyez creatif, formatez les montants et arrondir à un 1 euro près et tableau pour comparer
\ No newline at end of file
diff --git a/script.js b/script.js
new file mode 100644
index 0000000..cf0f975
--- /dev/null
+++ b/script.js
@@ -0,0 +1,57 @@
+function formatCurrency(amount) {
+ return new Intl.NumberFormat('fr-FR', { style: 'currency', currency: 'EUR' }).format(Math.round(amount));
+}
+
+function calculateLoan() {
+ const propertyPrice = parseFloat(document.getElementById('propertyPrice').value);
+ const downPayment = parseFloat(document.getElementById('downPayment').value);
+ const loanDuration = parseFloat(document.getElementById('loanDuration').value);
+ const interestRates = document.getElementById('interestRates').value.split(',').map(Number);
+ const renovationCost = parseFloat(document.getElementById('renovationCost').value) || 0;
+
+ const notaryFees = propertyPrice * 0.08;
+ const loanAmount = propertyPrice + renovationCost + notaryFees - downPayment;
+
+ const results = interestRates.map(rate => {
+ const monthlyRate = rate / 100 / 12;
+ const numberOfPayments = loanDuration * 12;
+ const monthlyPayment = loanAmount * monthlyRate / (1 - Math.pow(1 + monthlyRate, -numberOfPayments));
+ const totalCost = monthlyPayment * numberOfPayments;
+ const interestCost = totalCost - loanAmount;
+
+ return {
+ rate,
+ monthlyPayment,
+ totalCost,
+ interestCost
+ };
+ });
+
+ displayResults(results[0], loanAmount, notaryFees);
+ displayComparisonTable(results);
+}
+
+function displayResults(result, loanAmount, notaryFees) {
+ document.getElementById('loanAmount').textContent = formatCurrency(loanAmount);
+ document.getElementById('notaryFees').textContent = formatCurrency(notaryFees);
+ document.getElementById('monthlyPayment').textContent = formatCurrency(result.monthlyPayment);
+ document.getElementById('totalCost').textContent = formatCurrency(result.totalCost);
+ document.getElementById('interestCost').textContent = formatCurrency(result.interestCost);
+}
+
+function displayComparisonTable(results) {
+ const tableBody = document.querySelector('#comparisonTable tbody');
+ tableBody.innerHTML = results.map(result => `
+ <tr>
+ <td>${result.rate}%</td>
+ <td>${formatCurrency(result.monthlyPayment)}</td>
+ <td>${formatCurrency(result.totalCost)}</td>
+ <td>${formatCurrency(result.interestCost)}</td>
+ </tr>
+ `).join('');
+}
+
+document.getElementById('creditForm').addEventListener('submit', function(e) {
+ e.preventDefault();
+ calculateLoan();
+});
\ No newline at end of file
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..70ac677
--- /dev/null
+++ b/style.css
@@ -0,0 +1,116 @@
+:root {
+ --primary-color: #2c3e50;
+ --secondary-color: #3498db;
+ --background-color: #ecf0f1;
+ --text-color: #34495e;
+ --border-radius: 8px;
+ --box-shadow: 0 2px 4px rgba(0,0,0,0.1);
+}
+
+body {
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
+ line-height: 1.6;
+ margin: 0;
+ padding: 0;
+ background-color: var(--background-color);
+ color: var(--text-color);
+}
+
+header {
+ background-color: var(--primary-color);
+ color: white;
+ padding: 2rem;
+ text-align: center;
+}
+
+main {
+ max-width: 1200px;
+ margin: 2rem auto;
+ padding: 0 1rem;
+}
+
+section {
+ background: white;
+ border-radius: var(--border-radius);
+ box-shadow: var(--box-shadow);
+ padding: 2rem;
+ margin-bottom: 2rem;
+}
+
+h2 {
+ color: var(--primary-color);
+ margin-bottom: 1.5rem;
+}
+
+form {
+ display: grid;
+ gap: 1rem;
+}
+
+label {
+ font-weight: bold;
+}
+
+input {
+ padding: 0.5rem;
+ border: 1px solid #ddd;
+ border-radius: var(--border-radius);
+}
+
+button {
+ background-color: var(--secondary-color);
+ color: white;
+ padding: 0.75rem;
+ border: none;
+ border-radius: var(--border-radius);
+ cursor: pointer;
+ transition: background-color 0.3s;
+}
+
+button:hover {
+ background-color: #2980b9;
+}
+
+#results {
+ display: grid;
+ gap: 1rem;
+ margin-bottom: 2rem;
+}
+
+table {
+ width: 100%;
+ border-collapse: collapse;
+ margin-top: 1rem;
+}
+
+th, td {
+ padding: 0.75rem;
+ text-align: left;
+ border-bottom: 1px solid #ddd;
+}
+
+th {
+ background-color: var(--primary-color);
+ color: white;
+}
+
+footer {
+ text-align: center;
+ padding: 1rem;
+ background-color: var(--primary-color);
+ color: white;
+}
+
+@media (max-width: 768px) {
+ form {
+ grid-template-columns: 1fr;
+ }
+
+ main {
+ padding: 0 0.5rem;
+ }
+
+ section {
+ padding: 1rem;
+ }
+}
\ No newline at end of file