Skip to content

image-effects: one element for photo effects (pixelate, tiles, gallery-open and six more) - #38

Merged
ecropolis merged 1 commit into
mainfrom
claude/image-effects
Oct 30, 2026
Merged

ecropolis merged 1 commit into
mainfrom
claude/image-effects

Conversation

@ecropolis

Copy link
Copy Markdown
Owner

Adds image-effects to the media category: one element page that showcases several named photo effects and can grow. It carries over the effects built by hand for the MLP Technologies rebuild, and adds six common hover effects.

Effects

effect what it does from
pixelate canvas over the photo, redrawn at 40/10/4/10/40% every 100 ms with smoothing off, removed at 500 ms MLP src/scripts/pixelate.ts (Aine theme)
tiles hero slideshow; each photo arrives as a 7×7 grid of tiles flying in (random offset/turn/scale, 1000 ms, 45 ms stagger, power3.out); the title skews in, the text fades and the button rises; 10 s per slide MLP HeroSlider.astro (Slider Revolution)
gallery-open three or five photos in a strip; the middle one un-clips to full width while the others slide out, driven by --p1/--p2 from scroll MLP HeroGallery.astro (Aine theme)
zoom, grayscale, duotone, shine, caption CSS only caption/zoom/shine after imagehover.css (MIT), reimplemented
tilt 3D lean toward the pointer with glare after vanilla-tilt.js (MIT), reimplemented

Changes from the MLP originals

  • Tiles cover-fit the photo in px instead of 700% 700%, so photos of any shape keep their proportions. The leaving slide stays under the incoming tiles, so there are no black gaps. It also gains a 44px pause button (WCAG 2.2.2), waits on hover, focus, off screen and in hidden tabs, and exposes autoplay, intro, interval and grid.
  • gallery-open sizes from its own width with container units, not 100vw/50vh.
  • Everything respects prefers-reduced-motion (tracked live) and degrades to a plain image without JS. A page of only the CSS effects ships no script.
  • The Astro scoping trap is handled: styles are global ie- classes, because canvases and tiles are made by the script.

Also

  • The demo uses six new drawn SVG scenes (public/demo/scene-*.svg, generated), not client photos. On the hub (quiet), the slideshow neither flies in on load nor advances.
  • scripts/check-image-effects.mjs is added to npm run check with 9 mutants.
  • Search query not measured. SE Ranking's MCP and Data API both timed out on 2026-10-30. The entry targets image hover effects; a comment says so. Please measure it and revise.
  • Not done here: the MLP service-card text scramble. It is a text effect and belongs in animated-text.
  • Skill section: ecropolis/agent-skills PR (house-stack 0.57.0), linked below.

Verified

  • npm run check: all green (47 elements).
  • In the dev gallery (/image-effects/): the pixelate canvas appears and is removed at 500 ms; tilt transforms and shows glare; tiles builds 49 tiles with correct per-tile positions, and the slide states and inert flags cycle; gallery-open reads --p1 0.5 at half-scroll and opens visibly; duotone tints at rest; no console errors; no horizontal scroll at 375px.
  • Reduced motion was checked by code and by the check script only. The browser pane cannot emulate it.

🤖 Generated with Claude Code

Pixelate, tiles and gallery-open come from the MLP Technologies rebuild (the Aine theme's
gallery hover and image gallery hero, Slider Revolution's tile transition), generalized: cover-fit
tiles in px, a container-relative strip, a pause button and reduced-motion handling the
originals lacked. Zoom, grayscale, duotone, tilt, shine and caption round it out (tilt after
vanilla-tilt.js, caption/zoom/shine after imagehover.css, both MIT, reimplemented).

One file, effects picked with `effect`; a page of CSS-only effects ships no script. Demo scenes
are our own generated SVG drawings. scripts/check-image-effects.mjs pins the effect list
against the catalogue, motion only under no-preference, hover never without focus, the runtime
once per page, alt on every image and the tiles' no-JS markup, with 9 mutants.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ecropolis

Copy link
Copy Markdown
Owner Author

Skill section: https://github.com/ecropolis/agent-skills/pull/68 (house-stack 0.57.0).

@ecropolis
ecropolis merged commit 2a716a6 into main Oct 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant