257 private links
One advantage in svelte is that we can integrate JS libraries quickly
Universally Unique Lexicographically Sortable Identifier is an improvement of UUIDs in some cases:
- 128-bit compatibility with UUID
- 1.21e+24 unique ULIDs per millisecond
- Lexicographically sortable!
- Canonically encoded as a 26 character string, as opposed to the 36 character UUID
- Uses Crockford's base32 for better efficiency and readability (5 bits per character)
- Case insensitive
- No special characters (URL safe)
- Monotonic sort order (correctly detects and handles the same millisecond)
In Rust, we can use:
- enums
- builder pattern
- enums + builder pattern
- another way: Instead of insisting on several builder methods, let’s create a single method that can add any option to the search options. The search option is then an
enum
.
Create webpages from SQL requests
13 examples or applications
A paper-style imitation library
Améliorer sur projet et le rendre compatible HTML5
Brackets are allowed in URLs. It makes it hader to handle than first though!
The author propose a regex, but it is still not valid as only the extended ascii is in it.
Yes, it is hard to parse URL correctly.
Native alternatives to lodash utils
Native alternative to date-fns
Examples of UI patterns that does not need JS
Pagefind seems to be a great search tool for static (or SSRed) websites.
Pagefind is written in Rust and runs after my static site generator binary. pagefind indexes all generated HTML and provides an API to query that, including a search UI which you can see at the bottom of every page here. Perfect for my static site setup and it aims to not use much storage or bandwidth.
Available at https://pagefind.app/
Now I get it. As often, the container of the node matter.
type BLetter = 'A' | 'B' | 'C';
type BNumber = '1' | '2' | '3';
type Board = `${BLetter}${BNumber}`;
// ^?
After the ^?
, type Board = "B1" | "B2" | "B3" | "C1" | "C2" | "C3" | "A1" | "A2" | "A3"
will be shown in the IDE.
A playground where some vue components can be defined. It is useful for quick tests and sharing them :)
Most of the time, your job with JavaScript to enhance components’ keyboard accessibility will be done with just a handful of tools, including the use of event listeners and certain JavaScript methods of a couple of Web APIs that can help us in this task.
- keydown event: Instead, the utility of the keydown event comes when you need to add functionality to other keys [than enter or space].
- blur event: most of the time, you’ll use it to reverse the possible changes you have made with the keydown event listener.
- focus event (rare), but instead the focus method!
button.inert
works and avoid a setAttribute.
#idea #project #vue: create a directive to handle keydown and blur event into one action that is reversible.
So now we can have a look at component patterns:
- toggletips
- tabs
- modals