=== Crixu Tiltwall ===
Contributors: crixu
Plugin URI: https://github.com/crixu/crixu-tiltwall
Tags: hero, gallery block, background slider, parallax, cover block alternative
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Full-bleed hero sections with a parallax-style tilted image gallery background that scrolls endlessly, plus a Cover block-style overlay.

== Description ==

Crixu Tiltwall adds a full-bleed hero block for the block editor whose background is a scrolling image gallery — your photos arranged into columns that auto-scroll endlessly, alternating direction, with an optional flat or 3D parallax-style tilt. A Cover-block-style color overlay sits on top, and any inner blocks (headings, buttons, paragraphs, etc.) render above that, just like the core Cover block.

Use it to build an eye-catching hero section, header, or landing page background without a page builder — a lightweight alternative to the Cover block for sites that want a moving, gallery-driven backdrop instead of a single static image or video.

* Full-bleed hero background built from an image gallery you select in the block editor
* Endless auto-scrolling columns (a background slider effect), alternating direction per column
* Adjustable tilt: none, flat (2D), or 3D parallax-style perspective
* Configurable columns (3–6), scroll speed, and minimum height
* Cover-block style overlay color and opacity
* Respects `prefers-reduced-motion` for accessibility
* No build step — works out of the box, no bundler or npm install required

== Installation ==

1. Upload the plugin files to `wp-content/plugins/crixu-tiltwall`, or install directly through the WordPress plugins screen.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Add the "Tiltwall" block from the block inserter (category: Design).

== Frequently Asked Questions ==

= Do I need a build step to use or modify this plugin? =

No. The editor script is plain JavaScript using WordPress's registered globals (`wp.blocks`, `wp.element`, etc.), so no bundler is required.

= How many images do I need? =

The block works with any number of images; fewer than the columns × 6 minimum are cycled to fill every column.

= How is this different from the Cover block or a background slider plugin? =

It's built to feel like a natural extension of the Cover block — same overlay color/opacity controls, same "place any blocks on top" pattern — but instead of one static image or video, the background is a multi-column image gallery that auto-scrolls with an optional parallax-style tilt.

= Will it work with my theme? =

Yes. It's a standard block that renders inside your theme's content area and doesn't require a block theme, though it supports wide and full alignment where your theme allows it.

= Does the auto-scroll affect accessibility or performance? =

Motion automatically stops for visitors with `prefers-reduced-motion` enabled, and background images are lazy-loaded so they don't block initial page render.

== Screenshots ==

1. 3D tilt — the default perspective-tilted, auto-scrolling image mosaic with overlay.
2. Flat 2D tilt — the same block with a flat rotation instead of a 3D perspective.
3. No tilt — images scroll straight up/down with no rotation.

== Changelog ==

= 1.0.2 =
* Hardened `overlayColor` (now validated with `sanitize_hex_color()`, falling back to the default if invalid) and `minHeightUnit` (now checked against an allowlist of real CSS units) against crafted block attribute values that bypass the editor UI.

= 1.0.1 =
* Set an explicit `sizes` attribute on hero background images instead of letting WordPress default it to ~100vw. Tiles render at roughly 150-300px, so the default was pulling the largest srcset candidate for every tile — fixing this cut ~636KB off a page with this block in a real-world audit.

= 1.0.0 =
* Initial release.
