Skip to content

Commit eb9fbb7

Browse files
committed
Merge branch 'release/3.1.1'
2 parents bd7fb20 + 14447d1 commit eb9fbb7

File tree

7 files changed

+1978
-1090
lines changed

7 files changed

+1978
-1090
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# v3.1.1
2+
## 02/12/2020
3+
4+
1. [](#improved)
5+
* Search with JS disabled [#75](https://github.com/trilbymedia/grav-plugin-tntsearch/pull/75)
6+
* Added RU 🇷🇺 language [#74](https://github.com/trilbymedia/grav-plugin-tntsearch/pull/74)
7+
* Various JS dependency updates & recompiled production JS
8+
1. [](#bugfix)
9+
* Added missing `search_object_type` to blueprint
10+
111
# v3.1.0
212
## 02/11/2020
313

assets/tntsearch.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

blueprints.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: TNT Search
2-
version: 3.1.0
2+
version: 3.1.1
33
testing: false
44
description: Powerful indexed-based full text search engine powered by TNTSearch
55
icon: binoculars
@@ -273,3 +273,13 @@ form:
273273
0: Disabled
274274
validate:
275275
type: bool
276+
277+
adv_title:
278+
type: spacer
279+
title: Advanced Settings
280+
281+
search_object_type:
282+
type: text
283+
label: Search Object Type
284+
help: Allows for overriding the deafult search type to a custom type provided by a plugin.
285+
default: Grav

languages.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
en:
22
PLUGIN_TNTSEARCH:
33
FOUND_RESULTS: "Found %s results"
4-
FOUND_IN: "in <span>%s</span>"
4+
FOUND_IN: "in <span>%s</span>"
5+
POWERED_BY: "Powered by %s"
6+
ru:
7+
PLUGIN_TNTSEARCH:
8+
FOUND_RESULTS: "Результатов: %s"
9+
FOUND_IN: "(<span>%s</span>)"
10+
POWERED_BY: "Работает на %s"

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"domready": "^1.0.8",
1515
"history": "^4.7.2",
1616
"lodash": "^4.17.4",
17-
"querystringify": "^1.0.0",
18-
"url-parse": "^1.2.0",
17+
"querystringify": "^2.0.0",
18+
"url-parse": "^1.4.3",
1919
"whatwg-fetch": "^2.0.3"
2020
},
2121
"devDependencies": {
@@ -26,7 +26,7 @@
2626
"babel-preset-es2015": "^6.24.1",
2727
"babel-preset-stage-3": "^6.24.1",
2828
"css-loader": "^0.28.9",
29-
"eslint": "^4.16.0",
29+
"eslint": "^4.18.2",
3030
"eslint-config-defaults": "^9.0.0",
3131
"eslint-loader": "^1.9.0",
3232
"exports-loader": "^0.6.4",

templates/partials/tntsearch.html.twig

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
{% set search_type = search_type|default(config.get('plugins.tntsearch.search_type', 'auto')) %}
66
{% set placeholder = placeholder|default('Search...') %}
77
{% set live_update = in_page ? live_update|default(config.get('plugins.tntsearch.live_uri_update', 1)) : 0 %}
8+
{% set nojs_action = config.get('plugins.tntsearch.search_route', '/search')|trim('/') %}
89

910
{% set options = { uri: url, limit: limit, snippet: snippet, min: min, in_page: in_page, live_update: live_update, search_type: search_type } %}
1011

11-
<form role="form" class="tntsearch-form">
12+
<form role="form" class="tntsearch-form" action="{{ nojs_action }}" method="get">
1213
{% block tntsearch_input %}
1314
<div id="tntsearch-wrapper" class="form-group{{ dropdown ? ' tntsearch-dropdown' : '' }}">
14-
<input type="text" class="form-control form-input tntsearch-field{{ in_page ? ' tntsearch-field-inpage' : '' }}" data-tntsearch="{{ options|json_encode|e('html_attr') }}" placeholder="{{ placeholder }}" value="{{ not dropdown ? query|e : '' }}" autofocus>
15+
<input type="text" name="q" class="form-control form-input tntsearch-field{{ in_page ? ' tntsearch-field-inpage' : '' }}" data-tntsearch="{{ options|json_encode|e('html_attr') }}" placeholder="{{ placeholder }}" value="{{ not dropdown ? query|e : '' }}" autofocus>
1516
<span class="tntsearch-clear"{{ not query or dropdown ? ' style="display: none;"' : '' }}>&times;</span>
1617
</div>
1718
{% endblock %}
@@ -23,7 +24,7 @@
2324

2425
{% if config.get('plugins.tntsearch.powered_by') %}
2526
<p class="tntsearch-powered-by">
26-
Powered by <a href="https://github.com/trilbymedia/grav-plugin-tntsearch" target="_blank">TNTSearch</a>
27+
{{ "PLUGIN_TNTSEARCH.POWERED_BY"|t("<a href='https://github.com/trilbymedia/grav-plugin-tntsearch' target='_blank'>TNTSearch</a>")|raw }}
2728
</p>
2829
{% endif %}
2930
</form>

0 commit comments

Comments
 (0)