web/_includes/search-loader.html

29 lines
965 B
HTML
Raw Normal View History

<!--
Jekyll Simple Search loader
-->
{% capture result_elem %}
<div class="pl-1 pr-1 pl-sm-2 pr-sm-2 pl-lg-4 pr-lg-4 pl-xl-0 pr-xl-0">
<a href="{{ site.url }}{url}">{title}</a>
<div class="post-meta d-flex flex-column flex-sm-row text-muted mt-1 mb-1">
<div class="mr-sm-4"><i class="far fa-folder fa-fw"></i>{categories}</div>
<div><i class="fa fa-tag fa-fw"></i>{tags}</div>
</div>
<p>{snippet}</p>
</div>
{% endcapture %}
2019-12-31 19:18:21 +03:00
{% capture not_found %}<p class="mt-5">Oops! No result founds.</p>{% endcapture %}
<script src="https://cdn.jsdelivr.net/npm/simple-jekyll-search@1.7.3/dest/simple-jekyll-search.min.js"></script>
<script>
SimpleJekyllSearch({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('search-results'),
2021-01-18 18:27:43 +03:00
json: '{{ '/assets/js/data/search.json' | relative_url }}',
2020-01-08 20:45:01 +03:00
searchResultTemplate: '{{ result_elem | strip_newlines }}',
2019-12-31 19:18:21 +03:00
noResultsText: '{{ not_found }}'
});
2021-01-18 18:27:43 +03:00
</script>