-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsearch.html
57 lines (49 loc) · 1.64 KB
/
search.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
title: search
description: "Search this site"
permalink: /search/
tipue_search_active: true
exclude_from_search: true
---
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
{% if page.tipue_search_active or layout.tipue_search_active %}
<link rel="stylesheet" href="{{ "/assets/tipuesearch/css/normalize.css" | relative_url }}">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="{{ "/assets/tipuesearch/tipuesearch_content.js" | relative_url }}"></script>
<link rel="stylesheet" href="{{ "/assets/tipuesearch/css/tipuesearch.css" | relative_url }}">
<script src="{{ "/assets/tipuesearch/tipuesearch_set.js" | relative_url }}"></script>
<script src="{{ "/assets/tipuesearch/tipuesearch.min.js" | relative_url }}"></script>
{% endif %}
<style>
#tipue_search_content {
padding: 0;
}
.tipue_search_content_text, .tipue_search_related_title {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.tipue_search_content_title, #tipue_search_results_count {
display: none;
}
.tipue_search_content_text {
margin: 0 0 20px 0;
}
</style>
<form action="{{ page.url | relative_url }}" style="display: none;">
<input type="hidden" name="q" id="tipue_search_input" pattern=".{3,}" title="At least 3 characters" required />
</form>
<div id="tipue_search_content"></div>
<script>
$(document).ready(function() {
$('#tipue_search_input').tipuesearch();
});
window.searchClick = function(evt) {
evt.preventDefault();
window.parent.postMessage(
{
type: 'searchClick',
href: evt.target.href
},
"*"
);
}
</script>