Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9ddfcac4cb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const buildCard = (data) => { | ||
| const bullets = parseBullets(data.subtitle || ''); | ||
| const bulletSet = new Set(bullets.map(normalize)); | ||
|
|
||
| const card = document.createElement('div'); | ||
| card.className = 'tilda-slider__card'; | ||
| card.innerHTML = ` | ||
| <div class="tilda-slider__card-header"> | ||
| <img class="tilda-slider__card-image" src="${data.image}" alt="${data.title}"> | ||
| <h3 class="tilda-slider__card-title">${data.title}</h3> | ||
| </div> | ||
| <p class="tilda-slider__card-description">${data.description}</p> | ||
| <div class="tilda-slider__disciplines"> | ||
| ${disciplineLabels | ||
| .map((label) => { | ||
| const active = bulletSet.has(normalize(label)); | ||
| return ` |
There was a problem hiding this comment.
Match hall labels by substring, not exact bullet equality
The discipline highlight only turns on when a subtitle bullet exactly equals the hall label after lowercasing (bulletSet.has(normalize(label))). If a bullet includes any extra text like "Зал 1 — йога" or "Зал 1 (утро)", the hall name is present but the exact match fails, so the pill stays inactive. This breaks the stated behavior in cases where subtitles add clarifying text to each bullet; consider checking includes on the normalized bullet text or stripping punctuation/extra text before comparison.
Useful? React with 👍 / 👎.
Motivation
#rec1861153111so the client can edit content in Tilda without touching code.Description
tilda-slider-123.htmlcontaining a self-contained HTML/CSS/JS snippet that renders the slider and can be pasted into Tilda HTML block #123.--slider-edge-padding: 40pxfor the requested horizontal spacing, responsive card sizing, navigation buttons and dots, and active/inactive styles for discipline pills.#rec1861153111) using common Tilda selectors, parses the subtitle into bullets with a robust regex (split(/\n|\r|•|·|\*|-/)), and builds cards dynamically.disciplineLabelsarray ('Зал 1'…'Зал 4') and a case-insensitive match against parsed subtitle bullets; autoplay runs every 5s and manual controls include prev/next buttons and dots with ARIA roles.Testing
Codex Task