Initial commit

This commit is contained in:
meusinfirmary
2025-04-22 14:33:37 +07:00
commit b9891d2f81
1305 changed files with 452033 additions and 0 deletions

View File

@ -0,0 +1 @@
{% extends 'partials/base.html.twig' %}

View 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>

View File

@ -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>

View 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 %}

View File

@ -0,0 +1,5 @@
{"results":[
{%- for search_result in search_results -%}
{{- search_result.route|json_encode -}}{{ not loop.last ? ',' }}
{%- endfor -%}
]}