1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2024-12-19 20:12:52 +02:00
Commit Graph

12 Commits

Author SHA1 Message Date
Fini Jastrow
df6ab2c942 Allow searching for pasted icon
[why]
There are cases that I find myself into sometimes when I have the glyph
with me but not its name or codepoint. It would be nice to be able to
search for the codepoint and/or name of a glyph by literally putting it
into the search box of the cheat-sheet.
There are several reasons to know the name of the glyph, to use it in a
webpage, to look for alternatives when they get removed, etc.

[how]
Convert high codepoint-chars to codepoint text.

Fixes: #1307

Authored-by: ad-chaos
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-06-25 10:16:24 +02:00
Fini Jastrow
fa0d3c7e98 cheat-sheet: Show no icons by default
[why]
The additional hints in the bottom are hard to notice if we flood users
with all available items first.
Usually users want to search the icons and not browse, so showing them
all per default seems better.

[how]
Just do not change the search term from "" to something else, so the
search comes up empty on an empty search.

If people search for a blank the previous mechanics to show all icons is
triggered instead. A message to hint for this is added to the empty
search result.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-06-09 07:55:19 +02:00
Fadi Hania
1df198249a Update search page style
- Fix having multiple vertical scrollbars
 - Update icons lazy loading accordingly
2023-06-09 07:55:19 +02:00
Fini Jastrow
8c3d893a60 Some cheat-cheat tweaks
[why]
* We want to have the autocreated cheat-sheet file here 100% and not
  only approximate, so create the file anew via generate-css.sh and
  commit it here.

* "No results found" is kind of a lie, we have a result and the result
  is that there are no hits while searching :-> Call me pedantic.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-05-30 19:48:05 +02:00
rszyma
270a604d09 cheat-sheet: don't show nfc icons on empty search 2023-05-30 19:13:12 +02:00
rszyma
5d1ccc69ab cheat-sheet: add more negative boost for old icons 2023-05-30 19:13:12 +02:00
rszyma
2360483964 cheat-sheet: boost the part after last - 2023-05-30 19:13:12 +02:00
rszyma
d2503caa4a cheat-sheet: fix negative boost for removed icons 2023-05-30 19:13:12 +02:00
Fini Jastrow
b068b08653 cheat-sheet: Sort the results
[why]
Often it is easier to find what one wants if the search result is
sorted.

[how]
Do a full result sort.
* Sort by id (class name)
* Put removed icons last

We do not need the boost function anymore, so that pre-sorting is
removed.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-05-30 19:13:12 +02:00
Fini Jastrow
b42a1b82e6 cheat-sheet: Allow incomplete searches
[why]
Sometimes one does not know what the exact search term is.
For example if you want to find a 'homefolder' but the name is
'homedirectory' it is impossible to find.

[how]
Allow prefix search, in this case at least 'home' will find both
variants.
I do believe a full substring search would be even better, but that is
not supported by minisearch.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-05-30 19:13:12 +02:00
Fini Jastrow
c06a149c9c cheat_sheet: Sort removed icons last
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
2023-05-30 19:13:12 +02:00
rszyma
156981d8f2 fix: cheatsheet page performance 2023-05-30 19:13:12 +02:00