Macaw.Builtin.Feed (macaw v0.6.0)

Copy Markdown View Source

The built-in feed (spec/05 §6.6), "macaw.feed": time-ordered rows, newest first, of kind :content, :pure.

  • parameters: label (text, ""), its heading, none when empty; limit (a positive whole number, 20), the most items shown;
  • declarations: one slot, rows, with roles t (the window field), title (:text or :category), body (:text, optional) and level (:category, optional), whose schema's status gives an item's role; reading load :scan;
  • order and budget: the newest limit rows, newest first by t;
  • markup: an ordered list of items, each a <time>, the title, the body, and a level's words beside its role's color, so color is never the only cue. The newest limit are the whole answer, so they draw no capped notice unless the source cut them before they were ordered or says it stopped short. Handed a selection in its context (spec/03 §1.7.7), the item holding it is mw-selected with aria-current, every other mw-muted;
  • stylesheet: stylesheet/0, served at stylesheet_path/0, its content address.

Summary

Functions

The feed's one static stylesheet: the list, its items, and a rule per built-in status role, every color a theme custom property with the default theme's value as its fallback. It loads and imports nothing.

The stylesheet's path, its content address (Macaw.Component.Stylesheet.path/1).

Functions

stylesheet()

@spec stylesheet() :: String.t()

The feed's one static stylesheet: the list, its items, and a rule per built-in status role, every color a theme custom property with the default theme's value as its fallback. It loads and imports nothing.

stylesheet_path()

@spec stylesheet_path() :: String.t()

The stylesheet's path, its content address (Macaw.Component.Stylesheet.path/1).