summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormayx <mayx@outlook.com>2025-05-15 10:51:18 +0200
committermayx <mayx@outlook.com>2025-05-15 10:51:18 +0200
commit4c6c0bfc1167cc5c7a655b624c41410a2fc282b0 (patch)
tree34020e6167380e54ba9b33e5a80fa896b0d04bb0
parent17c27841b07a2a5ce50b171e23f93a263aa16bcf (diff)
Update file search.html
-rw-r--r--search.html12
1 files changed, 6 insertions, 6 deletions
diff --git a/search.html b/search.html
index 323d8fe..ee8d228 100644
--- a/search.html
+++ b/search.html
@@ -4,12 +4,12 @@ title: 搜索
---
<h1>搜索</h1>
-<!--[if IE]>
- <p>很遗憾,IE搜不了捏~</p>
-<![endif]-->
-<!--[if !IE]> -->
-<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>
+<form action="https://www.google.com/search">
+<input type="hidden" name="as_sitesearch" value="mabbs.github.io">
+<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>
+</form>
<ul id="results-container"></ul>
+<!--[if !IE]> -->
<script src="/assets/js/simple-jekyll-search.min.js"></script>
<script>
const urlParams = new URLSearchParams(window.location.search);
@@ -23,7 +23,7 @@ getSearchJSON(function(json){
searchInput: sbox,
resultsContainer: document.getElementById('results-container'),
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
});
sjs.search(mykeyword);