Skip to content

Commit 41f6fec

Browse files
committed
documentation
1 parent 3369e9a commit 41f6fec

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

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

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
3636
('description', 'A description of the list item, displayed as greyed-out text.', 'TEXT', FALSE, TRUE),
3737
('description_md', 'A description of the list item, displayed as greyed-out text, in Markdown format, allowing you to use rich text formatting, including **bold** and *italic* text.', 'TEXT', FALSE, TRUE),
3838
('link', 'An URL to which the user should be taken when they click on the list item.', 'URL', FALSE, TRUE),
39-
('icon', 'An icon name (from tabler-icons.io) to display on the left side of the item.', 'TEXT', FALSE, TRUE),
40-
('color', 'The name of a color, to be displayed as a dot near the list item contents.', 'TEXT', FALSE, TRUE),
39+
('icon', 'Name of an icon to display on the left side of the item.', 'ICON', FALSE, TRUE),
40+
('color', 'The name of a color, to be displayed as a dot near the list item contents.', 'COLOR', FALSE, TRUE),
4141
('active', 'Whether this item in the list is considered "active". Active items are displayed more prominently.', 'BOOLEAN', FALSE, TRUE)
4242
) x;
4343

@@ -75,8 +75,9 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
7575
('footer', 'Muted text to display at the bottom of the card.', 'TEXT', FALSE, TRUE),
7676
('footer_md', 'Muted text to display at the bottom of the card, with rich text formatting in Markdown format.', 'TEXT', FALSE, TRUE),
7777
('link', 'An URL to which the user should be taken when they click on the card.', 'URL', FALSE, TRUE),
78-
('icon', 'An icon name (from tabler-icons.io) to display on the left side of the card.', 'TEXT', FALSE, TRUE),
79-
('color', 'The name of a color, to be displayed on the left of the card to highlight it.', 'TEXT', FALSE, TRUE),
78+
('footer_link', 'An URL to which the user should be taken when they click on the footer.', 'URL', FALSE, TRUE),
79+
('icon', 'Name of an icon to display on the left side of the card.', 'ICON', FALSE, TRUE),
80+
('color', 'The name of a color, to be displayed on the left of the card to highlight it.', 'COLOR', FALSE, TRUE),
8081
('active', 'Whether this item in the grid is considered "active". Active items are displayed more prominently.', 'BOOLEAN', FALSE, TRUE)
8182
) x;
8283

@@ -88,8 +89,8 @@ INSERT INTO example(component, description, properties) VALUES
8889
'\n - **bold**, \n - *italics*, \n - [links](index.sql), \n - etc."}]')),
8990
('card', 'A beautiful card grid with bells and whistles.',
9091
json('[{"component":"card", "title":"Popular websites", "columns": 2}, '||
91-
'{"title":"Google", "link":"https://google.com", "description": "A search engine", "color": "red", "icon":"brand-google", "footer": "Owned by Alphabet Inc."}, '||
92-
'{"title":"Wikipedia", "link":"https://wikipedia.org", "description": "An encyclopedia", "color": "blue", "icon":"world", "active": true, "footer": "Owned by the Wikimedia Foundation"}]')),
92+
'{"title":"Google", "link":"https://google.com", "description": "A search engine", "color": "red", "icon":"brand-google", "footer": "Owned by Alphabet Inc.", "footer_link": "https://abc.xyz/" }, '||
93+
'{"title":"Wikipedia", "link":"https://wikipedia.org", "description": "An encyclopedia", "color": "blue", "icon":"world", "active": true, "footer": "Owned by the Wikimedia Foundation", "footer_link": "https://wikimediafoundation.org/"}]')),
9394
('card', 'A gallery of images.',
9495
json('[
9596
{"component":"card", "title":"My favorite animals in pictures"},
@@ -109,8 +110,8 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
109110
('description', 'Value to display below the name.', 'TEXT', FALSE, TRUE),
110111
('footer', 'Muted text to display below the value.', 'TEXT', FALSE, TRUE),
111112
('link', 'A target URL to which the user should be taken when they click on the value.', 'URL', FALSE, TRUE),
112-
('icon', 'An icon name (from tabler-icons.io) to display on the left side of the value.', 'TEXT', FALSE, TRUE),
113-
('color', 'If set to a color name, the value will be displayed in a pill of that color.', 'TEXT', FALSE, TRUE),
113+
('icon', 'An icon name (from tabler-icons.io) to display on the left side of the value.', 'ICON', FALSE, TRUE),
114+
('color', 'If set to a color name, the value will be displayed in a pill of that color.', 'COLOR', FALSE, TRUE),
114115
('active', 'Whether this item in the grid is considered "active". Active items are displayed more prominently.', 'BOOLEAN', FALSE, TRUE)
115116
) x;
116117

@@ -130,15 +131,15 @@ INSERT INTO component(name, icon, description) VALUES
130131
('steps', 'dots-circle-horizontal', 'Guide users through multi-stage processes, displaying a clear list of previous and future steps.');
131132
INSERT INTO parameter(component, name, description, type, top_level, optional) SELECT 'steps', * FROM (VALUES
132133
-- top level
133-
('color', 'Color of the bars displayed between steps.', 'TEXT', TRUE, TRUE),
134+
('color', 'Color of the bars displayed between steps.', 'COLOR', TRUE, TRUE),
134135
('counter', 'Display the number of the step on top of its name.', 'TEXT', TRUE, TRUE),
135136
('title', 'Title of the section.', 'TEXT', TRUE, TRUE),
136137
('description', 'Description of the section.', 'TEXT', TRUE, TRUE),
137138
-- item level
138139
('title', 'Name of the step.', 'TEXT', FALSE, TRUE),
139140
('description', 'Tooltip to display when the user passes their mouse over the step''s name.', 'TEXT', FALSE, TRUE),
140141
('link', 'A target URL to which the user should be taken when they click on the step.', 'URL', FALSE, TRUE),
141-
('icon', 'An icon name (from tabler-icons.io) to display on the left side of the step name.', 'TEXT', FALSE, TRUE),
142+
('icon', 'An icon name (from tabler-icons.io) to display on the left side of the step name.', 'ICON', FALSE, TRUE),
142143
('active', 'Whether this item in the grid is considered "active". Active items are displayed more prominently.', 'BOOLEAN', FALSE, TRUE)
143144
) x;
144145

@@ -166,7 +167,7 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
166167
-- item level
167168
('contents', 'A span of text to display', 'TEXT', FALSE, FALSE),
168169
('link', 'An URL to which the user should be taken when they click on this span of text.', 'URL', FALSE, TRUE),
169-
('color', 'The name of a color for this span of text.', 'TEXT', FALSE, TRUE),
170+
('color', 'The name of a color for this span of text.', 'COLOR', FALSE, TRUE),
170171
('underline', 'Whether the span of text should be underlined.', 'BOOLEAN', FALSE, TRUE),
171172
('bold', 'Whether the span of text should be displayed as bold.', 'BOOLEAN', FALSE, TRUE),
172173
('code', 'Use a monospace font. Useful to display the text as code.', 'BOOLEAN', FALSE, TRUE),
@@ -342,7 +343,7 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
342343
('xticks', 'Number of ticks on the x axis.', 'NUMBER', TRUE, TRUE),
343344
('marker', 'Marker size', 'NUMBER', TRUE, TRUE),
344345
('labels', 'Whether to show the data labels on the chart or not.', 'BOOLEAN', TRUE, TRUE),
345-
('color', 'The name of a color in which to display the chart. If there are multiple series in the chart, this parameter can be repeated multiple times.', 'TEXT', TRUE, TRUE),
346+
('color', 'The name of a color in which to display the chart. If there are multiple series in the chart, this parameter can be repeated multiple times.', 'COLOR', TRUE, TRUE),
346347
('stacked', 'Whether to cumulate values from different series.', 'BOOLEAN', TRUE, TRUE),
347348
('toolbar', 'Whether to display a toolbar at the top right of the chart, that offers downloading the data as CSV.', 'BOOLEAN', TRUE, TRUE),
348349
('logarithmic', 'Display the y-axis in logarithmic scale.', 'BOOLEAN', TRUE, TRUE),
@@ -443,8 +444,8 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
443444
('separator', 'How individual values should be separated in the CSV. "," by default, set it to "\t" for tab-separated values.', 'TEXT', TRUE, TRUE),
444445
('title', 'The text displayed on the download button.', 'TEXT', TRUE, FALSE),
445446
('filename', 'The name of the file that should be downloaded (without the extension).', 'TEXT', TRUE, TRUE),
446-
('icon', 'Name of the icon (from tabler-icons.io) to display in the button.', 'TEXT', TRUE, TRUE),
447-
('color', 'Color of the button', 'TEXT', TRUE, TRUE)
447+
('icon', 'Name of the icon (from tabler-icons.io) to display in the button.', 'ICON', TRUE, TRUE),
448+
('color', 'Color of the button', 'COLOR', TRUE, TRUE)
448449
) x;
449450

450451
INSERT INTO example(component, description, properties) VALUES
@@ -476,7 +477,7 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
476477
('css', 'The URL of a CSS file to load and apply to the page.', 'URL', TRUE, TRUE),
477478
('javascript', 'The URL of a Javascript file to load and execute on the page.', 'URL', TRUE, TRUE),
478479
('image', 'The URL of an image to display next to the page title.', 'URL', TRUE, TRUE),
479-
('icon', 'Name of an icon (from tabler-icons.io) to display next to the title in the navigation bar.', 'TEXT', TRUE, TRUE),
480+
('icon', 'Name of an icon (from tabler-icons.io) to display next to the title in the navigation bar.', 'ICON', TRUE, TRUE),
480481
('menu_item', 'Adds a menu item in the navigation bar at the top of the page. The menu item will have the specified name, and will link to as .sql file of the same name.', 'TEXT', TRUE, TRUE),
481482
('search_target', 'When this is set, a search field will appear in the top navigation bar, and load the specified sql file with an URL parameter named "search" when the user searches something.', 'TEXT', TRUE, TRUE),
482483
('norobot', 'Forbids robots to save this page in their database and follow the links on this page. This will prevent this page to appear in Google search results for any query, for instance.', 'BOOLEAN', TRUE, TRUE),

examples/official-site/sqlpage/migrations/18_button.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S
1212
('shape', 'Shape of the buttons (e.g., pill, square)', 'TEXT', TRUE, TRUE),
1313
-- Item-level parameters (for each button)
1414
('link', 'The URL to which the button should navigate when clicked.', 'URL', FALSE, TRUE),
15-
('color', 'The color of the button (e.g., red, green, blue, but also primary, warning, danger, orange, etc.).', 'TEXT', FALSE, TRUE),
15+
('color', 'The color of the button (e.g., red, green, blue, but also primary, warning, danger, orange, etc.).', 'COLOR', FALSE, TRUE),
1616
('title', 'The text displayed on the button.', 'TEXT', FALSE, TRUE),
1717
('disabled', 'Whether the button is disabled or not.', 'BOOLEAN', FALSE, TRUE),
18-
('outline', 'Outline color of the button (e.g. red, purple, ...)', 'TEXT', FALSE, TRUE),
18+
('outline', 'Outline color of the button (e.g. red, purple, ...)', 'COLOR', FALSE, TRUE),
1919
('space_after', 'Whether there should be extra space to the right of the button. In a line of buttons, this will put the buttons before this one on the left, and the ones after on the right.', 'BOOLEAN', FALSE, TRUE),
20-
('icon', 'An icon (from tabler-icons) to be displayed on the left side of the button.', 'TEXT', FALSE, TRUE)
20+
('icon', 'Name of an icon to be displayed on the left side of the button.', 'ICON', FALSE, TRUE)
2121
) x;
2222

2323
-- Inserting example information for the button component

0 commit comments

Comments
 (0)