A Payload site, ready to clone

Block styles

Each block in each of its styles. Every style follows the light or dark mode.

A plain text block

On the page’s own colours: the theme’s base family.

A highlighted card

The card takes the accent family: its background, text and links.

An outlined card

The page’s background, with the accent drawn as its border.

What to do, and what to avoid

Do

A success card: the page’s background, with the success family as its border and heading.

The two cards are as tall as the taller one.

Don’t

An error card, in the error family.

Good to know

An info card, in the info family.

Careful

A warning card, in the warning family.

Brand

An accent card, in the accent family.

A band (the default)

On the surface colour, as the call to action always looked.

Back to Theming

An accent band

The accent family, button included. See the feature list.

All features
Placeholder: concentric circles in violet
Concentric circles in violet. The caption takes the colours of the section’s style.Image: APEX demo, drawn by pnpm seed:demo

An inverted section

The theme’s other mode: dark on a light page, light on a dark one.

The body takes rich text:

  • bold, italic and inline code (like pnpm seed:demo);
  • links;
  • and lists, like this one.

Columns on an accent band

The blocks inside follow the band’s family.

A card inside

An outlined card in the accent family.

An inverted call to action

Its button keeps the base family’s action colour, in the other mode.

Home

A project’s own styles

A project adds styles of its own to any of these blocks, CSS-only or with its own markup, makes one the default and hides the ones it doesn’t want: pnpm make:block-style writes it and connects it (TASK-270). The README’s “Project block styles” explains how.

A style of the project’s own for the hero, its new default
pnpm make:block-style hero split --template --default --hide inverted \
  --prefix acme --label en=Split --label es=Dividido --label ca=Dividit

Code

The code block, in its default and inverted styles. Highlighting and the copy button come in the browser; without JavaScript the code is still there as plain text.

greet.js
const answer = 42 // the answer
export async function greet(name = 'world') {
  const response = await fetch(`/api/hello?name=${encodeURIComponent(name)}`)
  return response.ok ? (await response.json()).message : null
}
const veryLongLine = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.'
card.css
.card {
  --_bg: var(--opa--color--surface, #f7f7f5);
  background: var(--_bg);
  border-radius: 0.5rem; /* rounded */
}
@media (min-width: 48rem) {
  .card:hover > a[href^='https'] { color: #1f5fbf; }
}
# install and start
pnpm install
pnpm --dir apps/template-site dev
<a href="/contact" class="button">Contact</a>
<!-- </script> stays text -->
A long file
export function step1(input) {
  return input.map((value) => value * 1) // step 1
}

export function step2(input) {
  return input.map((value) => value * 2) // step 2
}

export function step3(input) {
  return input.map((value) => value * 3) // step 3
}

export function step4(input) {
  return input.map((value) => value * 4) // step 4
}

export function step5(input) {
  return input.map((value) => value * 5) // step 5
}

export function step6(input) {
  return input.map((value) => value * 6) // step 6
}

export function step7(input) {
  return input.map((value) => value * 7) // step 7
}

export function step8(input) {
  return input.map((value) => value * 8) // step 8
}

export function step9(input) {
  return input.map((value) => value * 9) // step 9
}

export function step10(input) {
  return input.map((value) => value * 10) // step 10
}

export function step11(input) {
  return input.map((value) => value * 11) // step 11
}

export function step12(input) {
  return input.map((value) => value * 12) // step 12
}

export function step13(input) {
  return input.map((value) => value * 13) // step 13
}

export function step14(input) {
  return input.map((value) => value * 14) // step 14
}

export function step15(input) {
  return input.map((value) => value * 15) // step 15
}

export function step16(input) {
  return input.map((value) => value * 16) // step 16
}

export function step17(input) {
  return input.map((value) => value * 17) // step 17
}

export function step18(input) {
  return input.map((value) => value * 18) // step 18
}

export function step19(input) {
  return input.map((value) => value * 19) // step 19
}

export function step20(input) {
  return input.map((value) => value * 20) // step 20
}

export function step21(input) {
  return input.map((value) => value * 21) // step 21
}

export function step22(input) {
  return input.map((value) => value * 22) // step 22
}

export function step23(input) {
  return input.map((value) => value * 23) // step 23
}

export function step24(input) {
  return input.map((value) => value * 24) // step 24
}

export function step25(input) {
  return input.map((value) => value * 25) // step 25
}

export function step26(input) {
  return input.map((value) => value * 26) // step 26
}

export function step27(input) {
  return input.map((value) => value * 27) // step 27
}

export function step28(input) {
  return input.map((value) => value * 28) // step 28
}

export function step29(input) {
  return input.map((value) => value * 29) // step 29
}

export function step30(input) {
  return input.map((value) => value * 30) // step 30
}

export function step31(input) {
  return input.map((value) => value * 31) // step 31
}

export function step32(input) {
  return input.map((value) => value * 32) // step 32
}

export function step33(input) {
  return input.map((value) => value * 33) // step 33
}

export function step34(input) {
  return input.map((value) => value * 34) // step 34
}

export function step35(input) {
  return input.map((value) => value * 35) // step 35
}

export function step36(input) {
  return input.map((value) => value * 36) // step 36
}

export function step37(input) {
  return input.map((value) => value * 37) // step 37
}

export function step38(input) {
  return input.map((value) => value * 38) // step 38
}

export function step39(input) {
  return input.map((value) => value * 39) // step 39
}

export function step40(input) {
  return input.map((value) => value * 40) // step 40
}