A calm page
Behind the page is its own plain background, set by src/components/fx/LightField.astro. Nothing moves or glows behind it: the moving light, its still glow and the dot pattern are gone, so the page is calm. The rhythm comes from the sections, which take turns on two backgrounds (the zebra): a default section is the page’s own background, a secondary one the second background, --rk-alt in src/styles/theme.css, a quiet solid shade with a hint of the site’s colour, in both modes.
Every page opens with the same hero (ground="gradient", the default on RocketHero): the site’s 700 shade at the top, with a grid of fine lines that shows only in the middle on a desktop, on every page, the homepage too (grid={false} on RocketHero removes it); it fades into a very dark shade of the site’s colour (its 900 mixed half with black). gradient on its own fades into black instead. ground="band" gives it the closing band’s look, and ground="light" a near-black ground with two still glows. Its heading can end in a highlighted line (highlight on RocketHero), as the homepage’s does: the last line sits on a block of the hero’s silver with its words in the site’s colour, and the line before it is a softer grey. On the homepage, the dashboard picture (src/components/saas/AppMock.astro) sits in the hero under the buttons.
No lines between the parts
There are no lines between the parts of a page. The hero, the sections, the closing band and the footer each have their own background, and the change of background marks the border. The divider above the footer’s copyright stays.
In dark mode the page’s own background, the darker half of the zebra, is a dark blue-grey rather than near-black, so the page doesn’t feel heavy; the second background and the cards stay a step lighter.
The buttons
A page has two kinds of button. The primary one is solid: on a light page in the site’s 600, wherever the ground is dark (the hero, the header, the closing band and every primary button in dark mode) the hero’s soft silver (a light grey with a trace of the site’s colour), flat, with a thin edge and dark text. The hero’s heading and the announcement bar’s tag are the same silver, so the light parts of the hero match. The secondary one is an outline on a transparent ground. Both have a 1px border (the primary’s is transparent), so a pair is exactly the same size. Outline buttons on the page have an edge in the site’s colour in both modes, and in light mode their text too; wherever the ground is dark (the hero, the closing band, dark mode) their text is the hero’s silver, and in the hero and the closing band their edge is light.
The cards
Cards and tiles (elements with data-spot) have an edge in the site’s colour, so they stand out from both backgrounds. Their background is always the other of the two backgrounds from what’s behind them, in both modes: the second background on the page’s own background, the page’s own background in a section on the second one, and the other way round again for a card inside a card. The “On this page” box follows it too. Grey text on them keeps at least 4.8:1. src/components/fx/Spotlight.astro adds a soft light that follows the pointer across them.
A post’s card ends in “Read the post” and a customer story’s card in “Read the story”, with an arrow that moves a little on hover. The whole card is one link.
The covers the theme draws for posts and projects (src/components/fx/ProjectCover.astro) are in Astro Orbit’s style: the site’s colour, or a post’s category’s, from top to foot, with four corner marks, the word and the icon, the same in light and dark mode. On the cards they have no grid; a post’s own page, and a project’s page without a gallery or picture, show the cover with a grid of fine lines.
The animations
The animations are in src/components/fx/Motion.astro:
- when a page loads, the hero’s badge, heading, line and buttons slide up one after another, and the header drops in when a visitor arrives from elsewhere (not when moving between the site’s own pages);
- below the hero, every piece of a page rises into view as it’s scrolled to, once: each heading, paragraph, list and picture of a post or project, each card and tile, each link and line. Pieces that come into view together, such as cards side by side, follow one another 100ms apart. What’s already on the first screen rises in just after the hero.
In your own markup:
| Attribute | What it does |
|---|---|
data-reveal |
Rises into view. left, right, down or scale set the direction. |
data-reveal-delay="1" to "4" |
Comes in 100ms to 400ms later, for tiles in a row |
data-reveal-children |
Its children come in one after another |
data-no-reveal |
Never hidden or moved |
Rows of tags, in the blog’s and the projects’ heroes, on the search page and under a post, stay still. Under reduced motion nothing is hidden or moved, and a jump to an anchor shows the section at once. motion: false in the settings turns the animations off.