diff --git a/app/default-files/default-themes/simple/config.json b/app/default-files/default-themes/simple/config.json index a9c5c598e..3d347bb6a 100755 --- a/app/default-files/default-themes/simple/config.json +++ b/app/default-files/default-themes/simple/config.json @@ -869,22 +869,59 @@ "value": false, "type": "checkbox" }, + { + "name": "searchMode", + "label": "Mode", + "group": "Search", + "note": "The external mode allows you to search from any external search engine.
The integrated mode will integrate the search results on your website.", + "value": "external", + "type": "radio", + "dependencies": [{ + "field": "search", + "value": "true" + }], + "options": [ + { + "label": "External", + "value": "external" + }, + { + "label": "Integrated", + "value": "integrated" + } + ] + }, { - "name": "searchId", + "name": "separator", + "type": "separator", + "label": "Search configuration", "group": "Search", - "label": "Google Custom Search Id", - "note": "A search ID is required for search functionality, which uses Google Custom Search. Learn how to configure it here: https://www.getpublii.com/docs/...", - "value": "", - "type": "text", + "size": "big", + "dependencies": [{ + "field": "search", + "value": "true" + }] + }, + { + "name": "searchServer", + "group": "Search", + "label": "Engine", + "note": "Enter the URL of the search engine you want to use on your website.", + "value": "https://duckduckgo.com", + "type": "url", "dependencies": [{ "field": "search", "value": "true" + }, + { + "field": "searchMode", + "value": "external" }] }, { "name": "searchParam", "group": "Search", - "label": "Search parameter", + "label": "Parameter", "note": "You can change the default \"q\" search parameter if desired; this is recommended only for advanced users.", "value": "q", "type": "text", @@ -893,6 +930,89 @@ "value": "true" }] }, + { + "name": "searchMethod", + "label": "Form Method", + "group": "Search", + "note": "Select the method you want to use for your search engine.", + "value": "get", + "type": "radio", + "dependencies": [{ + "field": "search", + "value": "true" + }, + { + "field": "searchMode", + "value": "external" + }], + "options": [ + { + "label": "Post", + "value": "post" + }, + { + "label": "Get", + "value": "get" + } + ] + }, + { + "name": "searchTab", + "label": "Open results in new tab", + "group": "Search", + "value": false, + "type": "checkbox", + "dependencies": [{ + "field": "search", + "value": "true" + }] + }, + { + "name": "searchForceWebsiteResults", + "label": "Only show results from your website", + "group": "Search", + "value": true, + "type": "checkbox", + "dependencies": [{ + "field": "search", + "value": "true" + }, + { + "field": "searchMode", + "value": "external" + }] + }, + { + "name": "separator", + "type": "separator", + "label": "Google search configuration", + "group": "Search", + "size": "big", + "dependencies": [{ + "field": "search", + "value": "true" + }, + { + "field": "searchMode", + "value": "integrated" + }] + }, + { + "name": "searchId", + "group": "Search", + "label": "Custom Search Id", + "note": "A search ID is required for integrated mode functionality, which uses Google Custom Search. Learn how to configure it here: https://www.getpublii.com/docs/...", + "value": "", + "type": "text", + "dependencies": [{ + "field": "search", + "value": "true" + }, + { + "field": "searchMode", + "value": "integrated" + }] + }, { "name": "shareFacebook", diff --git a/app/default-files/default-themes/simple/partials/top.hbs b/app/default-files/default-themes/simple/partials/top.hbs index 6d492c3ee..8bf980b9d 100755 --- a/app/default-files/default-themes/simple/partials/top.hbs +++ b/app/default-files/default-themes/simple/partials/top.hbs @@ -14,15 +14,42 @@