Expand description
Layout blocks: Cards, Slider and Gallery, each a list of
items an editor adds one by one (BlockField::Repeat over an item
block: card, slide, gallery_image).
The templates (blocks/<type>.html) emit plain markup with
rcms-block-* classes and no styles, so a site’s own stylesheet lays
them out; the starter themes style all three. A slider works without
JavaScript (it scrolls sideways with snap points); a theme may add
previous/next buttons on top.
Item links go through the safe_href filter (safe_href), so an
editor’s link can be a site path or a web, mail or phone address,
never javascript: or another scheme.
Structs§
- Card
Block - One card of a Cards block.
- Cards
Block cards: a grid of cards, each with an image, a title, text and a link.- Gallery
Block gallery: any number of pictures in a grid; each opens full size.- Gallery
Image Block - One picture of a Gallery block.
- Slide
Block - One slide of a Slider block.
- Slider
Block slider: slides that scroll sideways, one at a time or several in a row.
Functions§
- safe_
href - A link fit for an
href: a site path (/about, not//host), a fragment, or anhttp(s),mailtoorteladdress. Anything else (javascript:,data:, a bare word) isNone.