Actualiser index.html

This commit is contained in:
2025-05-19 11:56:46 +00:00
parent 6ca48cf2c3
commit 7915509049

View File

@@ -3,12 +3,16 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Gratin Dauphinois</title> <title>Gratin Dauphinois</title>
<style>
body { font-family: sans-serif; padding: 2rem; line-height: 1.6; }
input { width: 4rem; }
</style>
</head> </head>
<body> <body>
<h1>Recette de Gratin Dauphinois</h1> <h1>Gratin Dauphinois — Recette Ajustable</h1>
<label for="portions">Nombre de personnes :</label> <p>Choisissez le nombre de personnes :</p>
<input type="number" id="portions" value="4" min="1" onchange="updateQuantities()"> <input type="number" id="portions" value="4" min="1" onchange="updateQuantities()"> personnes
<h2>Ingrédients</h2> <h2>Ingrédients</h2>
<ul> <ul>
@@ -17,15 +21,19 @@
<li><span id="lait">25</span> cl de lait entier</li> <li><span id="lait">25</span> cl de lait entier</li>
<li><span id="ail">1</span> gousse d'ail</li> <li><span id="ail">1</span> gousse d'ail</li>
<li><span id="fromage">60</span> g de fromage râpé</li> <li><span id="fromage">60</span> g de fromage râpé</li>
<li>Noix de muscade, sel, poivre</li>
</ul> </ul>
<h2>Instructions</h2>
<p>Suivez les étapes habituelles pour préparer le gratin dauphinois.</p>
<script> <script>
const base = { const base = {
pommes: 1, // kg pommes: 1,
creme: 25, // cl creme: 25,
lait: 25, // cl lait: 25,
ail: 1, // gousse ail: 1,
fromage: 60 // g fromage: 60
}; };
function updateQuantities() { function updateQuantities() {