{% comment %} STATS / card row: the same three numbers, given cards of their own. WHEN TO USE THIS INSTEAD OF THE INLINE BAND. On a page with no other card content, where the numbers are the section rather than an aside inside it. Cards give each number an edge and a surface, which makes three of them read as a deliberate block. Drop this onto a page that already has a feature grid or a pricing table and you have two competing rows of cards; use the band there. WHY THIS OWNS ITS MARKUP, AND WHY IT DOES NOT INCLUDE _stat.html. _stat_band.html takes a list of dicts, so it needs a view. The tiles it composes each take flat strings, so a template CAN include brickwork/components/_stat.html once per stat without any context, and that is a perfectly good thing to do. This example goes one step further and writes the three cards out by hand, for one reason: it is the version you can copy, paste and then edit freely, including the card chrome. If you want the shipped tile treatment instead (tabular numerals, the trend glyph, the visually hidden direction text), include _stat.html three times rather than copying this. WHAT YOUR VIEW MUST SUPPLY: nothing. The numbers are typed in. Replace them with yours, and keep them honest: a made-up number on a marketing page is a claim you will be asked about. EVERY NUMBER NEEDS A LABEL THAT SAYS WHAT IT MEASURES. "94%" on its own is noise. "94% of invoices paid without a phone call" is an argument. The value is the headline and the label is the sentence it belongs to, so write the label first and check the number still answers it. Headings: this is a stacked section, so the section heading is an
, not a heading. Three
21 days
Average time to pay, across every open account
Down from 38 before Northwind
£1.4m
Chased and collected in the last quarter
Across 2,100 invoices
94%
Invoices paid without anyone making a phone call
The rest get flagged a fortnight early