// Part of the inventory program (see main.nika): the HTML page. use std::html // `title` is an option: it stands after the `;`, has a default, and a call // that wants another one names it: `render(entries, total; title: "Tools")`. pub fn render(entries: Vec[Entry], total: int; title: String = "Stock") -> String { return dsl html {
| Category | Item | Count |
|---|---|---|
| {e.category} | {e.item} | {e.count} |
{total} in total
} eod }