@@ -39,7 +39,7 @@ FROM website;
39
39
```
40
40
41
41
<td >
42
-
42
+
43
43
![ SQLPage list component] ( ./docs/demo-list.png )
44
44
45
45
</tr >
@@ -49,9 +49,14 @@ FROM website;
49
49
``` sql
50
50
SELECT
51
51
' chart' as component,
52
- ' Quarterly Revenue' as title, ' area' as type;
53
- SELECT quarter AS x, SUM (revenue) AS y
54
- FROM finances GROUP BY quarter
52
+ ' Quarterly Revenue' as title,
53
+ ' area' as type;
54
+
55
+ SELECT
56
+ quarter AS x,
57
+ SUM (revenue) AS y
58
+ FROM finances
59
+ GROUP BY quarter
55
60
```
56
61
57
62
<td >
@@ -63,19 +68,54 @@ FROM finances GROUP BY quarter
63
68
<td >
64
69
65
70
``` sql
66
- SELECT ' form' as component, ' User' as title, ' Create new user' as validate;
67
- SELECT name, type, placeholder, required, description
71
+ SELECT
72
+ ' form' as component,
73
+ ' User' as title,
74
+ ' Create new user' as validate;
75
+
76
+ SELECT
77
+ name, type, placeholder,
78
+ required, description
68
79
FROM user_form;
69
80
70
81
INSERT INTO user (first_name, last_name, birth_date)
71
- SELECT ( $first_name, $last_name, $birth_date)
82
+ SELECT $first_name, $last_name, $birth_date
72
83
WHERE $first_name IS NOT NULL ;
73
84
```
74
85
75
86
<td >
76
87
77
88
![ SQLPage list component] ( ./docs/demo-form.png )
78
89
90
+ </tr >
91
+ <tr >
92
+ <td >
93
+
94
+ ``` sql
95
+ select ' tab' as component, true as center;
96
+ select ' Show all cards' as title,
97
+ ' ?' as link,
98
+ $tab is null as active;
99
+ select
100
+ format(' Show %s cards' , color) as title,
101
+ format(' ?tab=%s' , color) as link,
102
+ $tab= color as active
103
+ from tab_example_cards
104
+ group by color;
105
+
106
+
107
+ select ' card' as component;
108
+ select
109
+ title, description, color
110
+ image_url as top_image, link
111
+ from tab_example_cards
112
+ where $tab is null or $tab = color;
113
+ ```
114
+
115
+ <td >
116
+
117
+ ![ card component sql example] ( ./docs/cards.png )
118
+
79
119
</tr >
80
120
</tbody >
81
121
</table >
0 commit comments