Skip to content

Conversation

@CySSoO
Copy link
Contributor

@CySSoO CySSoO commented Jan 29, 2026

Motivation

  • The existing Heroe Carousel block was visually incorrect and functionally broken and needed to be corrected rather than replaced.
  • The goal was to implement a true horizontal carousel with a centered dominant slide, visible adjacent slides, Apple-like framing, and reliable click + swipe navigation without vertical-scroll navigation.

Description

  • Restructured the template to the required markup by adding a .heroe-carousel wrapper with .heroe-viewport and .heroe-track that contains .heroe-slide articles, and kept arrow buttons controlled by the data-show-arrows flag (file: views/templates/hook/prettyblocks/prettyblock_heroe_carousel.tpl).
  • Reworked CSS to implement the Apple-like framed viewport: added .heroe-carousel and .heroe-viewport, set slide sizing to flex: 0 0 80% with margin: 0 10%, centered frame max-width (max-width: 1400px), tuned transitions and active-slide styling so the center slide is dominant (file: views/css/everblock.css).
  • Simplified JS carousel engine to percentage-based track movement and simple active-slide toggling, implemented goNext/goPrev using modulo for circular navigation, wired click handlers for arrows and added touchstart/touchend swipe support using a horizontal threshold while keeping listeners passive:true so vertical scrolling is not blocked (file: views/js/everblock.js).
  • Cleaned up obsolete centering calculations and removed pointer/wheel handlers and extra classes so the behavior matches the enforced structure and UX constraints.

Testing

  • No automated tests were executed for this change.

Codex Task

@CySSoO CySSoO merged commit 2d15319 into master Jan 29, 2026
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants