Skip to content

Conversation

@CySSoO
Copy link
Contributor

@CySSoO CySSoO commented Jan 29, 2026

Motivation

  • Ensure the Her oe (Heroe) slider always starts with the second visible image active while keeping the first image visible and opaque and scrolling one image at a time.

Description

  • Template change: set data-start-index to 1 when more than one visible state and mark that slide as is-active in views/templates/hook/prettyblocks/prettyblock_heroe_carousel.tpl so the carousel initially shows image 2 as active while image 1 remains visible.
  • JS change: update updateSlides() in views/js/everblock.js to compute slidesPerView from viewportWidth / slideWidth and apply a centerOffset so the active slide is centered in the viewport when possible.
  • The offset calculation clamps between 0 and maxOffset to avoid overflowing the track and only runs when slideWidth > 0 to prevent NaN/invalid arithmetic.
  • No other interactive behaviors (touch swipe, navigation) were changed; the carousel still advances one slide per navigation action.

Testing

  • No automated tests were executed for this change.

Codex Task

@CySSoO CySSoO merged commit fe5b68a 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