From 0b64e118d53f92e5167e4c59490743ea4cc8f99f Mon Sep 17 00:00:00 2001 From: E8y2FqZE <136404184+E8y2FqZE@users.noreply.github.com> Date: Fri, 31 May 2024 13:09:30 +0000 Subject: [PATCH 1/2] Added search_value to shell component. --- sqlpage/templates/shell.handlebars | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlpage/templates/shell.handlebars b/sqlpage/templates/shell.handlebars index 74fc4535..aad01fb0 100644 --- a/sqlpage/templates/shell.handlebars +++ b/sqlpage/templates/shell.handlebars @@ -96,7 +96,7 @@ {{#if search_target}} {{/if}} From ab4d4897645ad36688b845fb729e3495f547af72 Mon Sep 17 00:00:00 2001 From: E8y2FqZE <136404184+E8y2FqZE@users.noreply.github.com> Date: Fri, 31 May 2024 13:13:02 +0000 Subject: [PATCH 2/2] Documented search_value for shell. --- examples/official-site/sqlpage/migrations/01_documentation.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/official-site/sqlpage/migrations/01_documentation.sql b/examples/official-site/sqlpage/migrations/01_documentation.sql index 08cdd20d..f2b8bcb8 100644 --- a/examples/official-site/sqlpage/migrations/01_documentation.sql +++ b/examples/official-site/sqlpage/migrations/01_documentation.sql @@ -758,6 +758,7 @@ INSERT INTO parameter(component, name, description, type, top_level, optional) S ('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), ('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), ('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', 'Name of a font to display the text in. This has to be a valid font name from fonts.google.com.', 'TEXT', TRUE, TRUE), ('font_size', 'Font size on the page, in pixels. Set to 18 by default.', 'INTEGER', TRUE, TRUE), @@ -892,4 +893,4 @@ so you can also [create your own shell component](custom_components.sql#custom-s If you generate your own HTML from a SQL query, you can also use the `shell-empty` component to include it in a 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.', - json('[{"component":"shell-empty", "html": "\n\n\n My page\n\n\n

My page

\n\n"}]')); \ No newline at end of file + json('[{"component":"shell-empty", "html": "\n\n\n My page\n\n\n

My page

\n\n"}]'));