diff options
Diffstat (limited to 'public')
-rw-r--r-- | public/gallery.js | 6 | ||||
-rw-r--r-- | public/style.css | 2 |
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; } |