Правка поиска

This commit is contained in:
Andrei Astafev 2023-02-20 16:36:46 +03:00
parent 0ce7287642
commit b296fbbe6d
4 changed files with 2 additions and 25 deletions

View File

@ -367,18 +367,6 @@ As an alternative, you may use [Shariff](https://github.com/heiseonline/shariff)
For a detailed description of each setting, refer to [data attributes](https://github.com/heiseonline/shariff#options-data-attributes) description at the [Shariff README](https://github.com/heiseonline/shariff).
### Tipue Search
This theme has support for the
[Tipue Search plugin](https://github.com/getpelican/pelican-plugins/tree/master/tipue_search).
All you have to do, is:
- enable the plugin, and the theme will add a search box on the right
side of the menu
- Add `'search'` to the `DIRECT_TEMPLATES` in your `pelicanconf.py`. E.g. `DIRECT_TEMPLATES = ('index', 'categories', 'authors', 'archives', 'search').
By default, the Tipue search page is configured at "/search.html", but you can override that with the `SEARCH_URL`
setting, which comes in handy if you have fancy rewrite rules in your Apache or Nginx configuration.
### Flattr
This theme has support for linking your domain with [Flattr](https://flattr.com). To enable this provide your `FLATTR_ID`. Be aware that you will also have to go [Flattr's domain settings](https://flattr.com/settings/domains) and link your domain.

View File

@ -85,7 +85,9 @@
{% include "includes/article_info.html" %}
</div>
</div>
<main>
{{ article.content }}
</main>
</div>
<!-- /.entry-content -->
{% include 'includes/related-posts.html' %}

View File

@ -144,12 +144,8 @@
-->
</ul>
{% if 'search' in PLUGINS %}
<form class="form-inline my-2 my-lg-0" action="{{ SITEURL }}/search.html">
Search: <input data-stork="sitesearch" />
<div data-stork="sitesearch-output"></div>
<input class="form-control mr-sm-2 search-query" type="text" placeholder="" name="q" id="search_input" pattern=".{3,}" required>
<button class="btn btn-secondary my-2 my-sm-0 search_button" type="submit"><div class="search_icon">&#9906;</div></button>
</form>
{% endif %}
</div>
</div>

View File

@ -1,9 +0,0 @@
{% extends 'base.html' %}
{% block title %}
{{ _('Search') }} - {{ super() }}
{% endblock %}
{% block content %}
<div data-stork="sitesearch-output"></div>
{% endblock %}