Skip to content

Latest commit

 

History

History
131 lines (123 loc) · 5.08 KB

search.md

File metadata and controls

131 lines (123 loc) · 5.08 KB
title
Search Results
<script> let hasInputListener = false; </script> <script src="/assets/js/simple-jekyll-search-ap.js"></script> <script> var div = document.getElementById("navbarNavAltMarkup"); div.classList.add("show"); //hide search widget document.getElementById("search-widget").style.display = "none"; </script>
Pro-tip: Start typing any keywords for figure titles, captions, genes or metabolites and the results will begin to appear. You can include organisms, keywords, and even publication year in your query. Multi-term queries are processed as AND queries. Only the past 7 years are searchable.

Additional ways to find figures:

    {% assign sorted_browse = site.browse | where_exp:"item","item.btn-class contains 'pill'" | sort: "order" %} {% for bp in sorted_browse %}
  • {{ bp.display-title }}
  • {% endfor %}
  • PFOCRummage
<script> SimpleJekyllSearch({ searchInput: document.getElementById('search-input'), resultsContainer: document.getElementById('results-container'), json: '/search.json', searchResultTemplate: ' ' + '' + '
Figure thumbnail{title}' + '
{alias} - {organisms}' + '
{description}' + '
Publication year: {year}' + '
', noResultsText: 'No results found', limit: 40, fuzzy: false, exclude: ['url'], sortMiddleware: function(a, b) { var aYear = a.year.match(/\d+/); var bYear = b.year.match(/\d+/); if(null == aYear){ aYear = 1900; } else { aYear[0]; } if(null == bYear){ bYear = 1900; } else { aYear[0]; } const aNum = parseInt(aYear); const bNum = parseInt(bYear); return bNum - aNum; }, searchResultsCallback: function(results) { allResults = results; const showMoreContainer = document.getElementById('show-more-container'); showMoreContainer.style.display = results.length > currentLimit ? 'block' : 'none'; }, inputCallback: function(query) { currentQuery = query; currentLimit = 40; // Reset limit when new search is performed } }) </script> <script> function triggerInputEvent() { //AP: Support multiple searchboxes and query params const searchInput = document.getElementById('search-input') const loadingGif = document.getElementById('loading-gif'); // Get the loading gif element const searchParams = new URLSearchParams(window.location.search); const query = searchParams.get('query'); loadingGif.style.display = 'block'; // Show the loading gif searchInput.value = "performing search..."; const registerInputPromise = new Promise((resolve) => { if (hasInputListener) { resolve(); } else { const intervalId = setInterval(() => { if (hasInputListener) { //console.log("now!") clearInterval(intervalId); resolve(); } else { //console.log("not yet...") } }, 100); } }); registerInputPromise.then(() => { //console.log(query); loadingGif.style.display = 'none'; // Hide the loading gif searchInput.value = query; const inputEvent = new InputEvent('input', { inputType: 'insertText' }); searchInput.dispatchEvent(inputEvent); }); } triggerInputEvent(); </script>