From 083739fd4e227b8323a50d29055327ce9c5bfa2d Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Mon, 22 Jan 2024 19:29:51 +0100 Subject: gallery: implement AND/NOT for tag search --- public/gallery.js | 6 +++++- public/style.css | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'public') diff --git a/public/gallery.js b/public/gallery.js index 9d3b067..01439f7 100644 --- a/public/gallery.js +++ b/public/gallery.js @@ -646,7 +646,11 @@ let Search = { m(Header), m('.body', {}, [ m('.sidebar', [ - m('p', SearchModel.query), + m('input', { + value: SearchModel.query, + onchange: event => m.route.set( + `/search/:key`, {key: event.target.value}), + }), m(SearchRelated), ]), m(SearchView), diff --git a/public/style.css b/public/style.css index 1bdeb3f..7fd0079 100644 --- a/public/style.css +++ b/public/style.css @@ -27,6 +27,8 @@ a { color: inherit; } .sidebar { padding: .25rem .5rem; background: var(--shade-color); border-right: 1px solid #ccc; overflow: auto; min-width: 10rem; max-width: 20rem; flex-shrink: 0; } +.sidebar input { width: 100%; box-sizing: border-box; margin: .5rem 0; + font-size: inherit; } .sidebar h2 { margin: 0.5em 0 0.25em 0; padding: 0; font-size: 1.2rem; } .sidebar ul { margin: .5rem 0; padding: 0; } -- cgit v1.2.3-70-g09d2