{"id":6731,"date":"2026-03-24T17:54:47","date_gmt":"2026-03-24T16:54:47","guid":{"rendered":"https:\/\/hermannsblog.de\/?page_id=6731"},"modified":"2026-03-24T18:12:00","modified_gmt":"2026-03-24T17:12:00","slug":"umrechner_menge","status":"publish","type":"page","link":"https:\/\/hermannsblog.de\/index.php\/umrechner_menge\/","title":{"rendered":"Mengenumrechner"},"content":{"rendered":"\n<p>Einfaches Tool, um Mengenangaben von Brotrezepten umzurechnen. Die Bezeichnungsfelder sind editierbar. Zwischen den Eingaben kann man sich mit der Tab-Taste bewegen.<\/p>\n\n\n\n<!DOCTYPE html>\n<html lang=\"de\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Rezept-Umrechner Pro<\/title>\n    <style>\n        :root { --primary: #2c3e50; --accent: #e67e22; --bg: #f4f7f6; }\n        body { font-family: 'Segoe UI', sans-serif; background: var(--bg); padding: 15px; display: flex; justify-content: center; }\n        .card { background: white; padding: 20px; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); max-width: 700px; width: 100%; }\n        h2 { color: var(--primary); margin-top: 0; border-bottom: 2px solid var(--accent); padding-bottom: 8px; }\n        \n        .row { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; margin-bottom: 6px; align-items: center; }\n        .header { font-weight: bold; font-size: 0.85em; color: #7f8c8d; text-transform: uppercase; margin-bottom: 10px; border-bottom: 1px solid #eee; padding-bottom: 5px;}\n        \n        .section-head { grid-column: span 3; background: #f9f9f9; padding: 6px 10px; font-weight: bold; margin-top: 15px; border-radius: 4px; color: var(--primary); font-size: 0.9em; }\n        \n        input { padding: 8px; border: 1px solid #ddd; border-radius: 4px; width: 100%; box-sizing: border-box; font-size: 14px; }\n        input.label-input { border: 1px transparent; background: transparent; font-weight: 500; }\n        input.label-input:hover { border-color: #eee; background: #fff; }\n        input.num-input { text-align: right; border-color: #3498db33; }\n        \n        .res-cell { text-align: right; font-weight: bold; color: var(--accent); padding-right: 5px; }\n        .excluded { color: #95a5a6; font-style: italic; } \/* Markierung f\u00fcr Felder ohne Summenrelevanz *\/\n\n        .footer-box { background: var(--primary); color: white; padding: 20px; border-radius: 8px; margin-top: 25px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }\n        .total-info { font-size: 0.9em; }\n        .total-info span { font-size: 1.3em; font-weight: bold; color: #f1c40f; }\n        .target-input-group { display: flex; align-items: center; gap: 10px; }\n        .target-input-group input { width: 100px; font-size: 1.2em; color: #000; font-weight: bold; }\n        \n        .hint { font-size: 0.75em; color: #7f8c8d; margin-top: 10px; }\n    <\/style>\n<\/head>\n<body>\n\n<div class=\"card\">\n    <h2>\ud83c\udf5e Mengenumrechner<\/h2>\n    \n    <div class=\"row header\">\n        <div>Bezeichnung (editierbar)<\/div>\n        <div style=\"text-align: right;\">Original (g)<\/div>\n        <div style=\"text-align: right;\">Neu (g)<\/div>\n    <\/div>\n\n    <div id=\"ingredients-container\"><\/div>\n\n    <div class=\"footer-box\">\n        <div class=\"total-info\">\n            Basis-Gesamtgewicht:<br>\n            <span id=\"sum-orig\">0<\/span> g\n        <\/div>\n        <div class=\"target-input-group\">\n            <label>Zielgewicht:<\/label>\n            <input type=\"number\" id=\"target-weight\" value=\"1000\" oninput=\"calculate()\">\n        <\/div>\n    <\/div>\n    \n    <!--\n    <p class=\"hint\">* Kursive Werte werden angezeigt & skaliert, z\u00e4hlen aber nicht zum Basis-Gesamtgewicht (Vermeidung von Doppelz\u00e4hlungen).<\/p> \n    -->\n<\/div>\n\n<script>\n    \/\/ Struktur basierend auf deiner Excel\n    const schema = [\n        { type: 'section', label: 'Hauptteig \/ Mehle' },\n        { id: 'm1', label: 'Weizenmehl 550', val: 500, sum: true },\n        { id: 'm2', label: 'Mehl 2', val: 0, sum: true },\n        { id: 'm3', label: 'Mehl 3', val: 0, sum: true },\n        { id: 'm4', label: 'Mehl 4', val: 0, sum: true },\n        \n        { type: 'section', label: 'Fl\u00fcssigkeiten' },\n        { id: 'f1', label: 'Fl\u00fcssigkeit 1', val: 0, sum: true },\n        { id: 'f2', label: 'Fl\u00fcssigkeit 2', val: 0, sum: true },\n        \n        { type: 'section', label: 'Vorteige & St\u00fccke' },\n        { id: 'st', label: 'Sauerteig', val: 0, sum: true },\n        { id: 'vt', label: 'Vorteig z.B. Poolish', val: 0, sum: true },\n        { id: 'bq', label: 'Br\u00fch-\/Quellst\u00fcck', val: 0, sum: true },\n        \n        { type: 'section', label: 'Weitere Zutaten' },\n        { id: 'oel', label: '\u00d6l', val: 0, sum: true },\n        { id: 'salz', label: 'Salz', val: 0, sum: true },\n        { id: 'malz', label: 'Malz\/Sirup', val: 0, sum: true },\n        { id: 'hefe', label: 'Hefe', val: 0, sum: true },\n        { id: 's1', label: 'Sonstiges 1', val: 0, sum: true },\n        { id: 's2', label: 'Sonstiges 2', val: 0, sum: true }\n    ];\n\n    const container = document.getElementById('ingredients-container');\n\n    \/\/ App initialisieren\n    schema.forEach(item => {\n        if (item.type === 'section') {\n            const div = document.createElement('div');\n            div.className = 'section-head';\n            div.innerText = item.label;\n            container.appendChild(div);\n        } else {\n            const row = document.createElement('div');\n            row.className = 'row';\n            row.innerHTML = `\n                <input type=\"text\" class=\"label-input ${item.sum ? '' : 'excluded'}\" value=\"${item.label}\" id=\"name-${item.id}\">\n                <input type=\"number\" class=\"num-input\" value=\"${item.val}\" id=\"orig-${item.id}\" oninput=\"calculate()\">\n                <div class=\"res-cell\" id=\"res-${item.id}\">0.0<\/div>\n            `;\n            container.appendChild(row);\n        }\n    });\n\n    function calculate() {\n        let totalOriginal = 0;\n        \n        \/\/ 1. Summe der relevanten Originalwerte berechnen\n        schema.forEach(item => {\n            if (item.id) {\n                const val = parseFloat(document.getElementById(`orig-${item.id}`).value) || 0;\n                if (item.sum) {\n                    totalOriginal += val;\n                }\n            }\n        });\n\n        document.getElementById('sum-orig').innerText = totalOriginal.toFixed(1);\n        \n        const target = parseFloat(document.getElementById('target-weight').value) || 0;\n        const factor = totalOriginal > 0 ? target \/ totalOriginal : 0;\n\n        \/\/ 2. Alle Zeilen skalieren (auch die ausgeschlossenen)\n        schema.forEach(item => {\n            if (item.id) {\n                const origVal = parseFloat(document.getElementById(`orig-${item.id}`).value) || 0;\n                const newVal = origVal * factor;\n                document.getElementById(`res-${item.id}`).innerText = newVal.toFixed(1);\n            }\n        });\n    }\n\n    \/\/ Startberechnung\n    calculate();\n<\/script>\n\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"wprm-recipe-roundup-name":"","wprm-recipe-roundup-description":"","footnotes":""},"class_list":["post-6731","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hermannsblog.de\/index.php\/wp-json\/wp\/v2\/pages\/6731","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hermannsblog.de\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/hermannsblog.de\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/hermannsblog.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hermannsblog.de\/index.php\/wp-json\/wp\/v2\/comments?post=6731"}],"version-history":[{"count":7,"href":"https:\/\/hermannsblog.de\/index.php\/wp-json\/wp\/v2\/pages\/6731\/revisions"}],"predecessor-version":[{"id":6743,"href":"https:\/\/hermannsblog.de\/index.php\/wp-json\/wp\/v2\/pages\/6731\/revisions\/6743"}],"wp:attachment":[{"href":"https:\/\/hermannsblog.de\/index.php\/wp-json\/wp\/v2\/media?parent=6731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}