Skip to content

Redesign speisen block for DA 2-column content model - #2

Merged
benpeter merged 4 commits into
mainfrom
speisen-content-model
Feb 6, 2026
Merged

benpeter merged 4 commits into
mainfrom
speisen-content-model

Conversation

@benpeter

@benpeter benpeter commented Feb 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds JS decoration (speisen.js) that transforms a DA-editable 2-column table (item info | prices) into the original 5-cell visual grid (nr | name | desc | sizes | prices)
  • Automatically splits "label price" patterns (e.g. 0,3l 3,30 €) into separate sizes and prices columns
  • Supports column header rows (pizza section: normal Ø 28cm / groß Ø 30cm)
  • Updates CSS grid to match original 4-area layout with 2em auto auto 4em column widths

Preview

Test plan

  • Compare pizza section with original — header row with size labels, bare prices below
  • Compare beverage sections — sizes and prices in separate columns with spacing
  • Verify single-price items (Vorspeisen, Hauptgerichte, etc.) still render correctly
  • Verify DA editability of speisekarte-new content

🤖 Generated with Claude Code

Replace CSS-only 5-column grid with a JS-decorated 2-column Collection
model that is editable in the DA editor. The decoration code extracts
item numbers from <strong> and descriptions from <em>, creating a
3-column visual layout (nr | name+desc | prices) from 2 authored columns.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Signed-off-by: Ben Peter <bp@ben-peter.com>
JS now creates 4 direct child divs (nr | info | desc | prices) instead
of nesting desc inside info. CSS uses grid-template-areas matching the
original 2-row layout where nr and prices span both rows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Signed-off-by: Ben Peter <bp@ben-peter.com>
The speisen block now creates 5 grid cells per row (nr | info | desc |
sizes | prices), matching the original 4-area grid layout. Prices with
"label price" patterns (e.g. "0,3l 3,30 €") are automatically split
into separate sizes and prices columns. Header rows with bold labels
are detected and rendered as column headers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Signed-off-by: Ben Peter <bp@ben-peter.com>
Matches the original layout where "normal" and "Ø 28cm" are on separate
lines in the sizes column, and "groß" and "Ø 30cm" on separate lines in
the prices column. Prevents wrapping in the narrow 4em prices column.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Signed-off-by: Ben Peter <bp@ben-peter.com>
@aem-code-sync

aem-code-sync Bot commented Feb 6, 2026

Copy link
Copy Markdown

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@aem-code-sync

aem-code-sync Bot commented Feb 6, 2026

Copy link
Copy Markdown
Page Scores Audits Google
📱 /speisekarte-new PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /speisekarte-new PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@benpeter
benpeter merged commit 929bb91 into main Feb 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants