You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/official-site/custom_components.sql
+4-4
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Each page in SQLPage is composed of a `shell` component,
16
16
which contains the page title and the navigation bar,
17
17
and a series of normal components that display the data.
18
18
19
-
The `shell` component is always present unless explicitly skipped via the `?_sqlpage_embed` query parameter.
19
+
The `shell` component is always present unless explicitly skipped via the `?_sqlpage_embed` query parameter.
20
20
If you don''t call it explicitly, it will be invoked with the default parameters automatically before your first component
21
21
invocation that tries to render data on the page.
22
22
@@ -88,7 +88,7 @@ For instance, you can easily create a multi-column layout with the following cod
88
88
</div>
89
89
```
90
90
91
-
For custom styling, you can write your own CSS files
91
+
For custom styling, you can write your own CSS files
92
92
and include them in your page header.
93
93
You can use the `css` parameter of the default [`shell`](./documentation.sql?component=shell#component) component,
94
94
or create your own custom `shell` component with a `<link>` tag.
@@ -132,7 +132,7 @@ and SQLPage adds a few more:
132
132
- `static_path`: returns the path to one of the static files bundled with SQLPage. Accepts arguments like `sqlpage.js`, `sqlpage.css`, `apexcharts.js`, etc.
133
133
- `app_config`: returns the value of a configuration parameter from sqlpage''s configuration file, such as `max_uploaded_file_size`, `site_prefix`, etc.
134
134
- `icon_img`: generate an svg icon from a *tabler* icon name
135
-
- `markdown`: renders markdown text
135
+
- `markdown`: renders markdown text. Accepts an optional 2nd argument `''allow_unsafe''` that will render embedded html blocks: use only on trusted content. See the [Commonmark spec](https://spec.commonmark.org/0.31.2/#html-blocks) for more info.
136
136
- `each_row`: iterates over the rows of a query result
137
137
- `typeof`: returns the type of a value (`string`, `number`, `boolean`, `object`, `array`, `null`)
138
138
- `rfc2822_date`: formats a date as a string in the [RFC 2822](https://tools.ietf.org/html/rfc2822#section-3.3) format, that is, `Thu, 21 Dec 2000 16:01:07 +0200`
@@ -178,7 +178,7 @@ Some interesting examples are:
- [The `card` component](https://github.com/sqlpage/SQLPage/blob/main/sqlpage/templates/card.handlebars): simple yet complete example of a component that displays a list of items.
181
-
- [The `table` component](https://github.com/sqlpage/SQLPage/blob/main/sqlpage/templates/table.handlebars): more complex example of a component that uses
181
+
- [The `table` component](https://github.com/sqlpage/SQLPage/blob/main/sqlpage/templates/table.handlebars): more complex example of a component that uses
182
182
- the `eq`, `or`, and `sort` handlebars helpers,
183
183
- the `../` syntax to access the parent context,
184
184
- and the `@key` to work with objects whose keys are not known in advance.
0 commit comments