-
Notifications
You must be signed in to change notification settings - Fork 4
/
search.html
32 lines (30 loc) · 918 Bytes
/
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
---
layout: search
---
<div class="search-header">
<div class="search-container">
<form action="/search.html" method="get">
<button type="submit" value="search"><i class="fa fa-search"></i></button>
<div class="search-text">
<input type="text" id="search-box" name="query" placeholder="Search...">
</div>
</form>
</div>
</div>
<h3>Search Results</h3>
<ul class="post-list" id="search-results"></ul>
<script>
window.store = {
{% for post in site.posts %}
"{{ post.url | slugify }}": {
"title": "{{ post.title }}",
"meta": "{{ post.date | date: '%B %-d, %Y' }}",
"content": {{ post.content | strip_html | strip_newlines | 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>