-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsearch.html
47 lines (36 loc) · 1.03 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
<!-- Html Elements for Search -->
<p ><a href="/">返回首页</a> </p >
<div id="search-container">
<input type="text" id="search-input" placeholder="请输入搜索关键词">
<ul id="results-container"></ul>
</div>
<!-- Script pointing to search-script.js -->
<script src="/js/simple-jekyll-search.min.js"></script>
<!-- Configuration -->
<script>
window.simpleJekyllSearch = new SimpleJekyllSearch({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('results-container'),
json: '/search.json',
searchResultTemplate: '<li><a href="{url}">{title}</a></li>',
noResultsText: '没有搜索到结果'
})
</script>
<style type="text/css">
input {width: 50%;
color:black;
font-size: 20px;
position: absolute;
bottom: 60%;
right: 25%;
border-style: solid;
border-width: 5px;
}
ul {
color:black;
font-size: 20px;
position: absolute;
top: 40%;
right: 50%;
}
</style>