@awesomate/hosting-mcp
Version:
Awesomate MCP server — lets Claude manage your Awesomate WordPress hosting, plan, limits, n8n automations, and build Node/static apps + databases
117 lines (94 loc) • 7.74 kB
Markdown
# Scroll scenes: Apple-style motion on a client's WordPress site
Apple's product pages feel expensive because every moving thing is tied to the scroll, loads only
when it is near, and falls back to a good still. A scroll scene does that for one moment on a page.
Copy the technique, never Apple's content. Where the account has the `scroll_scenes` feature
(Support Plus and above, 30 builds a day), the hub builds and delivers scenes for you: no local
scripts, no SSH, no frame uploads by hand. If `awesomate_get_context` shows the feature
unavailable, or a tool answers `feature_unavailable`, say its message in one line and stop: never
build a scene another way.
## Story first
Before building, write the page's scenes as a list: what the visitor sees, what scroll does, the one
line of copy. Three to five on a home page at most; one idea per screen. Motion should say the
brand's idea (a door opening for a renovation business, glass clearing for a window cleaner), not
decorate. Read the business details first (`awesomate_business`).
## The kinds
| kind | What the visitor sees | Source | Cost to them |
|---|---|---|---|
| `sequence` | A pinned image that plays as they scroll, both ways, exact on any device. The hero. | One photo (the effect: `push-in` zooms in, `frost-to-focus` clears from frosted, `wipe`), or a clip up to 20 s | 0.5 to 2 MB |
| `scrub` | A short clip that plays with the scroll | A clip, 1 to 4 s | about the same |
| `ambient` | A muted loop that plays when on screen and pauses off it, with a Pause button | A clip, up to 10 s | 0.5 to 1.5 MB, only when reached |
Text that comes into focus, and pinned "steps" sections, are plain CSS on the page, not scenes.
## Build one
`awesomate_scene_build {domain, name, kind, source, alt, ...}`:
- `source.file` is a photo or clip on this computer (the file is streamed to the hub, never through
the chat), `source.url` an https link. At most 50 MB.
- `name` is short and lower case (`hero`); the hub adds the version (`hero-v1`, `hero-v2`) and never
overwrites an earlier one, so a page using `-v1` keeps working while `-v2` is built.
- `alt` is required: what the scene shows. If the photo or clip came from an image or video
generator, pass `ai: true`: the site adds "(illustrative image)" (or video) to the alt text and
shows the label "Illustration" under it. A `caption` replaces that label, so on an AI scene write
the caption to say it is an illustration too. Never present AI media as a real customer result.
- `focus: [x, y]` (0 to 1) is where the subject is, so phones crop around it. `portrait: true` on a
sequence makes a separate set for phones held upright: a landscape set cropped to portrait looks
soft, so use it for a hero.
- It waits about 90 s. Still working: read it with `awesomate_scenes {domain, id}`.
## The phone budget
Every scene is measured as a browser downloads it: at most 2 MB on a desktop and 1.2 MB on a phone.
`refused_budget` gives the measured size and what to change (fewer frames, a lower quality, no
upright set, a shorter clip). Build again with those changes. When `error.code` is `refused_budget`,
`budget: "override"` lifts the limit to a hard ceiling (6 MB desktop, 3.6 MB phone, 600 files),
only when the owner accepts a heavier page; never use it to skip the conversation. When it is
`over_ceiling`, override cannot help: only a lighter build will do. Most visitors load only the
first frame before they scroll. Visitors with reduced motion, data saver or a 2G connection get a
still and nothing more downloads: a sequence shows its clear end frame, a scrub or ambient scene its
poster (the clip's first frame); nothing pins and nothing plays by itself.
## Place it
When `ready`, the answer gives the shortcode, `[awesomate_scene name="hero-v1"]`. Add `hero="1"` for
the first scene on a page: its first frame is then preloaded as the page's largest image.
- **Elementor:** a Shortcode widget in a full-width container with no padding. Leave the
container's overflow at default and give it no entrance animation. The plugin also undoes both
around a scene, but only in browsers with CSS `:has()` (all current ones), so setting them is the
safe path. Elementor's own MCP cannot place a shortcode: use `awesomate_scene_place {domain, id,
post_id, where?: "top" | "end", after?: <element id>}`, which adds exactly that, or do it in the
editor.
- `awesomate_scene_place` works on Elementor (a full-width container, or a section on a page built
from sections), block-editor (a Shortcode block) and classic pages (the shortcode on its own line).
An earlier version of the same scene on the page is swapped for the new one where it stands (leave
out where and after). A live page (published, scheduled or private) is refused with
`confirm_published`: ask the owner, and only on their yes call again with `confirm_published:
true`; otherwise place it on a draft. It is safe to call again after a timeout: it answers
`already` when the scene went on. It writes the plain shortcode, without `hero="1"`: for the first
scene on a page, add `hero="1"` to that Shortcode widget or block in the editor afterwards (with
the owner's yes on a live page).
- Publish a draft only with the owner's yes.
- **Block editor or classic editor:** a Shortcode block, or the shortcode on its own line.
- The Awesomate plugin (1.4.0 or newer) draws it; the delivery puts it on the site if it is missing
and says so. If the plugin is switched off, the shortcode shows as text until the owner switches it
on: tell them, never switch it on yourself.
- After placing, the page cache may serve the old page for a while: purge it, or wait.
## Check it
- Open the live page in Chrome at 1440 wide and at 390 wide (a phone). The scene pins and plays with
the scroll, there is no sideways scroll, and the upright set loads on the phone.
- Turn on "prefers-reduced-motion" in DevTools: no pinning, no autoplay, and a still (a sequence's
end frame, or a scrub or ambient scene's poster, its first frame).
- With motion allowed, every loop has a visible Pause button that works with the keyboard. Under
reduced motion, data saver or 2G the loop starts paused, so the same button reads Play.
- Lighthouse mobile: the largest image is the hero's first frame, under 2.5 s, and nothing shifts.
- A ready scene's `urls.check` (in `awesomate_scenes`) says whether the site serves it with the
year's cache (`served: true`, `immutable`, and `edge: hit` once Cloudflare holds it). `served:
false` with `challenged: true` is a bot challenge in front of the site, not a fault. `served:
'unknown'` means WordPress serves uploads from another address (a CDN) or the site did not answer;
open the scene in a browser to check.
## If it does not pin
Something above the scene clips it: an ancestor with `overflow: hidden` (or `auto` or `scroll`).
The plugin fixes Elementor's own containers; on other themes, walk up the tree in DevTools to that
element and set its overflow to `clip` (or `overflow-x: clip` where it hid sideways overflow), not
`visible`: `clip` keeps the page from scrolling sideways and still lets the scene pin.
## Undoing a placement
Where `awesomate_scene_place` put a scene on a page, the page before it is kept on the site (post
meta `_awesomate_scene_backup`, the last 3 per page; never in the hub). Elementor's Revisions panel
does not show it. To put a page back, ask Awesomate support (an undo in the tools is planned); a
scene placed by hand in the editor is undone in the editor as usual.
## Old versions
Scenes are never deleted by the tools. `awesomate_scenes` lists every version; the owner can remove
a folder no page uses (in `wp-content/uploads/scenes/`) by hand.