Commit Graph

11 Commits

Author SHA1 Message Date
Maximilian Krög
50404ca409 Add number of occurence to tags
It can be a bit frustrating to click on a tag only to realise it was the
only example with that tag.
2020-07-25 14:00:53 +02:00
jeanpierre
9616dee9f7 Update bootstrap, cleanup css, make pages more responsive 2020-07-23 12:32:27 +02:00
Maximilian Krög
557563f331 Update scoring / indexing code
Add dict / word as parameters to updateScore function so it
does not need to be created in each loop, and shorten it a bit.
2020-07-17 21:52:35 +02:00
Maximilian Krög
856830b834 No empty string words / allow 1 character search
If a  space character is at either end of the input string splitting it
procuces an empty string that matches everything.

Allow single character words as there are is a single character tag: `x`
2020-07-17 21:52:34 +02:00
Maximilian Krög
b41a43cb7f Simplify sorting of the examples by precalculating the score / words 2020-07-17 21:52:34 +02:00
Maximilian Krög
687795ba24 Skip listing all examples if query param is set.
Also use the `input` event instead of `keyup` and addEventlistener instead
of setting the onload / onchange properties.
And handle space character encoded as `+` in query string correctly.
2020-07-17 21:52:34 +02:00
Maximilian Krög
292ff812fe Split searching and listing 2020-07-17 21:18:53 +02:00
Maximilian Krög
dc05cacefa Prettier code
This also fixes two undeclared variables and the regex is only created once per word
2020-07-17 21:18:53 +02:00
Maximilian Krög
681fc155a7 Move js code into separate file to benefit from code analysis 2020-07-17 21:18:47 +02:00
Éric Lemoine
0ae3f8806e Remove examples/index.js (refs #67) 2012-10-21 21:24:15 +02:00
Tom Payne
e9dbb00039 Pass query string through example index
This is so that visiting

    /examples/index.html?mode=RAW&Debug=true

will automatically add ?mode=RAW&Debug=true to all links in the
generated index.
2012-10-17 11:31:40 +02:00