From ef36d5183f10f520d49213ad9a8a5f151df8d4c6 Mon Sep 17 00:00:00 2001 From: Lara Date: Sun, 4 Oct 2026 14:06:28 +0200 Subject: [PATCH] Show step durations only where one is set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three of the four Ablauf steps had no duration and therefore rendered a red "[Dauer?]" placeholder. Requested: drop those, keep the "2–3 Tage" on step 03. The span is now only rendered when step.dauer is filled, instead of falling back to a placeholder. Each .ablauf-step is its own grid, so the auto-width third column simply collapses and the text takes the space - no layout shift. The editor label no longer claims that an empty field produces a placeholder. Co-Authored-By: Claude Opus 5 --- admin/lib/schema.js | 2 +- src/pages/index.astro | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/admin/lib/schema.js b/admin/lib/schema.js index 7f1a828..1f4db82 100644 --- a/admin/lib/schema.js +++ b/admin/lib/schema.js @@ -206,7 +206,7 @@ module.exports = [ { key: 'num', label: 'Nummer', type: 'text' }, { key: 'title', label: 'Titel', type: 'text' }, { key: 'text', label: 'Text', type: 'textarea' }, - { key: 'dauer', label: 'Dauer (leer = Platzhalter)', type: 'text' }, + { key: 'dauer', label: 'Dauer (leer = wird nicht angezeigt)', type: 'text' }, ], }, ], diff --git a/src/pages/index.astro b/src/pages/index.astro index 0901745..3ae73b7 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -199,9 +199,7 @@ const { hero, warum, preis, highlights, leistungen, mappe, ablauf, about, faq, k

{step.title}

{step.text}

- - {step.dauer || [Dauer?]} - + {step.dauer && {step.dauer}} ))}