-
Notifications
You must be signed in to change notification settings - Fork 18
/
_search.html
24 lines (23 loc) · 935 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
<div class="container-search">
<div id="data" style="display: none;">
{{ range where .Site.Pages "Kind" "page" }}
{{ if (and (ne .Section "snippets"))}}
[{{- dict
"title" (lower .Title)
"permalink" .Permalink
"date" (.Date | time.Format "2006-01-02")
"summary" .Summary
"content" (lower .Plain)
| jsonify -}},]
{{ end }}
{{ end }}
</div>
<div id="search">
<!-- 🔎 -->
<span class="sc-icon"><img src="/imgs/icons/search.svg" width="48"> </span>
<span id="sc-clear" onclick="clearInputVal()">✖</span>
<input id="sc-input" oninput="search()" type="text" placeholder="here search search..." />
<div id="sc-res"></div>
</div>
<script src="/js/search.js" defer></script>
</div>