-
Notifications
You must be signed in to change notification settings - Fork 1
/
search.html
57 lines (48 loc) · 1.47 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
56
57
---
layout: default
title: Search
---
<!-- Post Header -->
<style type="text/css">
header.intro-header{background-color: #0f0f0f;}
</style>
<header class="intro-header" >
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div class="site-heading">
<h1>{{ page.title }}</h1>
<span class="subheading">{{ page.description }}</span>
</div>
</div>
</div>
</div>
</header>
<div class="container">
<div class="row">
<!-- Post Container -->
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1 post-container">
<form action="/search" method="get">
<label for="search-box"></label>
<input type="text" id="search-box" name="query" placeholder="Only Support English">
</form>
<ul id="search-results"></ul>
<script>
window.store = {
{% for post in site.posts %}
"{{ post.url | slugify }}": {
"title": "{{ post.title | xml_escape }}",
"author": "{{ post.author | xml_escape }}",
"categories": "{{ post.categories}}",
"content": {{ post.content | strip_html | strip_new_lines | smartify | truncate: 200 | jsonify }},
"url": "{{ post.url | xml_escape }}"
}
{% unless forloop.last %},{% endunless %}
{% endfor %}
};
</script>
<script src="/js/lunr.min.js"></script>
<script src="/js/search.js"></script>
</div>
</div>
</div>