Замена tipue на search
This commit is contained in:
@ -62,10 +62,6 @@
|
||||
<link href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/font-awesome.min.css" rel="stylesheet">
|
||||
|
||||
<link href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/pygments/{{ PYGMENTS_STYLE|default('native') }}.css" type="text/css" rel="stylesheet" />
|
||||
{% if 'tipue_search' in PLUGINS %}
|
||||
<link href="{{ SITEURL}}/{{ THEME_STATIC_DIR }}/css/normalize.min.css" type="text/css" rel="stylesheet" />
|
||||
<link href="{{ SITEURL}}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.css" type="text/css" rel="stylesheet" />
|
||||
{% endif %}
|
||||
{% if DOCUTIL_CSS %}
|
||||
<link href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/html4css1.css" type="text/css" rel="stylesheet" />
|
||||
{% endif %}
|
||||
@ -112,6 +108,9 @@
|
||||
<link href="{{ SITEURL }}/{{ category_feed_atom }}" type="application/atom+xml" rel="alternate" title="{{ SITENAME }} {{ category }} ATOM Feed"/>
|
||||
{%- endif %}
|
||||
|
||||
{% if 'search' in PLUGINS %}
|
||||
<link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/stork.css">
|
||||
{% endif %}
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@ -144,68 +143,11 @@
|
||||
</li>
|
||||
-->
|
||||
</ul>
|
||||
{% if 'tipue_search' in PLUGINS %}
|
||||
<form class="form-inline my-2 my-lg-0" action="{{ SITEURL }}/search.html">
|
||||
<div class="tipue_search_group">
|
||||
<input class="form-control mr-sm-2 search-query" type="text" placeholder="" name="q" id="tipue_search_input" pattern=".{3,}" required>
|
||||
<button class="btn btn-secondary my-2 my-sm-0 tipue_search_button" type="submit"><div class="tipue_search_icon">⚲</div></button>
|
||||
</div>
|
||||
</form>
|
||||
{% if 'search' in PLUGINS %}
|
||||
Search: <input data-stork="sitesearch" />
|
||||
<div data-stork="sitesearch-output"></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!--
|
||||
|
||||
<div class="navbar-header">
|
||||
{% if MENUITEMS or (pages and DISPLAY_PAGES_ON_MENU) or (categories and DISPLAY_CATEGORIES_ON_MENU) %}
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="collapse navbar-collapse navbar-ex1-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
{% for title, link in MENUITEMS %}
|
||||
<li><a href="{{ link }}">{{ title }}</a></li>
|
||||
{% endfor %}
|
||||
{% if not PAGES_SORT_ATTRIBUTE -%}
|
||||
{% set PAGES_SORT_ATTRIBUTE = 'title' %}
|
||||
{%- endif %}
|
||||
{% if DISPLAY_PAGES_ON_MENU %}
|
||||
{% for p in pages | sort(attribute=PAGES_SORT_ATTRIBUTE) %}
|
||||
{% if p.url %}
|
||||
<li{% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">
|
||||
{{ p.menulabel|default(p.title) }}
|
||||
</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if DISPLAY_CATEGORIES_ON_MENU %}
|
||||
{% for cat, null in categories %}
|
||||
<li {% if cat == category %}class="active"{% endif %}>
|
||||
<a href="{{ SITEURL }}/{{ cat.url }}">{{ cat | capitalize }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{% if 'tipue_search' in PLUGINS %}
|
||||
<li><span>
|
||||
<form class="navbar-search" action="{{ SEARCH_URL | default('/search.html') }}">
|
||||
<input type="text" class="search-query" placeholder="_(Search)" name="q" id="tipue_search_input" required>
|
||||
</form></span>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if ARCHIVES_SAVE_AS %}
|
||||
<li><a href="{{ SITEURL }}/{{ ARCHIVES_URL | default('archives.html') }}"><i class="fa fa-th-list"></i><span class="icon-label">{{ _('Archives') }}</span></a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -275,6 +217,15 @@
|
||||
{% include 'includes/liquid_tags_nb_footer.html' %}
|
||||
{% endif %}
|
||||
|
||||
{% block scripts %}{% endblock %}
|
||||
{% block scripts %}
|
||||
{% if 'search' in PLUGINS %}
|
||||
<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/stork.js"></script>
|
||||
<script>
|
||||
stork.initialize("{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/stork.wasm")
|
||||
stork.downloadIndex("sitesearch", "{{ SITEURL }}/search-index.st")
|
||||
stork.attach("sitesearch")
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user