Skip to content

Conversation

@CySSoO
Copy link
Contributor

@CySSoO CySSoO commented Jan 22, 2026

Motivation

  • Restore and implement a frontend slider mode for the Simple Image prettyblock using vanilla JS and Bootstrap utilities so it works without external dependencies.
  • Provide a responsive, accessible and configurable slider supporting per-breakpoint items, autoplay and infinite looping.
  • Allow the new slider script to be distributed/loaded by adding it to the module allowed files list.

Description

  • Add a new vanilla slider implementation in views/js/everblock-slider.js that reads data-* attributes (data-items, data-items-tablet, data-items-mobile, data-autoplay, data-autoplay-delay, data-infinite), computes item widths, handles prev/next, dots pagination, autoplay, resize and uses transform: translateX() for movement.
  • Register the slider script for frontend inclusion by calling registerJavascript for modules/<module>/views/js/everblock-slider.js in everblock.php.
  • Add minimal styling for the slider track, controls and dots in views/css/everblock.css (classes like .ever-slider-track, .ever-slider-button, .ever-slider-dot).
  • Update views/templates/hook/prettyblocks/prettyblock_img.tpl to render the slider markup (.ever-slider, .ever-slider-track, .ever-slider-item, prev/next buttons and .ever-slider-dots) and wire the data attributes and gap classes for slider mode.
  • Add views/js/everblock-slider.js to config/allowed_files.php so the file is whitelisted for distribution.

Testing

  • No automated tests were executed for these changes (no CI or test suite run).
  • Local manual verification steps are not included in this PR.

Codex Task

@CySSoO CySSoO merged commit 91a91f7 into master Jan 22, 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