mirror of
https://github.com/c0de-archive/pelican-mg.git
synced 2024-12-22 08:22:40 +00:00
Add DISABLE_SEARCH config
This commit is contained in:
parent
dc630d6b36
commit
d365aaafb7
15
static/js/main-search.js
Normal file
15
static/js/main-search.js
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('.mg-container-social').height($('article').height());
|
||||||
|
$('#mg-panel-social').stick_in_parent({offset_top: 35});
|
||||||
|
|
||||||
|
$('#tipue_search_input').tipuesearch({
|
||||||
|
'show': 10,
|
||||||
|
'mode': 'json',
|
||||||
|
'showURL': false,
|
||||||
|
'descriptiveWords': 75,
|
||||||
|
'highlightEveryTerm': true,
|
||||||
|
'contentLocation': '/tipue_search.json'
|
||||||
|
});
|
||||||
|
});
|
@ -3,13 +3,4 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('.mg-container-social').height($('article').height());
|
$('.mg-container-social').height($('article').height());
|
||||||
$('#mg-panel-social').stick_in_parent({offset_top: 35});
|
$('#mg-panel-social').stick_in_parent({offset_top: 35});
|
||||||
|
|
||||||
$('#tipue_search_input').tipuesearch({
|
|
||||||
'show': 10,
|
|
||||||
'mode': 'json',
|
|
||||||
'showURL': false,
|
|
||||||
'descriptiveWords': 75,
|
|
||||||
'highlightEveryTerm': true,
|
|
||||||
'contentLocation': '/tipue_search.json'
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
@ -50,8 +50,10 @@
|
|||||||
<link href='//fonts.googleapis.com/css?family=Open+Sans:800italic' rel='stylesheet' type='text/css'>
|
<link href='//fonts.googleapis.com/css?family=Open+Sans:800italic' rel='stylesheet' type='text/css'>
|
||||||
<link href='//fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
|
<link href='//fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
|
||||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/uikit/2.23.0/css/uikit.min.css">
|
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/uikit/2.23.0/css/uikit.min.css">
|
||||||
|
{% if not DISABLE_SEARCH %}
|
||||||
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/uikit/2.23.0/css/components/search.min.css">
|
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/uikit/2.23.0/css/components/search.min.css">
|
||||||
<link rel="stylesheet" href="/theme/css/tipuesearch.css">
|
<link rel="stylesheet" href="/theme/css/tipuesearch.css">
|
||||||
|
{% endif %}
|
||||||
<link rel="stylesheet" href="/theme/css/solarized.css">
|
<link rel="stylesheet" href="/theme/css/solarized.css">
|
||||||
<link rel="stylesheet" href="/theme/css/main.css">
|
<link rel="stylesheet" href="/theme/css/main.css">
|
||||||
|
|
||||||
@ -85,11 +87,13 @@
|
|||||||
|
|
||||||
<div class="uk-width-medium-1-5 uk-hidden-small">
|
<div class="uk-width-medium-1-5 uk-hidden-small">
|
||||||
|
|
||||||
|
{% if not DISABLE_SEARCH %}
|
||||||
<div class="uk-panel uk-panel-box">
|
<div class="uk-panel uk-panel-box">
|
||||||
<form class="uk-search" action="search.html" data-uk-search>
|
<form class="uk-search" action="search.html" data-uk-search>
|
||||||
<input class="uk-search-field tipue_search" type="search" name="q" id="tipue_search_input" autocomplete="off" placeholder="Search...">
|
<input class="uk-search-field tipue_search" type="search" name="q" id="tipue_search_input" autocomplete="off" placeholder="Search...">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="uk-panel uk-panel-box">
|
<div class="uk-panel uk-panel-box">
|
||||||
<ul class="uk-nav uk-nav-side">
|
<ul class="uk-nav uk-nav-side">
|
||||||
@ -162,9 +166,11 @@
|
|||||||
<div id="mg-offcanvas" class="uk-offcanvas">
|
<div id="mg-offcanvas" class="uk-offcanvas">
|
||||||
<div class="uk-offcanvas-bar">
|
<div class="uk-offcanvas-bar">
|
||||||
|
|
||||||
|
{% if not DISABLE_SEARCH %}
|
||||||
<form class="uk-search" action="search.html" data-uk-search>
|
<form class="uk-search" action="search.html" data-uk-search>
|
||||||
<input class="uk-search-field" type="search" name="q" id="tipue_search_input" autocomplete="off" placeholder="Search...">
|
<input class="uk-search-field" type="search" name="q" id="tipue_search_input" autocomplete="off" placeholder="Search...">
|
||||||
</form>
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<ul class="uk-nav uk-nav-offcanvas" data-uk-nav>
|
<ul class="uk-nav uk-nav-offcanvas" data-uk-nav>
|
||||||
<li class="uk-nav-header">Categories</li>
|
<li class="uk-nav-header">Categories</li>
|
||||||
@ -190,12 +196,18 @@
|
|||||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||||
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
|
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/uikit/2.23.0/js/uikit.min.js"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/uikit/2.23.0/js/uikit.min.js"></script>
|
||||||
|
{% if not DISABLE_SEARCH %}
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/uikit/2.23.0/js/components/search.min.js"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/uikit/2.23.0/js/components/search.min.js"></script>
|
||||||
<script src="/theme/js/jquery.sticky-kit.js"></script>
|
|
||||||
<script src="/theme/js/tipuesearch_set.js"></script>
|
<script src="/theme/js/tipuesearch_set.js"></script>
|
||||||
<script src="/theme/js/tipuesearch.js"></script>
|
<script src="/theme/js/tipuesearch.js"></script>
|
||||||
|
{% endif %}
|
||||||
|
<script src="/theme/js/jquery.sticky-kit.js"></script>
|
||||||
<script src="/theme/js/plugins.js"></script>
|
<script src="/theme/js/plugins.js"></script>
|
||||||
|
{% if DISABLE_SEARCH %}
|
||||||
<script src="/theme/js/main.js"></script>
|
<script src="/theme/js/main.js"></script>
|
||||||
|
{% else %}
|
||||||
|
<script src="/theme/js/main-search.js"></script>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% include 'disqus_count.html' %}
|
{% include 'disqus_count.html' %}
|
||||||
{% include 'analytics.html' %}
|
{% include 'analytics.html' %}
|
||||||
|
Loading…
Reference in New Issue
Block a user