Skip to content

Commit 9052c15

Browse files
committed
improve the steps component
1 parent 949b0ac commit 9052c15

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

examples/corporate-conundrum/index.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ SELECT 'Continuing Gameplay' as title,
2222
'purple' as color;
2323

2424

25-
SELECT 'title' as component, 'Game rules' as contents;
2625
SELECT 'steps' as component,
2726
1 as counter,
28-
'cyan' as color;
27+
'cyan' as color,
28+
'Game rules' as title;
2929
SELECT 'Create game' as title,
3030
'plus' as icon,
3131
'Create a new game from the home page.' as description;

examples/official-site/sqlpage/migrations/01_documentation.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
101101
-- top level
102102
('color', 'Color of the bars displayed between steps.', 'TEXT', TRUE, TRUE),
103103
('counter', 'Display the number of the step on top of its name.', 'TEXT', TRUE, TRUE),
104+
('title', 'Title of the section.', 'TEXT', TRUE, TRUE),
105+
('description', 'Description of the section.', 'TEXT', TRUE, TRUE),
104106
-- item level
105107
('title', 'Name of the step.', 'TEXT', FALSE, TRUE),
106108
('description', 'Tooltip to display when the user passes their mouse over the step''s name.', 'TEXT', FALSE, TRUE),

sqlpage/templates/steps.handlebars

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
<div class="steps {{#if color}}steps-{{color}}{{/if}} {{#if counter}}steps-counter{{/if}}">
1+
{{#if title}}
2+
<h2 class="mt-3 mb-0">{{title}}</h2>
3+
{{/if}}
4+
{{#if description}}
5+
<p>{{description}}</p>
6+
{{/if}}
7+
<div class="steps {{#if color}}steps-{{color}}{{/if}} {{#if counter}}steps-counter{{/if}} my-2">
28
{{#each_row}}
39
{{#if link}}
410
<a href="{{link}}"

0 commit comments

Comments
 (0)