aboutsummaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2024-01-22 19:29:51 +0100
committerPřemysl Eric Janouch <p@janouch.name>2024-01-22 19:52:35 +0100
commit083739fd4e227b8323a50d29055327ce9c5bfa2d (patch)
tree86e7fb22530e4dac108625650b8c4eba072c4b08 /public
parent4f174972e3f3040f78f87f2b96a0e7bfc94fed6e (diff)
downloadgallery-083739fd4e227b8323a50d29055327ce9c5bfa2d.tar.gz
gallery-083739fd4e227b8323a50d29055327ce9c5bfa2d.tar.xz
gallery-083739fd4e227b8323a50d29055327ce9c5bfa2d.zip
gallery: implement AND/NOT for tag search
Diffstat (limited to 'public')
-rw-r--r--public/gallery.js6
-rw-r--r--public/style.css2
2 files changed, 7 insertions, 1 deletions
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; }