1
0
مراية لـ https://github.com/Mabbs/mabbs.github.io تم المزامنة 2026-07-20 06:21:51 +00:00
الملفات
blog/search.html
mayx 6d145383f5 Update 4 files
- /_layouts/default.html
- /_layouts/post.html
- /index.html
- /search.html
2025-04-26 13:52:27 +00:00

33 أسطر
1.0 KiB
HTML
خام اللوم التاريخ

هذا الملف يحتوي على أحرف Unicode غامضة

هذا الملف يحتوي على أحرف Unicode قد تُخلط مع أحرف أخرى. إذا كنت تعتقد أن هذا مقصود، يمكنك تجاهل هذا التحذير بأمان. استخدم زر الهروب للكشف عنها.

---
layout: default
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" id="search-loading" style="width:22px;vertical-align: bottom"></p>
<ul id="results-container"></ul>
<script src="/assets/js/simple-jekyll-search.min.js"></script>
<script>
const urlParams = new URLSearchParams(window.location.search);
const mykeyword = urlParams.get('keyword')?.trim();
const sbox = document.getElementById('search-input');
if (mykeyword) {
sbox.value = mykeyword;
}
getSearchJSON(function(json){
var sjs = SimpleJekyllSearch({
searchInput: sbox,
resultsContainer: document.getElementById('results-container'),
json: json,
searchResultTemplate: '<p><li>{date} - <a href="{url}?kw={query}">{title}</a></li></p>',
limit: 20
});
sjs.search(mykeyword);
document.getElementById('search-loading').style.display = "none";
});
</script>
<!-- <![endif]-->