Skip to content

feat(site): turn the demo page into a landing page - #40

Merged
killerwolf merged 1 commit into
mainfrom
feat/landing-page
Sep 7, 2026
Merged

feat(site): turn the demo page into a landing page#40
killerwolf merged 1 commit into
mainfrom
feat/landing-page

Conversation

@killerwolf

Copy link
Copy Markdown
Owner

The page at h4md1.fr/visual-image-tool/ currently opens on an <h1>VisualImageTool</h1> and a canvas. It demonstrates the tool without ever saying what it's for, what you get back, or why you'd pick it over a cropper — a visitor who doesn't already know has to infer the pitch from a controls panel.

What changed

Restructured around the demo rather than replacing it. The demo stays at the top, because dragging the marker is what actually explains this library — but it now sits under a headline and a one-line pitch, and above the two things that decide adoption:

  • What you get back, and where it goes — the focusPointobject-position / imgix / Cloudinary and cropZone → sharp / ImageMagick table. This is the differentiator and it wasn't on the page at all.
  • Is this the right tool? — an explicit yes, if / no, if, naming Cropper.js for the job this library deliberately doesn't do. Disqualifying the wrong reader in ten seconds beats an issue thread later.

Then: install (npm + CDN), the shortest runnable snippet, the UMD VisualImageTool.VisualImageTool gotcha called out inline, framework examples, an API table, browser support.

What did not change

  • The entire <head> — canonical, OG/Twitter cards, favicons, theme-color were already correct.
  • The demo markup and its self-playing animation script, verbatim.
  • All seven example pages.

This is a body + stylesheet rewrite.

Honesty

Every claim traces to the README or package.json: 3.6 kB gzipped, zero dependencies, bundled TypeScript declarations, MIT, current browsers. Nothing was measured here for the first time and no feature is claimed that isn't implemented.

Also pins the CDN snippets to 0.3.0. The README still pointed at @0.2, two minor versions behind, while telling readers to pin exactly — fixed in the same commit.

Verified in a browser

  • Tool loads from CDN, window.VisualImageTool is an object, output is valid JSON with focusPoint / cropZone / focusActive / cropActive.
  • "Center Focus point" lands on (512, 305) — exactly half of the image's natural 1024×610, confirming coordinates come back in original pixels.
  • Prism highlighting active, zero broken images, no console errors.
  • At 375px: no horizontal page overflow, cards stack, install box not clipped; only the wide <pre> scrolls, inside itself.

Adds

A copy button on the install command, and light/dark support via prefers-color-scheme.

🤖 Generated with Claude Code

The page at h4md1.fr/visual-image-tool/ opened on an <h1> and a canvas.
It demonstrated the tool without ever saying what the tool is for, what
you get back from it, or why you'd pick it over a cropper — so a visitor
who didn't already know had to infer the pitch from a controls panel.

Restructures it around the demo rather than replacing it. The demo stays
at the top, because dragging the marker is what actually explains this
library, but it now sits under a headline and a one-line pitch, and above
the two things that decide adoption: the table of what the coordinates
are for (object-position, imgix, Cloudinary, sharp), and an explicit
"no, if" naming Cropper.js for the job this library deliberately doesn't do.

Every claim comes from the README or package.json — 3.6 kB gzipped, zero
dependencies, bundled types, MIT. Nothing measured here for the first time.

The head metadata, the demo markup and its animation script are unchanged;
this is a body and stylesheet rewrite. Adds a copy button on the install
command, light/dark support, and pins the CDN snippets to 0.3.0 — the
README still pointed at @0.2, two minor versions back.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@killerwolf
killerwolf merged commit 88b1e97 into main Sep 7, 2026
2 checks passed
@killerwolf
killerwolf deleted the feat/landing-page branch September 7, 2026 14:42
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