@@ -24,11 +24,18 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
24
24
(' footer_link' , ' An URL to which the user should be taken when they click on the footer.' , ' URL' , FALSE, TRUE),
25
25
(' icon' , ' Name of an icon to display on the left side of the card.' , ' ICON' , FALSE, TRUE),
26
26
(' color' , ' The name of a color, to be displayed on the left of the card to highlight it.' , ' COLOR' , FALSE, TRUE),
27
- (' active' , ' Whether this item in the grid is considered "active". Active items are displayed more prominently.' , ' BOOLEAN' , FALSE, TRUE),
27
+ (' active' , ' Whether this item in the grid is considered "active". Active items are displayed more prominently.' , ' BOOLEAN' , FALSE, TRUE)
28
+ ) x;
29
+ INSERT INTO parameter(component, name, description_md, type, top_level, optional) SELECT ' card' , * FROM (VALUES
28
30
(' embed' , ' A url whose contents will be fetched and injected into the body of this card.
29
31
This can be used to inject arbitrary html content, but is especially useful for injecting
30
32
the output of other sql files rendered by SQLPage. For the latter case you can pass the
31
- `?_sqlpage_embed` query parameter, which will skip the shell layout' , ' TEXT' , FALSE, TRUE)
33
+ `?_sqlpage_embed` query parameter, which will skip the shell layout' , ' TEXT' , FALSE, TRUE),
34
+ (' embed_mode' , ' Set to ' ' iframe' ' to embed the target (specified through embed property) in an iframe.
35
+ Unless this is explicitly set, the embed target is fetched and injected within the parent page. If embed_mode is set to iframe,
36
+ You can also set height and width parameters to configure the appearance and the sandbox and allow parameters to configure
37
+ security aspects of the iframe. Refer to the [MDN page](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe)
38
+ for an explanation of these parameters.' , ' TEXT' , FALSE, TRUE)
32
39
) x;
33
40
34
41
INSERT INTO example(component, description, properties) VALUES
@@ -52,6 +59,6 @@ INSERT INTO example(component, description, properties) VALUES
52
59
(' card' , ' Cards with remote content' ,
53
60
json(' [
54
61
{"component":"card", "title":"Card with embedded remote content", "columns": 2},
55
- {"title": "Embedded Chart", "embed": "/examples/chart.sql?_sqlpage_embed" },
56
- {"title": "Description ", "description_md ": "You can find the sql file that generates the chart [here](https://github.com/lovasoa/SQLpage/tree/main/examples/official-site/examples/chart.sql) " }
57
- ]' ));
62
+ {"title": "Embedded Chart", "embed": "/examples/chart.sql?_sqlpage_embed", "footer_md": "You can find the sql file that generates the chart [here](https://github.com/lovasoa/SQLpage/tree/main/examples/official-site/examples/chart.sql)" },
63
+ {"title": "Embedded Video ", "embed ": "https://www.youtube.com/embed/mXdgmSdaXkg", "allow": "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share", "embed_mode": "iframe", "height": "350 " }
64
+ ]' ));
0 commit comments