{"id":1867,"date":"2025-08-02T12:23:00","date_gmt":"2025-08-02T10:23:00","guid":{"rendered":"https:\/\/alex.kafilm.de\/restaurant\/?page_id=1867"},"modified":"2025-08-03T07:28:33","modified_gmt":"2025-08-03T05:28:33","slug":"getraenkekarte","status":"publish","type":"page","link":"https:\/\/alex.kafilm.de\/restaurant\/getraenkekarte\/","title":{"rendered":"Getr\u00e4nkekarte"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"1867\" class=\"elementor elementor-1867\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-53dde55 e-flex e-con-boxed e-con e-parent\" data-id=\"53dde55\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<div class=\"elementor-element elementor-element-fdef70b e-con-full e-flex e-con e-child\" data-id=\"fdef70b\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-e520de9 elementor-widget elementor-widget-heading\" data-id=\"e520de9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h1 class=\"elementor-heading-title elementor-size-default\">\ud83e\udd42 getr\u00e4nkekarte<\/h1>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-32c7a8b e-flex e-con-boxed e-con e-parent\" data-id=\"32c7a8b\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-9ad664e elementor-widget elementor-widget-html\" data-id=\"9ad664e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div id=\"getraenkekarte\"><\/div>\n\n<script>\nconst tsvUrl = \"https:\/\/docs.google.com\/spreadsheets\/d\/e\/2PACX-1vQX0arT2E_1s4UheMzK5vhqfSL-7zxPxnoX4Sp20ZsI1jO8rN8NFDdxPJundljTx7f6dRds1ezrlOzB\/pub?gid=956861549&single=true&output=tsv\"; \/\/ <<< HIER deine eigene TSV-URL einf\u00fcgen\n\nfetch(tsvUrl)\n  .then(response => response.text())\n  .then(data => {\n    const rows = data.trim().split(\"\\n\");\n    const headers = rows.shift().split(\"\\t\");\n\n    const items = rows.map(row => {\n      const values = row.split(\"\\t\");\n      const item = {};\n      headers.forEach((header, index) => {\n        item[header.toLowerCase()] = values[index];\n      });\n      return item;\n    });\n\n    const grouped = {};\n    items.forEach(item => {\n      const category = item.category || \"Uncategorized\";\n      if (!grouped[category]) {\n        grouped[category] = [];\n      }\n      grouped[category].push(item);\n    });\n\n    const container = document.getElementById(\"getraenkekarte\");\n    container.style.fontFamily = \"Arial, sans-serif\";\n\n    for (const [category, entries] of Object.entries(grouped)) {\n      const categoryHeader = document.createElement(\"h2\");\n      categoryHeader.textContent = category;\n\n      container.appendChild(categoryHeader);\n\n      const table = document.createElement(\"table\");\n\n\n    \n      const tbody = document.createElement(\"tbody\");\n\n      entries.forEach(entry => {\n        const row = document.createElement(\"tr\");\n\n        const leftCell = document.createElement(\"td\");\n            leftCell.style.width = \"70%\";\n\n\n        const titleDiv = document.createElement(\"div\");\n        titleDiv.textContent = entry.title;\n\n        leftCell.appendChild(titleDiv);\n\n        if (entry.description) {\n          const descDiv = document.createElement(\"div\");\n          descDiv.textContent = entry.description;\n          leftCell.appendChild(descDiv);\n        }\n\n        row.appendChild(leftCell);\n\n        const qtyCell = document.createElement(\"td\");\n        qtyCell.textContent = [entry.qty, entry.unit].filter(Boolean).join(\" \");\n        qtyCell.style.width = \"10%\";\n        row.appendChild(qtyCell);\n\n        const priceCell = document.createElement(\"td\");\n        priceCell.textContent = entry.price || \"\";\n        priceCell.style.width = \"10%\";\n        row.appendChild(priceCell);\n\n        tbody.appendChild(row);\n      });\n\n      table.appendChild(tbody);\n      container.appendChild(table);\n    }\n  })\n  .catch(error => {\n    console.error(\"Fehler beim Laden der TSV:\", error);\n    document.getElementById(\"getraenkekarte\").innerHTML = \"<p>Getr\u00e4nkekarte konnte nicht geladen werden.<\/p>\";\n  });\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\ud83e\udd42 getr\u00e4nkekarte<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1867","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/alex.kafilm.de\/restaurant\/wp-json\/wp\/v2\/pages\/1867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alex.kafilm.de\/restaurant\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/alex.kafilm.de\/restaurant\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/alex.kafilm.de\/restaurant\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alex.kafilm.de\/restaurant\/wp-json\/wp\/v2\/comments?post=1867"}],"version-history":[{"count":10,"href":"https:\/\/alex.kafilm.de\/restaurant\/wp-json\/wp\/v2\/pages\/1867\/revisions"}],"predecessor-version":[{"id":1976,"href":"https:\/\/alex.kafilm.de\/restaurant\/wp-json\/wp\/v2\/pages\/1867\/revisions\/1976"}],"wp:attachment":[{"href":"https:\/\/alex.kafilm.de\/restaurant\/wp-json\/wp\/v2\/media?parent=1867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}