Redesign speisen block for DA 2-column content model - #2
Merged
Merged
Conversation
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>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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)0,3l 3,30 €) into separate sizes and prices columns2em auto auto 4emcolumn widthsPreview
Test plan
🤖 Generated with Claude Code