mirror of
https://github.com/Mabbs/mabbs.github.io
synced 2025-07-21 11:42:02 +00:00
Update file search.html
This commit is contained in:
parent
17c27841b0
commit
4c6c0bfc11
12
search.html
12
search.html
@ -4,12 +4,12 @@ title: 搜索
|
|||||||
---
|
---
|
||||||
|
|
||||||
<h1>搜索</h1>
|
<h1>搜索</h1>
|
||||||
<!--[if IE]>
|
<form action="https://www.google.com/search">
|
||||||
<p>很遗憾,IE搜不了捏~</p>
|
<input type="hidden" name="as_sitesearch" value="mabbs.github.io">
|
||||||
<![endif]-->
|
<p>Keyword: <input name="q" type="text" id="search-input" placeholder="Search blog posts.." /> <!--[if !IE]> --><img src="/images/loading.svg" alt="Loading..." id="search-loading" style="width:22px;vertical-align: bottom" /><!-- <![endif]--> <input type="submit" value="Google Search" /></p>
|
||||||
<!--[if !IE]> -->
|
</form>
|
||||||
<p>Keyword: <input type="text" id="search-input" placeholder="Search blog posts.." /> <img src="/images/loading.svg" alt="Loading..." id="search-loading" style="width:22px;vertical-align: bottom" /></p>
|
|
||||||
<ul id="results-container"></ul>
|
<ul id="results-container"></ul>
|
||||||
|
<!--[if !IE]> -->
|
||||||
<script src="/assets/js/simple-jekyll-search.min.js"></script>
|
<script src="/assets/js/simple-jekyll-search.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
@ -23,7 +23,7 @@ getSearchJSON(function(json){
|
|||||||
searchInput: sbox,
|
searchInput: sbox,
|
||||||
resultsContainer: document.getElementById('results-container'),
|
resultsContainer: document.getElementById('results-container'),
|
||||||
json: json,
|
json: json,
|
||||||
searchResultTemplate: '<p><li>{date} - <a href="{url}?kw={query}">{title}</a></li></p>',
|
searchResultTemplate: '<li><p>{date} - <a href="{url}?kw={query}">{title}</a></p></li>',
|
||||||
limit: 20
|
limit: 20
|
||||||
});
|
});
|
||||||
sjs.search(mykeyword);
|
sjs.search(mykeyword);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user