Keep only the loading bar from the list (when you first load the website) instead of the one at the top (for the search requests I mean, you can keep it for the pages)
The list should be wider because we have wide screens and lines could then be thinner
Name | Members | Added by | (buttons) |
---|
That would add the possibility to sort the lists.
If you want to keep them like that you could add http://www.listjs.com/ that can sort with <li> elements but I'd still prefer the padding to be smaller like 8-10px
You probably want the FuzzySearch plugin for list.js. A demo: codepen
This is way simpler than
And you still have the freedom of writing the markup for list elements (think of a sublist containing tags, visible or hidden) the way you want and in- or exclude parts of a list element based on CSS classes etc.
Maybe the normal search functionality of list.js is even enough for you (it has way better performance).
Sorting isn't a state, it's an action. You should call .sort() after adding your values if you want to sort the new values.
You also shouldn't call <code>.remove()</code> to remove all elements, since that's used for removing specific elements. Use <code>.clear()</code> instead.
It's always a good idea to read the documentation for whatever library you're using.
Actually, I think you are right. I don't know of a way to auto-generate a unique HTML page for each "item/node" in a _data file without a plugin either. You would need a template for each item or item type to use _date. I may not fully understand the exact use case or business need here.
There is a Jekyll plugin that will output a page for each item in a _data file. Here is the link: https://github.com/avillafiorita/jekyll-datapage_gen
You could also get creative and not even have a multi-page catalog by using a JS sort/filter library to create a single page product catalog. Load all products from the _data file into a single HTML page and use the JS library to sort/filter/search all products. This could add a lot of extra value, with minimal dev effort, for the end user. (Fast and faceted.) List.js could do something like that very easily with high client side performance. http://www.listjs.com
I've had good luck with the List.js plugin:
Use the fuzzy search and pagination addons there to give you text filtering (instant search -- type and the results show up), plus pagination.
As long as you don't have too many results per page (say, less than 100) it's all very fast, at least for lists of about 10,000 that I've tried.