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

View file

@ -6,7 +6,7 @@
<div id="search-result-wrapper" class="d-flex justify-content-center unloaded"> <div id="search-result-wrapper" class="d-flex justify-content-center unloaded">
<div class="col-12 col-xl-11 post-content"> <div class="col-12 col-xl-11 post-content">
<div id="search-hints"> <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 %} {% include trending-tags.html %}
</div> </div>
<div id="search-results" class="d-flex flex-wrap justify-content-center text-muted mt-3"></div> <div id="search-results" class="d-flex flex-wrap justify-content-center text-muted mt-3"></div>