Sha256: c7bcc2d87ec226c3a23c7e000eeb028b4070f1749d1d4697341c4d26cb6e0eb9

Contents?: true

Size: 1.39 KB

Versions: 47

Compression:

Stored size: 1.39 KB

Contents

<!--
  Jekyll Simple Search loader
  See: <https://github.com/christian-fei/Simple-Jekyll-Search>
-->

{% capture result_elem %}
  <article class="px-1 px-sm-2 px-lg-4 px-xl-0">
    <header>
      <h2><a href="{url}">{title}</a></h2>
      <div class="post-meta d-flex flex-column flex-sm-row text-muted mt-1 mb-1">
        {categories}
        {tags}
      </div>
    </header>
    <p>{snippet}</p>
  </article>
{% endcapture %}

{% capture not_found %}<p class="mt-5">{{ site.data.locales[include.lang].search.no_results }}</p>{% endcapture %}

<script>
  /* Note: dependent library will be loaded in `js-selector.html` */
  SimpleJekyllSearch({
    searchInput: document.getElementById('search-input'),
    resultsContainer: document.getElementById('search-results'),
    json: '{{ '/assets/js/data/search.json' | relative_url }}',
    searchResultTemplate: '{{ result_elem | strip_newlines }}',
    noResultsText: '{{ not_found }}',
    templateMiddleware: function(prop, value, template) {
      if (prop === 'categories') {
        if (value === '') {
          return `${value}`;
        } else {
          return `<div class="me-sm-4"><i class="far fa-folder fa-fw"></i>${value}</div>`;
        }
      }

      if (prop === 'tags') {
        if (value === '') {
          return `${value}`;
        } else {
          return `<div><i class="fa fa-tag fa-fw"></i>${value}</div>`;
        }
      }
    }
  });
</script>

Version data entries

47 entries across 47 versions & 4 rubygems

Version Path
jekyll-theme-chirpy-6.5.5 _includes/search-loader.html
jekyll-theme-chirpy-customized-upe-4.0.0 _includes/search-loader.html
jekyll-theme-chirpy-customized-upe-4.0.0.pre.beta2 _includes/search-loader.html
doc-theme-0.1.0 _includes/search-loader.html
jekyll-theme-chirpy-6.5.3 _includes/search-loader.html
jekyll-theme-chirpy-6.5.2 _includes/search-loader.html
jekyll-theme-chirpy-customized-upe-3.2.0 _includes/search-loader.html
jekyll-theme-chirpy-customized-upe-3.2.0.pre.beta3 _includes/search-loader.html
jekyll-theme-chirpy-customized-upe-3.2.0.pre.beta2 _includes/search-loader.html
jekyll-theme-chirpy-customized-upe-3.2.0.pre.beta1 _includes/search-loader.html
jekyll-theme-chirpy-customized-upe-3.1.4 _includes/search-loader.html
jekyll-theme-chirpy-customized-upe-3.1.2 _includes/search-loader.html
jekyll-theme-chirpy-customized-upe-3.1.1 _includes/search-loader.html
jekyll-theme-chirpy-customized-upe-3.1.0 _includes/search-loader.html
jekyll-theme-chirpy-customized-upe-3.0.1 _includes/search-loader.html
jekyll-theme-chirpy-customized-upe-3.0.0 _includes/search-loader.html
jekyll-theme-chirpy-customized-upe-1.0.2 _includes/search-loader.html
jekyll-theme-chirpy-customized-upe-1.0.1 _includes/search-loader.html
jekyll-theme-chirpy-customized-upe-1.0.0 _includes/search-loader.html
jekyll-theme-chirpy-customized-upe-0.1.2 _includes/search-loader.html