Product applications
Dashboard
A finished page under Kiln. Copy it and it is yours outright: unlike a brickwork component or shell, it never upgrades under semver.
Skip to main content
Overview
How the last 30 days compare with the 30 before.
Headline figures
Revenue
£48,290
£43,120 prior 30 days
increased
12% up on last month
Invoices raised
317
increased
24 more than last month
Overdue
£3,140
decreased
8% down on last month
Revenue by week
Revenue by week
Show revenue by week
| Week | Revenue |
|---|---|
| W1 | £42,000 |
| W2 | £55,000 |
| W3 | £48,000 |
| W4 | £62,000 |
| W5 | £58,000 |
| W6 | £71,000 |
| W7 | £66,000 |
| W8 | £78,000 |
| W9 | £74,000 |
| W10 | £88,000 |
| W11 | £82,000 |
| W12 | £95,000 |
Activity
-
Dunmore Retail £3,150
-
Carrick & Sons £2,090
-
North Quay Ltd £1,475
-
Acme Corp £1,240
-
Halden Group £880
| When | Event | Amount |
|---|---|---|
| Today, 09:14 | Invoice INV-2422 paid | £1,475.00 |
| Yesterday | Invoice INV-2419 sent | £3,150.00 |
| 2 days ago | Credit note CN-118 | −£220.00 |
| 4 days ago | Invoice INV-2417 viewed | £1,240.00 |
| Last week | Invoice INV-2418 overdue | £880.00 |
Scroll inside the frame to inspect the full page.
{% extends "brickwork/shell/app.html" %}
{% comment %}
A dashboard: a weighted headline scorecard, the shape of the answer over
time, then activity that explains it.
COPY THIS FILE into your project and edit it. It is not on the template loader
path, so you cannot extend it (ADR-056).
What your view must supply:
headline_tiles weighted scorecard items (see below)
trend_mount / trend_data_table chart card mount + accessible table
top_accounts_rows ranked_list rows (label / amount / value)
activity_rows / activity_columns the recent-activity table data
nav_items / nav_active as in list.html
WHY THE SCORECARD IS WEIGHTED (icvoss/django-brickwork#512): a dashboard is an
argument, not a row of equal tiles. Equal tiles say every number matters the
same, which is never true. The scorecard's span= carries the ranking: the
metric this page exists to report gets span=2, supporting metrics take one
column. The ops analysis-dashboard example teaches the same shape in denser
form; this page is the simpler app Overview, with a server-rendered trend
SVG so the page still reads finished before a JS chart engine is wired.
_scorecard.html takes items as a list of {content, span} dicts whose content
is already-rendered safe markup, so the grid comes from the view (ADR-090).
States: the scorecard tiles' own trend states (see _stat.html /
_stat_comparison.html); the chart card's mount / data-table sibling
(CHT-012); the activity table's loading/empty/row-link states.
Accessibility: inherits shell/app.html's skip link, sidebar/drawer nav and
page-header region; every trend reading pairs a decorative glyph with
visually-hidden direction text, never colour alone. The trend SVG carries
an aria-label; the chart data table is a sibling of the mount. Covered by
the archetype harness's full gate sweep at every W0.1 breakpoint, both
themes.
Responsive: inherits shell/app.html's sidebar-to-drawer collapse at
--bw-breakpoint-md (48rem). The scorecard grid reflows via its own
column tokens; .bw-band-grid--2 stacks the ranked list and table.
{% endcomment %}
{% load brickwork_components brickwork_nav %}
{% block page_title %}Overview - Northwind{% endblock %}
{% block sidebar %}{% bw_nav nav_items nav_active %}{% endblock %}
{% block sidebar_mobile %}{% bw_nav nav_items nav_active %}{% endblock %}
{% block brand_wordmark %}Northwind{% endblock %}
{% block page_header %}
{% include "brickwork/components/_page_header.html" with title="Overview" description="How the last 30 days compare with the 30 before." %}
{% endblock %}
{% block page_actions %}
{% bw_button "Export" variant="secondary" icon="download" href="/reports/export/" %}
{% endblock %}
{% block content %}
<div class="bw-section-stack">
<section aria-labelledby="overview-headline-heading">
<h2 id="overview-headline-heading" class="bw-band-heading">Headline figures</h2>
{% include "brickwork/components/_scorecard.html" with items=headline_tiles %}
</section>
<section aria-labelledby="overview-trend-heading">
<h2 id="overview-trend-heading" class="bw-visually-hidden">Revenue by week</h2>
{% include "brickwork/components/_chart_card.html" with title="Revenue by week" mount=trend_mount data_table=trend_data_table %}
</section>
<section aria-labelledby="overview-activity-heading">
<h2 id="overview-activity-heading" class="bw-band-heading">Activity</h2>
<div class="bw-band-grid--2">
{% bw_ranked_list top_accounts_rows basis="total" label="Top accounts" empty_heading="No accounts yet" empty_body="Accounts with recent invoice activity will appear here." %}
{% include "brickwork/components/_data_table.html" with table_id="recent-activity" columns=activity_columns rows=activity_rows empty_heading="Nothing yet" empty_body="Activity across your account will show up here." %}
</div>
</section>
</div>
{% endblock %}
Details
| Kind | Page example |
|---|---|
| Used in | Product applications |
Composed from
| Template | Description |
|---|---|
brickwork/components/_button.html |
A button or link styled as a button, in several variants. |
brickwork/components/_chart_card.html |
The card chrome around a consumer's own charting engine: frame, legend, and loading, error and empty states. |
brickwork/components/_data_table.html |
A records or definition table, sortable, selectable, responsive. |
brickwork/components/_page_header.html |
A page's title, description, and action row. |
brickwork/components/_ranked_list.html |
An ordered top-N breakdown: label and value rows, each with a proportional bar. |
brickwork/components/_scorecard.html |
A responsive grid arranging several pre-rendered stat or chart cards. |
brickwork/nav/_nav.html |
Not a catalogue component |
brickwork/shell/app.html |
The authenticated app shell: sidebar, topbar, and content region. |