Skip to content

Commit 8133fea

Browse files
committed
big_number
1 parent 3002faa commit 8133fea

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

examples/official-site/sqlpage/migrations/49_big_number.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ INSERT INTO component(name, icon, description, introduced_in_version) VALUES
77
-- Inserting parameter information for the big_number component
88
INSERT INTO parameter(component, name, description, type, top_level, optional) SELECT 'big_number', * FROM (VALUES
99
-- Top-level parameters (for the whole big_number list)
10-
('columns', 'The number of columns to display the big numbers in (default is 4).', 'INTEGER', TRUE, TRUE),
10+
('columns', 'The number of columns to display the big numbers in (default is one column per item).', 'INTEGER', TRUE, TRUE),
1111
-- Item-level parameters (for each big number)
1212
('title', 'The title or label for the big number.', 'TEXT', FALSE, TRUE),
1313
('value', 'The main value to be displayed prominently.', 'TEXT', FALSE, FALSE),

sqlpage/templates/big_number.handlebars

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-lg-4 g-3 h-100">
1+
<div class="row g-3 h-100
2+
{{~#if columns}} row-cols-1 row-cols-sm-2 row-cols-md-{{columns~}}
3+
{{~else}} row-cols-1 wrap {{/if~}}
4+
">
25
{{#each_row}}
36
<div class="col d-flex">
47
<div class="card flex-fill {{#if color}}bg-{{color}}-lt{{/if}}">

0 commit comments

Comments
 (0)