Code optimization.

This commit is contained in:
Cotes Chung 2020-01-01 00:18:21 +08:00
parent 3248343c22
commit 77b2b5be04
2 changed files with 4 additions and 2 deletions

View File

@ -16,12 +16,14 @@
</div>
{% endcapture %}
{% capture not_found %}<p class="mt-5">Oops! No result founds.</p>{% endcapture %}
<script>
SimpleJekyllSearch({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('search-results'),
json: '{{ site.baseurl }}/search.json',
searchResultTemplate: '{{ result_elem }}',
noResultsText: '<p class="mt-5">Oops! No result founds.</p>'
noResultsText: '{{ not_found }}'
});
</script>

View File

@ -6,7 +6,7 @@
<div id="search-result-wrapper" class="d-flex justify-content-center unloaded">
<div class="col-12 col-xl-11 post-content">
<div id="search-hints">
<h4 class="text-muted">Trending Tags</h4>
<h4 class="text-muted">{{ site.data.label.panel.trending_tags }}</h4>
{% include trending-tags.html %}
</div>
<div id="search-results" class="d-flex flex-wrap justify-content-center text-muted mt-3"></div>