-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
725 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Search Section | ||
|
||
This section is used to display a search field. You can configure the searchable entry types and set a field placeholder for the search field.  | ||
|
||
By default, it uses the [Default Search Page](../../settings.md#search-tab) in the Settings if no page is set.  | ||
|
||
The section's tag name is either `section` or the `section.html_tag` in the [Advanced Tab](section/advanced-tab.md) fields if you have it set. The Advanced Tab fields also add an ID attribute and CSS Classes that you specify. You can also adjust the Bootstrap container type as well in this tab.  | ||
|
||
You can also adjust the spacing before and after using the switches from `section.disable_top_spacing`, and `section.disable_bottom_spacing` respectfully.  | ||
|
||
### Files Used | ||
|
||
The following files are used to display this content | ||
|
||
* ``[`builder/search/*`](https://github.com/artistro08/tailor-starter/tree/main/seeds/blueprints/content/mixins/builder/search) blueprint files used in the `builder.yaml` file | ||
* ``[`search/*`](https://github.com/artistro08/tailor-starter/tree/main/partials/search) partial files used to render search  |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Search Column | ||
|
||
The Search Column Block displays a search field according to specified settings. This is a carbon copy of the [Search Section](../search-section.md) block except it has column attributes. | ||
|
||
### Files Used | ||
|
||
The following files are used to display this content | ||
|
||
* `builder/search/*` included in the `section.yaml` file | ||
* ``[`builder/column/search.htm`](https://github.com/artistro08/tailor-starter/blob/main/partials/builder/columns/search.htm) partial used to display the search block. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Search | ||
|
||
## Introduction | ||
|
||
Search allows you to search any front facing content on the site. It is disabled by default.  | ||
|
||
In order to use the search, you'll need create a [Search Page](pages/#search-pages) and set it as default in the [Search Settings ](settings.md#search-tab) | ||
|
||
## How Search Works | ||
|
||
The search query from either a [Search Section](pages/blocks/search-section.md) block or Global Search is used to search all titles of entry content. You can specify what to search by configuring the block or settings to do so.  | ||
|
||
### Global Search | ||
|
||
Global search is defined in the navbar. It's used to search content globally and is different from the Search Blocks.  | ||
|
||
## Template Files | ||
|
||
The files below are used to display content throughout the site. Below is an explanation of what each file does and how things are rendered.  | ||
|
||
### Partials | ||
|
||
#### `search/*` | ||
|
||
[These files](https://github.com/artistro08/tailor-starter/tree/main/partials/search) are used to return search content from the search query.  | ||
|
||
### Blueprints | ||
|
||
#### `blueprints/search/*` | ||
|
||
[These files](https://github.com/artistro08/tailor-starter/tree/main/seeds/blueprints/content/mixins/builder/search) are used to render the top level Section blocks in the Dynamic Page Builder | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{% set searchPage = column.search_page|length ? 'page'|page({fullslug: column.search_page.fullslug }) : 'page'|page({fullslug: settings.default_search_page.fullslug }) %} | ||
<form action="{{ searchPage }}" method="get"> | ||
<div class="input-group mb-3"> | ||
<input type="text" name="term" class="form-control" placeholder="{{ column.search_field_placeholder }}" aria-label="{{ column.search_field_placeholder }}"> | ||
{% for entry in column.entries_to_search %} | ||
<input type="hidden" name="{{ entry }}" value="true"> | ||
{% endfor %} | ||
<input type="hidden" name="global" value="false"> | ||
<button class="btn btn-primary" type="submit"> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="currentColor" class="bi bi-search" viewBox="0 0 16 16"> | ||
<path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/> | ||
</svg> | ||
</button> | ||
</div> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[global settings] | ||
handle = "Content\Settings" | ||
== | ||
{% if settings.enable_search == true %} | ||
<{{ section.html_tag == "default" ? "section" : section.html_tag }} | ||
{{ section.html_anchor|length ? 'id="' ~ section.html_anchor ~ '"' }} | ||
class="{% if section.css_classes|length %} | ||
{% for class in section.css_classes|split(',') %} | ||
{{ class ~ ' ' }} | ||
{% endfor %} | ||
{% endif %} | ||
{{ section.style == 'light' ? 'bg-light' }} | ||
{{ section.style == 'dark' ? 'bg-dark text-white' }} | ||
{{ section.disable_top_spacing == true ? 'pt-0' : "pt-4" }} | ||
{{ section.disable_bottom_spacing == true ? 'pb-0' : "pb-4" }}" | ||
> | ||
<div class="{{ section.container_style }}"> | ||
{% set searchPage = section.search_page|length ? 'page'|page({fullslug: section.search_page.fullslug }) : 'page'|page({fullslug: settings.default_search_page.fullslug }) %} | ||
<form action="{{ searchPage }}" method="get"> | ||
<div class="input-group mb-3"> | ||
<input type="text" name="term" class="form-control" placeholder="{{ section.search_field_placeholder }}" aria-label="{{ section.search_field_placeholder }}"> | ||
{% for entry in section.entries_to_search %} | ||
<input type="hidden" name="{{ entry }}" value="true"> | ||
{% endfor %} | ||
<input type="hidden" name="global" value="false"> | ||
<button class="btn btn-primary" type="submit"> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" fill="currentColor" class="bi bi-search" viewBox="0 0 16 16"> | ||
<path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/> | ||
</svg> | ||
</button> | ||
</div> | ||
</form> | ||
</div> | ||
</{{ section.html_tag == "default" ? "section" : section.html_tag }}> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.