diff --git a/filters.js b/filters.js deleted file mode 100644 index f5a446d..0000000 --- a/filters.js +++ /dev/null @@ -1,29 +0,0 @@ -// Shared by every desktop and mobile column filter. -// OR separates alternatives; * and & join literal phrases in occurrence order. -function compileTextFilter(query) { - const alternatives = String(query ?? '').toLowerCase().split('|') - .map(alternative => alternative.split(/[*&]/).filter(term => term !== '')) - .filter(terms => terms.length > 0); - - // Ignore empty operands while typing, rather than making an empty OR match all. - if (alternatives.length === 0) return () => true; - - return value => { - const text = String(value ?? '').toLowerCase(); - return alternatives.some(terms => { - let offset = 0; - return terms.every(term => { - const index = text.indexOf(term, offset); - if (index === -1) return false; - offset = index + term.length; - return true; - }); - }); - }; -} - -const FILTER_HELP = 'Case-insensitive literal phrases; spaces are literal. Use * or & for AND in order, | for OR. AND is evaluated before OR.'; - -if (typeof module !== 'undefined' && module.exports) { - module.exports = { compileTextFilter }; -} diff --git a/index.html b/index.html index 79907ec..c829a5b 100644 --- a/index.html +++ b/index.html @@ -35,6 +35,14 @@ .light-scroll::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px} .light-scroll{scrollbar-width:thin;scrollbar-color:#cbd5e1 transparent} + /* Switch to cards before the desktop columns become cramped or disappear. */ + .inventory-desktop{display:none} + .inventory-mobile{display:block} + @media (min-width:1440px){ + .inventory-desktop{display:block} + .inventory-mobile{display:none} + } + .console-wrap{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s ease-out,opacity .25s ease-out;opacity:0;overflow:hidden} .console-wrap.open{grid-template-rows:1fr;opacity:1} .console-inner{overflow:hidden;min-height:0} @@ -102,7 +110,33 @@
- +