Skip to content

Commit e015b5d

Browse files
committed
Merge remote changes: Resolved conflict in 01_documentation.sql by keeping both local shell-empty docs and remote accordion component
2 parents 8329134 + 2a75acd commit e015b5d

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1571,4 +1571,16 @@ In this scenario, you can use the `html` property, which serves as an alias for
15711571
This property improves code readability by clearly indicating that you are generating HTML.
15721572
Since SQLPage returns HTML by default, there is no need to specify the content type in the HTTP header.
15731573
',
1574-
json('[{"component":"shell-empty", "html": "<!DOCTYPE html>\n<html>\n<head>\n <title>My page</title>\n</head>\n<body>\n <h1>My page</h1>\n</body>\n</html>"}]'));
1574+
json('[{"component":"shell-empty", "html": "<!DOCTYPE html>\n<html>\n<head>\n <title>My page</title>\n</head>\n<body>\n <h1>My page</h1>\n</body>\n</html>"}]'));
1575+
1576+
INSERT INTO component(name, icon, description) VALUES
1577+
('accordion', 'sort-ascending', 'An accordion based list of elements which can be shown individually.');
1578+
INSERT INTO parameter(component, name, description, type, top_level, optional) SELECT 'accordion', * FROM (VALUES
1579+
-- top level
1580+
('id', 'id attribute added to the container in HTML. It can be used to target this item through css or for scrolling to this item through links (use "#id" in link url).', 'TEXT', TRUE, TRUE),
1581+
-- item level
1582+
('title', 'Name of the list item, displayed prominently.', 'TEXT', FALSE, FALSE),
1583+
('contents_md', 'A description of the list item, displayed as greyed-out text.', 'TEXT', FALSE, FALSE)
1584+
) x;
1585+
INSERT INTO example(component, description, properties) VALUES
1586+
('accordion', 'A basic accordion with Markdown', json('[{"component":"accordion"},{"title":"Beautiful","contents_md": "Lorem *ipsum* dolor sit amet, **consectetur** adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam."},{"title":"Useful","contents_md": "Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis *ipsum*. Praesent **mauris**. Fusce nec tellus sed augue semper porta."},{"title":"Compact","contents_md": "Mauris **ipsum**. Nulla metus metus, ullamcorper vel, tincidunt sed, euismod in, *nibh*. Quisque volutpat condimentum velit."}]'));
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<div class="accordion" id="{{default accordion_id 'accordion_default'}}">
2+
{{#each_row}}
3+
<div class="accordion-item">
4+
<h2 class="accordion-header" id="heading-{{@row_index}}">
5+
<button class="accordion-button" type="button" data-bs-toggle="collapse"
6+
data-bs-target="#collapse-{{@row_index}}" aria-controls="collapse-{{@index}}">
7+
{{title}}
8+
</button>
9+
</h2>
10+
<div id="collapse-{{@row_index}}" class="accordion-collapse collapse {{#if (eq @row_index 0)}}show{{/if}}"
11+
aria-labelledby="heading-{{@row_index}}" data-bs-parent="#{{default accordion_id 'accordion_default'}}">
12+
<div class="accordion-body">
13+
{{{markdown contents_md}}}
14+
</div>
15+
</div>
16+
</div>
17+
{{/each_row}}
18+
</div>

0 commit comments

Comments
 (0)