Initial commit
This commit is contained in:
@ -0,0 +1 @@
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
23
public/assets/vendor/select2-4.1.0-rc.0/docs/plugins/simplesearch/templates/partials/simplesearch_item.html.twig
vendored
Executable file
23
public/assets/vendor/select2-4.1.0-rc.0/docs/plugins/simplesearch/templates/partials/simplesearch_item.html.twig
vendored
Executable file
@ -0,0 +1,23 @@
|
||||
<section class="search-row">
|
||||
|
||||
{% set banner = page.media.images|first %}
|
||||
|
||||
{% if banner %}
|
||||
<div class="search-image">
|
||||
<a href="{{ page.url }}">{{ banner.cropZoom(100,100).html|raw }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="search-item">
|
||||
<div class="search-title">
|
||||
<h3><a href="{{ page.url }}">{{ page.title }}</a></h3>
|
||||
</div>
|
||||
|
||||
<div class="search-details">
|
||||
<span class="search-date">{{ page.date|date(config.system.pages.dateformat.short) }}</span>
|
||||
</div>
|
||||
|
||||
<p>{{ page.summary|raw }}</p>
|
||||
|
||||
<hr />
|
||||
</div>
|
||||
</section>
|
||||
@ -0,0 +1,22 @@
|
||||
{% set min_chars = config.get('plugins.simplesearch.min_query_length', 3) %}
|
||||
<div class="search-wrapper">
|
||||
<form name="search" data-simplesearch-form>
|
||||
<input
|
||||
name="searchfield"
|
||||
class="search-input"
|
||||
type="text"
|
||||
{% if min_chars > 0 %} min="{{- min_chars -}}" {% endif %}
|
||||
required
|
||||
placeholder="{{"PLUGIN_SIMPLESEARCH.SEARCH_PLACEHOLDER"|t}}"
|
||||
value="{{ query }}"
|
||||
data-search-invalid="{{ "PLUGIN_SIMPLESEARCH.SEARCH_FIELD_MINIMUM_CHARACTERS"|t(min_chars)|raw }}"
|
||||
data-search-separator="{{ config.system.param_sep }}"
|
||||
data-search-input="{{ base_url }}{{ config.plugins.simplesearch.route == '@self' ? '' : (config.plugins.simplesearch.route == '/' ? '' : config.plugins.simplesearch.route) }}/query"
|
||||
/>
|
||||
{% if config.plugins.simplesearch.display_button %}
|
||||
<button type="submit" class="search-submit">
|
||||
<img src="{{ url('plugin://simplesearch/assets/search.svg') }}" />
|
||||
</button>
|
||||
{% endif %}
|
||||
</form>
|
||||
</div>
|
||||
24
public/assets/vendor/select2-4.1.0-rc.0/docs/plugins/simplesearch/templates/simplesearch_results.html.twig
vendored
Executable file
24
public/assets/vendor/select2-4.1.0-rc.0/docs/plugins/simplesearch/templates/simplesearch_results.html.twig
vendored
Executable file
@ -0,0 +1,24 @@
|
||||
{% extends 'partials/simplesearch_base.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="content-padding simplesearch">
|
||||
<h1 class="search-header">{{"PLUGIN_SIMPLESEARCH.SEARCH_RESULTS"|t}}</h1>
|
||||
<div class="center">
|
||||
{% include 'partials/simplesearch_searchbox.html.twig' %}
|
||||
</div>
|
||||
|
||||
<p>
|
||||
{% if query %}
|
||||
{% set count = search_results ? search_results.count : 0 %}
|
||||
{% if count == 1 %}
|
||||
{{ "PLUGIN_SIMPLESEARCH.SEARCH_RESULTS_SUMMARY_SINGULAR"|t(query)|raw }}
|
||||
{% else %}
|
||||
{{ "PLUGIN_SIMPLESEARCH.SEARCH_RESULTS_SUMMARY_PLURAL"|t(query, count)|raw }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</p>
|
||||
{% for page in search_results %}
|
||||
{% include 'partials/simplesearch_item.html.twig' with {'page':page} %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
5
public/assets/vendor/select2-4.1.0-rc.0/docs/plugins/simplesearch/templates/simplesearch_results.json.twig
vendored
Executable file
5
public/assets/vendor/select2-4.1.0-rc.0/docs/plugins/simplesearch/templates/simplesearch_results.json.twig
vendored
Executable file
@ -0,0 +1,5 @@
|
||||
{"results":[
|
||||
{%- for search_result in search_results -%}
|
||||
{{- search_result.route|json_encode -}}{{ not loop.last ? ',' }}
|
||||
{%- endfor -%}
|
||||
]}
|
||||
Reference in New Issue
Block a user