diff --git a/examples/official-site/content/components/shell.md b/examples/official-site/content/components/shell.md
new file mode 100644
index 000000000..f0032aa4b
--- /dev/null
+++ b/examples/official-site/content/components/shell.md
@@ -0,0 +1,150 @@
+---
+icon: layout-navbar
+category: page-layout
+summary: Set the page layout, navigation, branding, and footer.
+top:
+ - name: class
+ type: TEXT
+ description: class attribute added to the page's html element. It can be used to apply custom styling to
+ the whole page through css.
+ - name: css
+ type: URL
+ description: The URL of a CSS file to load and apply to the page.
+ - name: description
+ type: TEXT
+ description: A description of the page. It can be displayed by search engines when your page appears in
+ their results.
+ - name: favicon
+ type: URL
+ description: The URL of the icon the web browser should display in bookmarks and tabs. This property is
+ particularly useful if multiple sites are hosted on the same domain with different [``site_prefix``](https://github.com/sqlpage/SQLPage/blob/main/configuration.md#configuring-sqlpage).
+ - name: fixed_top_menu
+ type: BOOLEAN
+ description: Fixes the top bar with menu at the top (the top bar remains visible when scrolling long pages).
+ - name: font
+ type: TEXT
+ description: Specifies the font to be used for displaying text, which can be a valid font name from fonts.google.com
+ or the path to a local WOFF2 font file starting with a slash (e.g., "/fonts/MyLocalFont.woff2").
+ - name: font_size
+ type: INTEGER
+ description: Font size on the page, in pixels. Set to 18 by default.
+ - name: footer
+ type: TEXT
+ description: Muted text to display in the footer of the page. This can be used to display a link to the
+ terms and conditions of your application, for instance. By default, shows "Built with SQLPage". Supports
+ links with markdown.
+ - name: icon
+ type: ICON
+ description: Name of an icon (from tabler-icons.io) to display next to the title in the navigation bar.
+ - name: image
+ type: URL
+ description: The URL of an image to display next to the page title.
+ - name: javascript
+ type: URL
+ description: The URL of a Javascript file to load and execute on the page.
+ - name: javascript_module
+ type: URL
+ description: The URL of a javascript module in the ESM format (see javascript.info/modules)
+ - name: language
+ type: TEXT
+ description: The language of the page. This can be used by search engines and screen readers to determine
+ in which language the page is written.
+ - name: layout
+ type: TEXT
+ description: The general page layout. Can be "boxed" (the default), "horizontal" (for a full-width menu),
+ "vertical"(vertical menu), "fluid" (removes side margins).
+ - name: link
+ type: URL
+ description: The target of the link in the top navigation bar.
+ - name: manifest
+ type: URL
+ description: The location of the [manifest.json](https://developer.mozilla.org/en-US/docs/Web/Manifest)
+ if the site is a [PWA](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps). Among other
+ features, serving a manifest enables your site to be "installed" as an app on most mobile devices.
+ - name: menu_item
+ type: TEXT
+ description: 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. A dropdown can be generated by passing
+ a json object with a `title` and `submenu` properties.
+ - name: navbar_title
+ type: TEXT
+ description: The title shown in the navigation bar or sidebar. Defaults to the page title. Set an empty
+ string to show just the logo.
+ - name: navbar_toggle_label
+ type: TEXT
+ description: Customizes the accessible name of the button that opens and closes the navigation menu on small
+ screens, which screen readers announce. Replaces the default "Toggle navigation".
+ - name: norobot
+ type: BOOLEAN
+ description: 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.
+ - name: preview_image
+ type: URL
+ description: The URL of an image to display as a link preview when the page is shared on social media
+ - name: refresh
+ type: INTEGER
+ description: Number of seconds after which the page should refresh. This can be useful to display dynamic
+ content that updates automatically.
+ - name: rss
+ type: URL
+ description: The URL of an RSS feed to display in the top navigation bar. You can use the rss component
+ to generate the field.
+ - name: rtl
+ type: BOOLEAN
+ description: Whether the page should be displayed in right-to-left mode. Used to display Arabic, Hebrew,
+ Persian, etc.
+ - name: search_button
+ type: TEXT
+ description: Customizes the text displayed on the search button. Replaces the default "Search" label with
+ custom text that may better match your applications terminology or language.
+ - name: search_placeholder
+ type: TEXT
+ description: Customizes the placeholder text shown in the search input field. Replaces the default "Search"
+ with text that better describes what users should search for. It is also used as the accessible name
+ of the search field, which screen readers announce.
+ - name: search_target
+ type: TEXT
+ description: 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.
+ - name: search_value
+ type: TEXT
+ description: This value will be placed in the search field when "search_target" is set. Using the "$search"
+ query parameter value will mirror the value that the user has searched for.
+ - name: sidebar
+ type: BOOLEAN
+ description: Whether the menu defined by menu_item should be displayed on the left side of the page instead
+ of the top. Introduced in v0.27.
+ - name: sidebar_theme
+ type: TEXT
+ description: Used with sidebar property, It can be set to "dark" to exclusively set the sidebar into dark
+ theme.
+ - name: social_image
+ type: URL
+ description: The URL of the preview image that will appear in the Open Graph metadata when the page is
+ shared on social media.
+ - name: target
+ type: TEXT
+ description: 'Where the menu items should open: "_blank" for a new tab, "_self" for the same tab, "_parent"
+ for the parent frame, or "_top" for the full body of the window. Set it inside a "menu_item" json object;
+ it has no effect when set directly on the shell.'
+ - name: theme
+ type: TEXT
+ description: Set to "dark" to use a dark theme.
+ - name: title
+ type: TEXT
+ description: The title of your page. Will be shown in a top bar above the page contents. Also usually displayed
+ by web browsers as the name of the web page's tab.
+---
+
+Customize the overall layout, header and footer of the page.
+
+This is a special component that provides the page structure wrapping all other components on your page.
+
+It generates the complete HTML document including the `
` section with metadata, title, and stylesheets,
+as well as the navigation bar, main content area, and footer.
+
+If you don't explicitly call the shell component at the top of your SQL file, SQLPage will automatically
+add a default shell component before your first try to display data on the page.
+
+Use the shell component to customize page-wide settings like the page title, navigation menu, theme, fonts,
+and to include custom visual styles (with CSS) or interactive behavior (with JavaScript) that should be loaded on the page.
diff --git a/examples/official-site/content/components/shell/examples/01-dark-navigation.md b/examples/official-site/content/components/shell/examples/01-dark-navigation.md
new file mode 100644
index 000000000..26ffed2d0
--- /dev/null
+++ b/examples/official-site/content/components/shell/examples/01-dark-navigation.md
@@ -0,0 +1,99 @@
+---
+rows:
+ - component: shell
+ title: 'SQLPage: SQL websites'
+ navbar_title: SQLPage
+ link: /
+ menu_item:
+ - title: About
+ submenu:
+ - link: /safety.sql
+ title: Security
+ icon: lock
+ - link: /performance.sql
+ title: Performance
+ icon: bolt
+ - link: //github.com/sqlpage/SQLPage/blob/main/LICENSE.txt
+ title: License
+ icon: file-text
+ - link: /blog.sql
+ title: Articles
+ icon: book
+ - title: Examples
+ submenu:
+ - link: /examples/tabs/
+ title: Tabs
+ icon: layout-navbar
+ - link: /examples/layouts.sql
+ title: Layouts
+ icon: layout
+ - link: /examples/multistep-form
+ title: Forms
+ icon: edit
+ - link: /examples/handle_picture_upload.sql
+ title: File uploads
+ icon: upload
+ - link: /examples/authentication/
+ title: Password protection
+ icon: password-user
+ - link: //github.com/sqlpage/SQLPage/blob/main/examples/
+ title: All examples & demos
+ icon: code
+ - title: Community
+ submenu:
+ - link: /blog.sql
+ title: Blog
+ icon: book
+ - link: //github.com/sqlpage/SQLPage/issues
+ title: Report a bug
+ icon: bug
+ - link: //github.com/sqlpage/SQLPage/discussions
+ title: Discussions
+ icon: message
+ - link: //github.com/sqlpage/SQLPage
+ title: Github
+ icon: brand-github
+ - title: Documentation
+ submenu:
+ - link: /your-first-sql-website
+ title: Getting started
+ icon: book
+ - link: /components.sql
+ title: All Components
+ icon: list-details
+ - link: /functions.sql
+ title: SQLPage Functions
+ icon: math-function
+ - link: /extensions-to-sql
+ title: Extensions to SQL
+ icon: cube-plus
+ - link: /custom_components.sql
+ title: Custom Components
+ icon: puzzle
+ - link: //github.com/sqlpage/SQLPage/blob/main/configuration.md#configuring-sqlpage
+ title: Configuration
+ icon: settings
+ - title: Search
+ link: /search
+ layout: boxed
+ language: en-US
+ description: Go from SQL queries to web applications in an instant.
+ preview_image: https://sql-page.com/sqlpage_social_preview.webp
+ theme: dark
+ font_size: 19
+ image: /assets/icon.webp
+ favicon: /favicon.ico
+ javascript_module: /assets/highlightjs-launch.js
+ css: /assets/highlightjs-and-tabler-theme.css
+ footer: '[Built with SQLPage](https://github.com/sqlpage/SQLPage/tree/main/examples/official-site)'
+---
+
+This example configures a dark shell with menus linking to pages on this site.
+
+Each `menu_item` object defines a link or a dropdown. The "Community" menu links to the blog, issue tracker, discussions, and source code.
+
+The object form can be used directly only on database engines that have a native JSON type.
+On other engines (such as SQLite), you can use the [`dynamic`](?component=dynamic#component) component to generate the same result.
+
+
+You see the [page layouts demo](./examples/layouts.sql) for a live example of the different layouts.
diff --git a/examples/official-site/content/components/shell/examples/02-active-menu.md b/examples/official-site/content/components/shell/examples/02-active-menu.md
new file mode 100644
index 000000000..9da9f86b7
--- /dev/null
+++ b/examples/official-site/content/components/shell/examples/02-active-menu.md
@@ -0,0 +1,15 @@
+---
+rows:
+ - component: shell
+ title: 'SQLPage: SQL websites'
+ icon: database
+ link: /
+ menu_item:
+ - title: Home
+ active: true
+ - title: About
+---
+
+This example shows how to set menu items as active in the navigation, so that they are highlighted in the nav bar.
+
+In this example you can see that two menu items are created, "Home" and "About" and the "Home" tab is marked as active.
diff --git a/examples/official-site/content/components/shell/examples/03-shared-shell.md b/examples/official-site/content/components/shell/examples/03-shared-shell.md
new file mode 100644
index 000000000..a7a3b1358
--- /dev/null
+++ b/examples/official-site/content/components/shell/examples/03-shared-shell.md
@@ -0,0 +1,107 @@
+### Sharing the shell between multiple pages
+
+It is common to want to share the same shell between multiple pages.
+
+#### Static menu
+
+If your menu is completely static (it does not depend on the database content),
+you can use the [`dynamic`](?component=dynamic#component) component together with the
+[`sqlpage.read_file_as_text`](functions.sql?function=read_file_as_text#function) function to load the shell from
+a json file.
+
+```sql
+SELECT 'dynamic' AS component, sqlpage.read_file_as_text('shell.json') AS properties;
+```
+
+and in `shell.json`:
+
+```json
+{
+ "component": "shell",
+ "title": "SQL + JSON = <3",
+ "link": "/",
+ "menu_item": [
+ {"link": "index.sql", "title": "Home"},
+ {"title": "Community", "submenu": [
+ {"link": "/blog.sql", "title": "Blog"},
+ {"link": "//github.com/sqlpage/SQLPage", "title": "Github"}
+ ]}
+ ]
+}
+```
+
+#### Dynamic menu
+
+If your menu depends on the database content, or on special `sqlpage` functions,
+you can use the `dynamic` component,
+but this time with the [`sqlpage.run_sql`](functions.sql?function=run_sql#function)
+function to generate the menu from the database.
+
+```sql
+SELECT 'dynamic' AS component, sqlpage.run_sql('shell.sql') AS properties;
+```
+
+and in `shell.sql`:
+
+```sql
+SELECT 'shell' AS component, 'run_sql is cool' as title,
+ json_group_array(json_object(
+ 'link', link,
+ 'title', title
+ )) as menu_item
+FROM my_menu_items
+```
+
+(check your database documentation for the exact syntax of the `json_group_array` function).
+
+Another case when dynamic menus are useful is when you want to show some
+menu items only in certain conditions.
+
+For instance, you could show an "Admin panel" menu item only to users with the "admin" role,
+a "Profile" menu item only to authenticated users,
+and a "Login" menu item only to unauthenticated users:
+
+```sql
+set role = (
+ SELECT role FROM users
+ INNER JOIN sessions ON users.id = sessions.user_id
+ WHERE sessions.session_id = sqlpage.cookie('session_id')
+); -- Read more about how to handle user sessions in the "authentication" component documentation
+
+SELECT
+ 'shell' AS component,
+ 'My authenticated website' AS title,
+
+ -- Add an admin panel link if the user is an admin
+ CASE WHEN $role = 'admin' THEN '{"link": "admin.sql", "title": "Admin panel"}' END AS menu_item,
+
+ -- Add a profile page if the user is authenticated
+ CASE WHEN $role IS NOT NULL THEN '{"link": "profile.sql", "title": "My profile"}' END AS menu_item,
+
+ -- Add a login link if the user is not authenticated
+ CASE WHEN $role IS NULL THEN 'login' END AS menu_item
+;
+```
+
+More about how to handle user sessions in the [authentication component documentation](?component=authentication#component).
+
+### Menu with icons
+
+The "icon" attribute may be specified for items in the top menu and submenus to display an icon
+before the title (or instead). Similarly, the "image" attribute defines a file-based icon. For
+image-based icons, the "size" attribute may be specified at the top level of menu_item only to
+reduce the size of image-based icons. The following snippet provides an example, which is also
+available [here](examples/menu_icon.sql).
+
+```sql
+SELECT
+ 'shell' AS component,
+ 'SQLPage' AS title,
+ 'database' AS icon,
+ '/' AS link,
+ TRUE AS fixed_top_menu,
+ '{"title":"About","icon": "settings","submenu":[{"link":"/safety.sql","title":"Security","icon": "logout"},{"link":"/performance.sql","title":"Performance"}]}' AS menu_item,
+ '{"title":"Examples","image": "https://upload.wikimedia.org/wikipedia/en/6/6b/Terrestrial_globe.svg","submenu":[{"link":"/examples/tabs/","title":"Tabs","image": "https://upload.wikimedia.org/wikipedia/en/6/6b/Terrestrial_globe.svg"},{"link":"/examples/layouts.sql","title":"Layouts"}]}' AS menu_item,
+ '{"title":"Examples","size":"sm","image": "https://upload.wikimedia.org/wikipedia/en/6/6b/Terrestrial_globe.svg","submenu":[{"link":"/examples/tabs/","title":"Tabs","image": "https://upload.wikimedia.org/wikipedia/en/6/6b/Terrestrial_globe.svg"},{"link":"/examples/layouts.sql","title":"Layouts"}]}' AS menu_item,
+ 'Official [SQLPage](https://sql-page.com) documentation' as footer;
+```
diff --git a/examples/official-site/content/components/shell/examples/04-custom-response.md b/examples/official-site/content/components/shell/examples/04-custom-response.md
new file mode 100644
index 000000000..2027c4c16
--- /dev/null
+++ b/examples/official-site/content/components/shell/examples/04-custom-response.md
@@ -0,0 +1,27 @@
+---
+rows:
+ - component: http_header
+ Content-Type: application/xml
+ - component: shell-empty
+ contents: |-
+
+
+ 42
+ john.doe
+
+---
+
+### Returning custom HTML, XML, plain text, or other formats
+
+Use `shell-empty` to opt out of SQLPage's component system and return raw data directly.
+
+By default, SQLPage wraps all your content in a complete HTML page with navigation and styling.
+The `shell-empty` component tells SQLPage to skip this HTML wrapper and return only the raw content you specify.
+
+Use it to create endpoints that return things like
+ - XML (for JSON, use the [json](?component=json) component)
+ - plain text or markdown content (for instance for consumption by LLMs)
+ - a custom data format you need
+
+When using `shell-empty`, you should use the [http_header](component.sql?component=http%5Fheader) component first
+to set the correct [content type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type) (like `application/json` or `application/xml`).
diff --git a/examples/official-site/content/components/shell/examples/05-custom-html.md b/examples/official-site/content/components/shell/examples/05-custom-html.md
new file mode 100644
index 000000000..0ade399d2
--- /dev/null
+++ b/examples/official-site/content/components/shell/examples/05-custom-html.md
@@ -0,0 +1,24 @@
+---
+rows:
+ - component: shell-empty
+ html: |-
+
+
+
+ My page
+
+
+ My page
+
+
+---
+
+### Generate your own HTML
+If you generate your own HTML from a SQL query, you can also use the `shell-empty` component to include it in a page.
+This is useful when you want to generate a snippet of HTML that can be dynamically included in a larger page.
+Make sure you know what you are doing, and be careful to escape the HTML properly,
+as you are stepping out of the safe SQLPage framework and into the wild world of HTML.
+
+In this scenario, you can use the `html` property, which serves as an alias for the `contents` property.
+This property improves code readability by clearly indicating that you are generating HTML.
+Since SQLPage returns HTML by default, there is no need to specify the content type in the HTTP header.
diff --git a/examples/official-site/sqlpage/migrations/01_documentation.sql b/examples/official-site/sqlpage/migrations/01_documentation.sql
index 19fee43d5..b4e9aec4b 100644
--- a/examples/official-site/sqlpage/migrations/01_documentation.sql
+++ b/examples/official-site/sqlpage/migrations/01_documentation.sql
@@ -980,284 +980,3 @@ FROM users
GROUP BY name;
```
', NULL);
-
-INSERT INTO component(name, icon, description) VALUES
- ('shell', 'layout-navbar', '
-Customize the overall layout, header and footer of the page.
-
-This is a special component that provides the page structure wrapping all other components on your page.
-
-It generates the complete HTML document including the `` section with metadata, title, and stylesheets,
-as well as the navigation bar, main content area, and footer.
-
-If you don''t explicitly call the shell component at the top of your SQL file, SQLPage will automatically
-add a default shell component before your first try to display data on the page.
-
-Use the shell component to customize page-wide settings like the page title, navigation menu, theme, fonts,
-and to include custom visual styles (with CSS) or interactive behavior (with JavaScript) that should be loaded on the page.
-');
-
-INSERT INTO parameter(component, name, description_md, type, top_level, optional) SELECT 'shell', * FROM (VALUES
- ('favicon', 'The URL of the icon the web browser should display in bookmarks and tabs. This property is particularly useful if multiple sites are hosted on the same domain with different [``site_prefix``](https://github.com/sqlpage/SQLPage/blob/main/configuration.md#configuring-sqlpage).', 'URL', TRUE, TRUE),
- ('manifest', 'The location of the [manifest.json](https://developer.mozilla.org/en-US/docs/Web/Manifest) if the site is a [PWA](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps). Among other features, serving a manifest enables your site to be "installed" as an app on most mobile devices.', 'URL', TRUE, TRUE)
-) x;
-INSERT INTO parameter(component, name, description, type, top_level, optional) SELECT 'shell', * FROM (VALUES
- -- top level
- ('title', 'The title of your page. Will be shown in a top bar above the page contents. Also usually displayed by web browsers as the name of the web page''s tab.', 'TEXT', TRUE, TRUE),
- ('layout', 'The general page layout. Can be "boxed" (the default), "horizontal" (for a full-width menu), "vertical"(vertical menu), "fluid" (removes side margins).', 'TEXT', TRUE, TRUE),
- ('description', 'A description of the page. It can be displayed by search engines when your page appears in their results.', 'TEXT', TRUE, TRUE),
- ('link', 'The target of the link in the top navigation bar.', 'URL', TRUE, TRUE),
- ('css', 'The URL of a CSS file to load and apply to the page.', 'URL', TRUE, TRUE),
- ('javascript', 'The URL of a Javascript file to load and execute on the page.', 'URL', TRUE, TRUE),
- ('javascript_module', 'The URL of a javascript module in the ESM format (see javascript.info/modules)', 'URL', TRUE, TRUE),
- ('rss', 'The URL of an RSS feed to display in the top navigation bar. You can use the rss component to generate the field.', 'URL', TRUE, TRUE),
- ('image', 'The URL of an image to display next to the page title.', 'URL', TRUE, TRUE),
- ('social_image', 'The URL of the preview image that will appear in the Open Graph metadata when the page is shared on social media.', 'URL', TRUE, TRUE),
- ('icon', 'Name of an icon (from tabler-icons.io) to display next to the title in the navigation bar.', 'ICON', TRUE, TRUE),
- ('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. A dropdown can be generated by passing a json object with a `title` and `submenu` properties.', 'TEXT', TRUE, TRUE),
- ('fixed_top_menu', 'Fixes the top bar with menu at the top (the top bar remains visible when scrolling long pages).', 'BOOLEAN', TRUE, TRUE),
- ('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),
- ('search_value', 'This value will be placed in the search field when "search_target" is set. Using the "$search" query parameter value will mirror the value that the user has searched for.', 'TEXT', TRUE, TRUE),
- ('search_placeholder', 'Customizes the placeholder text shown in the search input field. Replaces the default "Search" with text that better describes what users should search for. It is also used as the accessible name of the search field, which screen readers announce.', 'TEXT', TRUE, TRUE),
- ('search_button', 'Customizes the text displayed on the search button. Replaces the default "Search" label with custom text that may better match your applications terminology or language.', 'TEXT', TRUE, TRUE),
- ('navbar_toggle_label', 'Customizes the accessible name of the button that opens and closes the navigation menu on small screens, which screen readers announce. Replaces the default "Toggle navigation".', 'TEXT', TRUE, TRUE),
- ('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),
- ('font', 'Specifies the font to be used for displaying text, which can be a valid font name from fonts.google.com or the path to a local WOFF2 font file starting with a slash (e.g., "/fonts/MyLocalFont.woff2").', 'TEXT', TRUE, TRUE),
- ('font_size', 'Font size on the page, in pixels. Set to 18 by default.', 'INTEGER', TRUE, TRUE),
- ('language', 'The language of the page. This can be used by search engines and screen readers to determine in which language the page is written.', 'TEXT', TRUE, TRUE),
- ('rtl', 'Whether the page should be displayed in right-to-left mode. Used to display Arabic, Hebrew, Persian, etc.', 'BOOLEAN', TRUE, TRUE),
- ('refresh', 'Number of seconds after which the page should refresh. This can be useful to display dynamic content that updates automatically.', 'INTEGER', TRUE, TRUE),
- ('sidebar', 'Whether the menu defined by menu_item should be displayed on the left side of the page instead of the top. Introduced in v0.27.', 'BOOLEAN', TRUE, TRUE),
- ('sidebar_theme', 'Used with sidebar property, It can be set to "dark" to exclusively set the sidebar into dark theme.', 'TEXT', TRUE, TRUE),
- ('theme', 'Set to "dark" to use a dark theme.', 'TEXT', TRUE, TRUE),
- ('footer', 'Muted text to display in the footer of the page. This can be used to display a link to the terms and conditions of your application, for instance. By default, shows "Built with SQLPage". Supports links with markdown.', 'TEXT', TRUE, TRUE),
- ('preview_image', 'The URL of an image to display as a link preview when the page is shared on social media', 'URL', TRUE, TRUE),
- ('navbar_title', 'The title shown in the navigation bar or sidebar. Defaults to the page title. Set an empty string to show just the logo.', 'TEXT', TRUE, TRUE),
- ('target', 'Where the menu items should open: "_blank" for a new tab, "_self" for the same tab, "_parent" for the parent frame, or "_top" for the full body of the window. Set it inside a "menu_item" json object; it has no effect when set directly on the shell.', 'TEXT', TRUE, TRUE),
- ('class', 'class attribute added to the page''s html element. It can be used to apply custom styling to the whole page through css.', 'TEXT', TRUE, TRUE)
-) x;
-
-INSERT INTO example(component, description, properties) VALUES
- ('shell', '
-This example configures a dark shell with menus linking to pages on this site.
-
-Each `menu_item` object defines a link or a dropdown. The "Community" menu links to the blog, issue tracker, discussions, and source code.
-
-The object form can be used directly only on database engines that have a native JSON type.
-On other engines (such as SQLite), you can use the [`dynamic`](?component=dynamic#component) component to generate the same result.
-
-
-You see the [page layouts demo](./examples/layouts.sql) for a live example of the different layouts.
-',
- json('[{
- "component": "shell",
- "title": "SQLPage: SQL websites",
- "navbar_title": "SQLPage",
- "link": "/",
- "menu_item": [
- {"title": "About", "submenu": [
- {"link": "/safety.sql", "title": "Security", "icon": "lock"},
- {"link": "/performance.sql", "title": "Performance", "icon": "bolt"},
- {"link": "//github.com/sqlpage/SQLPage/blob/main/LICENSE.txt", "title": "License", "icon": "file-text"},
- {"link": "/blog.sql", "title": "Articles", "icon": "book"}
- ]},
- {"title": "Examples", "submenu": [
- {"link": "/examples/tabs/", "title": "Tabs", "icon": "layout-navbar"},
- {"link": "/examples/layouts.sql", "title": "Layouts", "icon": "layout"},
- {"link": "/examples/multistep-form", "title": "Forms", "icon": "edit"},
- {"link": "/examples/handle_picture_upload.sql", "title": "File uploads", "icon": "upload"},
- {"link": "/examples/authentication/", "title": "Password protection", "icon": "password-user"},
- {"link": "//github.com/sqlpage/SQLPage/blob/main/examples/", "title": "All examples & demos", "icon": "code"}
- ]},
- {"title": "Community", "submenu": [
- {"link": "/blog.sql", "title": "Blog", "icon": "book"},
- {"link": "//github.com/sqlpage/SQLPage/issues", "title": "Report a bug", "icon": "bug"},
- {"link": "//github.com/sqlpage/SQLPage/discussions", "title": "Discussions", "icon": "message"},
- {"link": "//github.com/sqlpage/SQLPage", "title": "Github", "icon": "brand-github"}
- ]},
- {"title": "Documentation", "submenu": [
- {"link": "/your-first-sql-website", "title": "Getting started", "icon": "book"},
- {"link": "/components.sql", "title": "All Components", "icon": "list-details"},
- {"link": "/functions.sql", "title": "SQLPage Functions", "icon": "math-function"},
- {"link": "/extensions-to-sql", "title": "Extensions to SQL", "icon": "cube-plus"},
- {"link": "/custom_components.sql", "title": "Custom Components", "icon": "puzzle"},
- {"link": "//github.com/sqlpage/SQLPage/blob/main/configuration.md#configuring-sqlpage", "title": "Configuration", "icon": "settings"}
- ]},
- {"title": "Search", "link": "/search"}
- ],
- "layout": "boxed",
- "language": "en-US",
- "description": "Go from SQL queries to web applications in an instant.",
- "preview_image": "https://sql-page.com/sqlpage_social_preview.webp",
- "theme": "dark",
- "font_size": 19,
- "image": "/assets/icon.webp",
- "favicon": "/favicon.ico",
- "javascript_module": "/assets/highlightjs-launch.js",
- "css": "/assets/highlightjs-and-tabler-theme.css",
- "footer": "[Built with SQLPage](https://github.com/sqlpage/SQLPage/tree/main/examples/official-site)"
- }]')),
- ('shell', '
-This example shows how to set menu items as active in the navigation, so that they are highlighted in the nav bar.
-
-In this example you can see that two menu items are created, "Home" and "About" and the "Home" tab is marked as active.
-',
- json('[{
- "component": "shell",
- "title": "SQLPage: SQL websites",
- "icon": "database",
- "link": "/",
- "menu_item": [
- {"title": "Home", "active": true},
- {"title": "About"}
- ]
- }]')),
-
- ('shell', '
-### Sharing the shell between multiple pages
-
-It is common to want to share the same shell between multiple pages.
-
-#### Static menu
-
-If your menu is completely static (it does not depend on the database content),
-you can use the [`dynamic`](?component=dynamic#component) component together with the
-[`sqlpage.read_file_as_text`](functions.sql?function=read_file_as_text#function) function to load the shell from
-a json file.
-
-```sql
-SELECT ''dynamic'' AS component, sqlpage.read_file_as_text(''shell.json'') AS properties;
-```
-
-and in `shell.json`:
-
-```json
-{
- "component": "shell",
- "title": "SQL + JSON = <3",
- "link": "/",
- "menu_item": [
- {"link": "index.sql", "title": "Home"},
- {"title": "Community", "submenu": [
- {"link": "/blog.sql", "title": "Blog"},
- {"link": "//github.com/sqlpage/SQLPage", "title": "Github"}
- ]}
- ]
-}
-```
-
-#### Dynamic menu
-
-If your menu depends on the database content, or on special `sqlpage` functions,
-you can use the `dynamic` component,
-but this time with the [`sqlpage.run_sql`](functions.sql?function=run_sql#function)
-function to generate the menu from the database.
-
-```sql
-SELECT ''dynamic'' AS component, sqlpage.run_sql(''shell.sql'') AS properties;
-```
-
-and in `shell.sql`:
-
-```sql
-SELECT ''shell'' AS component, ''run_sql is cool'' as title,
- json_group_array(json_object(
- ''link'', link,
- ''title'', title
- )) as menu_item
-FROM my_menu_items
-```
-
-(check your database documentation for the exact syntax of the `json_group_array` function).
-
-Another case when dynamic menus are useful is when you want to show some
-menu items only in certain conditions.
-
-For instance, you could show an "Admin panel" menu item only to users with the "admin" role,
-a "Profile" menu item only to authenticated users,
-and a "Login" menu item only to unauthenticated users:
-
-```sql
-set role = (
- SELECT role FROM users
- INNER JOIN sessions ON users.id = sessions.user_id
- WHERE sessions.session_id = sqlpage.cookie(''session_id'')
-); -- Read more about how to handle user sessions in the "authentication" component documentation
-
-SELECT
- ''shell'' AS component,
- ''My authenticated website'' AS title,
-
- -- Add an admin panel link if the user is an admin
- CASE WHEN $role = ''admin'' THEN ''{"link": "admin.sql", "title": "Admin panel"}'' END AS menu_item,
-
- -- Add a profile page if the user is authenticated
- CASE WHEN $role IS NOT NULL THEN ''{"link": "profile.sql", "title": "My profile"}'' END AS menu_item,
-
- -- Add a login link if the user is not authenticated
- CASE WHEN $role IS NULL THEN ''login'' END AS menu_item
-;
-```
-
-More about how to handle user sessions in the [authentication component documentation](?component=authentication#component).
-
-### Menu with icons
-
-The "icon" attribute may be specified for items in the top menu and submenus to display an icon
-before the title (or instead). Similarly, the "image" attribute defines a file-based icon. For
-image-based icons, the "size" attribute may be specified at the top level of menu_item only to
-reduce the size of image-based icons. The following snippet provides an example, which is also
-available [here](examples/menu_icon.sql).
-
-```sql
-SELECT
- ''shell'' AS component,
- ''SQLPage'' AS title,
- ''database'' AS icon,
- ''/'' AS link,
- TRUE AS fixed_top_menu,
- ''{"title":"About","icon": "settings","submenu":[{"link":"/safety.sql","title":"Security","icon": "logout"},{"link":"/performance.sql","title":"Performance"}]}'' AS menu_item,
- ''{"title":"Examples","image": "https://upload.wikimedia.org/wikipedia/en/6/6b/Terrestrial_globe.svg","submenu":[{"link":"/examples/tabs/","title":"Tabs","image": "https://upload.wikimedia.org/wikipedia/en/6/6b/Terrestrial_globe.svg"},{"link":"/examples/layouts.sql","title":"Layouts"}]}'' AS menu_item,
- ''{"title":"Examples","size":"sm","image": "https://upload.wikimedia.org/wikipedia/en/6/6b/Terrestrial_globe.svg","submenu":[{"link":"/examples/tabs/","title":"Tabs","image": "https://upload.wikimedia.org/wikipedia/en/6/6b/Terrestrial_globe.svg"},{"link":"/examples/layouts.sql","title":"Layouts"}]}'' AS menu_item,
- ''Official [SQLPage](https://sql-page.com) documentation'' as footer;
-```
-', NULL),
- ('shell', '
-### Returning custom HTML, XML, plain text, or other formats
-
-Use `shell-empty` to opt out of SQLPage''s component system and return raw data directly.
-
-By default, SQLPage wraps all your content in a complete HTML page with navigation and styling.
-The `shell-empty` component tells SQLPage to skip this HTML wrapper and return only the raw content you specify.
-
-Use it to create endpoints that return things like
- - XML (for JSON, use the [json](?component=json) component)
- - plain text or markdown content (for instance for consumption by LLMs)
- - a custom data format you need
-
-When using `shell-empty`, you should use the [http_header](component.sql?component=http%5Fheader) component first
-to set the correct [content type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type) (like `application/json` or `application/xml`).
-',
- json('[
- {
- "component":"http_header",
- "Content-Type":"application/xml"
- },
- {
- "component":"shell-empty",
- "contents": "\n \n 42\n john.doe\n "
- }
- ]')
- ),
- ('shell','
-### Generate your own HTML
-If you generate your own HTML from a SQL query, you can also use the `shell-empty` component to include it in a page.
-This is useful when you want to generate a snippet of HTML that can be dynamically included in a larger page.
-Make sure you know what you are doing, and be careful to escape the HTML properly,
-as you are stepping out of the safe SQLPage framework and into the wild world of HTML.
-
-In this scenario, you can use the `html` property, which serves as an alias for the `contents` property.
-This property improves code readability by clearly indicating that you are generating HTML.
-Since SQLPage returns HTML by default, there is no need to specify the content type in the HTTP header.
-',
- json('[{"component":"shell-empty", "html": "\n\n\n My page\n\n\n My page
\n\n"}]'));
diff --git a/examples/official-site/sqlpage/migrations/82_reference_catalog.sql b/examples/official-site/sqlpage/migrations/82_reference_catalog.sql
index 8a3314c50..bd93b715f 100644
--- a/examples/official-site/sqlpage/migrations/82_reference_catalog.sql
+++ b/examples/official-site/sqlpage/migrations/82_reference_catalog.sql
@@ -46,7 +46,6 @@ WITH copy(name, category, summary) AS (VALUES
('tab', 'navigation', 'Switch between related pages using labeled tabs.'),
('hero', 'page-layout', 'Introduce a page with a headline, media, and a call to action.'),
- ('shell', 'page-layout', 'Set the page layout, navigation, branding, and footer.'),
('cookie', 'http-responses', 'Set a cookie in the visitor''s browser.'),
('csv', 'http-responses', 'Export query rows as a downloadable CSV file.'),