diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..503fe88 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,14 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "msedge", + "request": "launch", + "name": "Open Formular.html", + "file": "c:\\Users\\OBulai\\Development\\BMI-Web-App-1\\src\\formular\\html\\formular.html" + } + ] +} \ No newline at end of file diff --git a/Plan.md b/Plan.md index f3ef0e7..e69de29 100644 --- a/Plan.md +++ b/Plan.md @@ -1 +0,0 @@ -1. Wasserfall diff --git a/docs/Formular.md b/docs/Formular.md new file mode 100644 index 0000000..00983b1 --- /dev/null +++ b/docs/Formular.md @@ -0,0 +1,34 @@ +# BMI Form - Input Component + +## 📝 Project Description +This part of the BMI calculator is responsible for **user input**. Users can enter their personal data and calculate their BMI. + +## 🎯 Features + +### Input Fields +- **Age** (1-120 years) +- **Date** (calculation date) +- **Weight** (1-500 kg) +- **Height** (50-250 cm) + +### Buttons +- **BMI berechnen** - Starts the calculation +- **Clear/Reset** - Clears all inputs and results + +### Functionality +- ✅ **Input Validation** - Checks for empty fields and valid values +- ✅ **BMI Calculation** - Formula: `Weight / (Height/100)²` +- ✅ **BMI Categories** - Underweight, Normal weight, Overweight, Obesity +- ✅ **Local Storage** - Saves inputs in browser +- ✅ **Auto-Load** - Loads saved data on page start +- ✅ **Responsive Design** - Works on desktop and mobile + + +## 🚀 Usage + +1. Open `formular.html` in browser +2. Fill all 4 input fields +3. Click "BMI berechnen" +4. Result is displayed and saved +5. On reload: Data is still there +6. "Clear/Reset" deletes all data \ No newline at end of file diff --git a/gitcommands.txt/gitignore b/gitcommands.txt/gitignore new file mode 100644 index 0000000..812cc91 --- /dev/null +++ b/gitcommands.txt/gitignore @@ -0,0 +1,12 @@ +git init +git checkout -b new_branch # create a new branch +git branch # what branches do I have? +git status + +git pull origin develop +git pull origin feature/Formular_Eingabe + +git push -u origin feature/Formular_Eingabe +git push -u origin develop + + diff --git a/src/formular/css/formular.css b/src/formular/css/formular.css new file mode 100644 index 0000000..402bf39 --- /dev/null +++ b/src/formular/css/formular.css @@ -0,0 +1,109 @@ +body { + font-family: Arial, sans-serif; + background-color: #f4f4f4; + margin: 0; + padding: 20px; + text-align: center; +} + +h1 { + text-align: center; + color: #333; + font-size: 2.5rem; + margin-bottom: 30px; + margin-top: 20px; +} + +/* Container for form */ +#bmiForm { + background: white; + max-width: 400px; + margin: 20px auto; + padding: 25px; + border-radius: 8px; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); + border: 1px solid #e0e0e0; +} + +input[type="number"], +input[type="date"] { + width: 100%; + max-width: 350px; + margin: 0 auto 15px auto; + /* ← Auto links/rechts = zentriert */ + padding: 12px; + border: 2px solid #ddd; + border-radius: 4px; + font-size: 16px; + transition: border-color 0.3s ease; + font-family: Arial, sans-serif; + display: block; +} + +/* Focus state for inputs */ +input[type="number"]:focus, +input[type="date"]:focus { + outline: none; + border-color: #4CAF50; + box-shadow: 0 0 5px rgba(76, 175, 80, 0.3); +} + +/* Placeholder styling */ +input::placeholder { + color: #888; + font-style: italic; +} + +/* Submit button */ +button { + width: 100%; + padding: 14px; + background-color: #4CAF50; + color: white; + border: none; + border-radius: 4px; + font-size: 16px; + cursor: pointer; + transition: background-color 0.3s ease; + font-weight: 500; +} + +button:hover { + background-color: #45a049; +} + +button:active { + transform: translateY(1px); +} + +/* Error display */ +#error { + display: none; + color: #d32f2f; + background-color: #ffebee; + border: 1px solid #ffcdd2; + padding: 10px; + border-radius: 4px; + margin-top: 10px; + font-size: 14px; + text-align: center; +} + +/* Mobile responsive */ +@media (max-width: 480px) { + #bmiForm { + margin: 10px; + padding: 20px; + } + + input[type="number"], + input[type="date"] { + font-size: 14px; + padding: 10px; + } + + button { + font-size: 14px; + padding: 12px; + } +} \ No newline at end of file diff --git a/src/formular/html/formular.html b/src/formular/html/formular.html new file mode 100644 index 0000000..097bcb9 --- /dev/null +++ b/src/formular/html/formular.html @@ -0,0 +1,30 @@ + + + +
+