[doc] Update Simple-Jekyll-Search

This commit is contained in:
Andreas Dangel 2020-09-19 12:10:20 +02:00
parent 005045e09b
commit 2e22335c95
6 changed files with 17 additions and 10 deletions

View File

@ -19,6 +19,7 @@
<script src="assets/anchorjs-4.2.2/anchor.min.js"></script>
<script src="assets/navgoco-0.2.1/src/jquery.navgoco.min.js"></script>
<script src="assets/bootstrap-4.5.2-dist/js/bootstrap.bundle.min.js"></script>
<script src="assets/Simple-Jekyll-Search-1.0.8/dest/jekyll-search.js"></script>
<script src="{{ "js/toc.js" }}"></script>
<script src="{{ "js/customscripts.js" }}"></script>

View File

@ -44,21 +44,23 @@
{% endfor %}
{% endfor %}
</ul>
<form class="form-inline my-2 my-lg-0" id="search-demo-container">
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="search" placeholder="{{site.data.strings.search_placeholder_text}}" id="search-input">
<ul id="results-container"></ul>
<script src="{{ "js/jekyll-search.js"}}" type="text/javascript"></script>
<script type="text/javascript">
SimpleJekyllSearch.init({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('results-container'),
dataSource: '{{ "search.json" }}',
json: '{{ "search.json" }}',
searchResultTemplate: '<li><a href="{url}" title="{{page.title | replace: "\'", "\"}}">{title}</a></li>',
noResultsText: '{{site.data.strings.search_no_results_text}}',
limit: 10,
fuzzy: true,
});
$('#results-container').css('left', $('#search-input').position().left);
$('#results-container').click(function() {
$('#search-input').val('');
$(this).empty();
});
</script>
</form>
</div>

View File

@ -31,3 +31,6 @@ https://github.com/tefra/navgoco/releases/tag/0.2.1
https://jqueryui.com/
https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip
## Simple Jekyll Search
https://github.com/christian-fei/Simple-Jekyll-Search

File diff suppressed because one or more lines are too long

View File

@ -208,17 +208,16 @@ p.post-meta {font-size: 80%; color: #777;}
.entry-date{font-size:14px;font-size:0.875rem;line-height:1.71429;margin-bottom:0;text-transform:uppercase;}
/* search area */
#search-demo-container ul#results-container {
ul#results-container {
list-style: none;
font-size: 12px;
background-color: white;
position: absolute;
top: 50px; /* if you change anything about the nav, you'll prob. need to reset the top and left values here.*/
left: 20px;
z-index: -1;
width:223px;
border-left: 1px solid #dedede;
box-shadow: 2px 3px 2px #dedede;
padding: 0px;
}
@ -230,9 +229,11 @@ ul#results-container a:hover {
color: black;
}
#search-demo-container a:hover {
color: black;
ul#results-container li a {
border-top:1px solid whitesmoke;
margin:10px;
}
/* end search */
.filter-options {

File diff suppressed because one or more lines are too long