Skip to content

Commit

Permalink
big_number
Browse files Browse the repository at this point in the history
  • Loading branch information
lovasoa committed Aug 27, 2024
1 parent 3002faa commit 8133fea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ INSERT INTO component(name, icon, description, introduced_in_version) VALUES
-- Inserting parameter information for the big_number component
INSERT INTO parameter(component, name, description, type, top_level, optional) SELECT 'big_number', * FROM (VALUES
-- Top-level parameters (for the whole big_number list)
('columns', 'The number of columns to display the big numbers in (default is 4).', 'INTEGER', TRUE, TRUE),
('columns', 'The number of columns to display the big numbers in (default is one column per item).', 'INTEGER', TRUE, TRUE),
-- Item-level parameters (for each big number)
('title', 'The title or label for the big number.', 'TEXT', FALSE, TRUE),
('value', 'The main value to be displayed prominently.', 'TEXT', FALSE, FALSE),
Expand Down
5 changes: 4 additions & 1 deletion sqlpage/templates/big_number.handlebars
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 row-cols-lg-4 g-3 h-100">
<div class="row g-3 h-100
{{~#if columns}} row-cols-1 row-cols-sm-2 row-cols-md-{{columns~}}
{{~else}} row-cols-1 wrap {{/if~}}
">
{{#each_row}}
<div class="col d-flex">
<div class="card flex-fill {{#if color}}bg-{{color}}-lt{{/if}}">
Expand Down

0 comments on commit 8133fea

Please sign in to comment.