new_site/assets/js
CheariX 0a40a22739
feat: simple filtering / searching on bibliography (#2523)
This PR adds a simple filter/search functionality to the bibliography.

It can be used in two ways:

1. Simply enter a search term in the input box.
2. Send a search term via the `location.hash`, e.g.,
https://alshedivat.github.io/al-folio/publications/#mechanics

**Notes:**

- The search box is optional. It can be simply removed if anyone does
not like it.
- Searching via `hash` works without the search box. My idea is to use
this functionality to index all BibTeX entries via the `ctrl-k` search
and link them via their BibTeX key.
- Searching via `hash` could also be used to set static links on the
current page, e.g., to filter specific co-authors, venues, etc.
- I don't know much about the design of the input field. I simply reused
the newsletter box style.
- Entering a search term in the box does exact matching. No fuzzy
search, no AND/OR logic. I kept it very simple. Maybe anyone else wants
to improve it in the future.
- The search looks in all data in the BibTeX entry that is parsed via
`bib.liquid`. E.g., it is possible to search for BibTeX keys, titles,
authors, years, venues, abstracts, or whatever `bib.liquid` prints.
- I used a 300ms delay before starting to search on the input box.
- Entering search terms in the box does not update the location hash
(things could get complex otherwise due to automatically updating each
other...)
- If the filter does not find any match in a specific year, the year is
also made invisible.

**Screenshot**
<img width="935" alt="screenshot"
src="https://github.com/alshedivat/al-folio/assets/1998723/447003e2-c623-4de9-b2c5-2357117a7743">

Looking for feedback.
2024-07-08 16:51:22 -03:00
..
distillpub format code with prettier.io (#2048) 2024-01-10 00:10:51 -05:00
search Added support for search (#2415) 2024-05-23 23:21:16 -03:00
bibsearch.js feat: simple filtering / searching on bibliography (#2523) 2024-07-08 16:51:22 -03:00
bootstrap-toc.min.js Fix prettier (#2062) 2024-01-10 11:21:58 -03:00
bootstrap.bundle.min.js Fix prettier (#2062) 2024-01-10 11:21:58 -03:00
bootstrap.bundle.min.js.map Added support to PurgeCSS (#1562) 2023-09-28 14:22:42 -03:00
common.js Support superscripts in bibtex author names (#2512) 2024-06-19 14:34:54 -03:00
copy_code.js Support for diff2html (#2133) 2024-01-28 12:45:20 -03:00
highlight-search-term.js feat: simple filtering / searching on bibliography (#2523) 2024-07-08 16:51:22 -03:00
jupyter_new_tab.js Add functionality to open external links in jupyter notebooks in new tab (#2233) 2024-02-27 12:25:16 -03:00
masonry.js format code with prettier.io (#2048) 2024-01-10 00:10:51 -05:00
no_defer.js Remove bootstrap-table from archive tables (#2306) 2024-04-03 15:35:18 -03:00
shortcut-key.js Fix code blocks not changing to plots and others (#2497) 2024-06-11 14:06:38 -03:00
tabs.min.js Added support for jekyll-tabs (#2380) 2024-05-02 14:34:48 -03:00
theme.js Added support for search (#2415) 2024-05-23 23:21:16 -03:00
typograms.js Added support for Google Typograms (#2379) 2024-04-30 11:26:56 -03:00
vanilla-back-to-top.min.js Fix: Add back-to-top button (#2433) 2024-05-24 15:58:55 -03:00
zoom.js format code with prettier.io (#2048) 2024-01-10 00:10:51 -05:00