From 424940dc6c8c8ced545e689d9343bac24752c74e Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Wed, 5 Jun 2024 22:11:53 +0000 Subject: [PATCH] add fuzzy search using wfa --- css/form.css | 2 +- css/style.css | 12 ++ index.html | 1 + modules/wfa.js | 328 ++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 +- scripts/index.js | 29 +++- scripts/settings.js | 5 + settings.html | 14 +- 8 files changed, 388 insertions(+), 5 deletions(-) create mode 100644 modules/wfa.js diff --git a/css/form.css b/css/form.css index 8e177b9..1d127c6 100644 --- a/css/form.css +++ b/css/form.css @@ -52,4 +52,4 @@ input[type="radio"] { div[draggable="true"] { cursor: grab; -} +} \ No newline at end of file diff --git a/css/style.css b/css/style.css index ad538d1..6a9e113 100644 --- a/css/style.css +++ b/css/style.css @@ -111,4 +111,16 @@ hr, * { .spacer { min-height: 1em; +} + +.w3-select, select { + padding: 8px; + -moz-appearance: none; + -webkit-appearance: none; + appearance: none; + appearance: none; + background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E:root%7Bcolor:%23fff%7D@media (prefers-color-scheme:light)%7B:root%7Bcolor:%23000%7D%7D%3C/style%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12.707 14.707a1 1 0 01-1.414 0l-5-5a1 1 0 011.414-1.414L12 12.586l4.293-4.293a1 1 0 111.414 1.414l-5 5z' fill='currentColor'/%3E%3C/svg%3E"); + background-repeat: no-repeat; + background-position: right 8px top 50%; + background-size: 1em auto; } \ No newline at end of file diff --git a/index.html b/index.html index ef1382a..6057fda 100644 --- a/index.html +++ b/index.html @@ -12,6 +12,7 @@ +