all repos — searchix @ 0945da8f9654252008ff6bd56022f9363fd3cca6

Search engine for NixOS, nix-darwin, home-manager and NUR users

feat: add basic input frontend

Alan Pearce
commit

0945da8f9654252008ff6bd56022f9363fd3cca6

parent

670f9dbd8d9b54d52b50cb2c7662b674d0aeb357

4 files changed, 24 insertions(+), 4 deletions(-)

jump to
M .gitignore.gitignore
@@ -22,3 +22,4 @@
/.env /.envrc /.pre-commit-config.yaml +/frontend/static/base.css
A frontend/static/style.css
@@ -0,0 +1,7 @@
+form { + display: flex; +} + +input[type="search"] { + width: 100%; +}
M frontend/templates/index.tmplfrontend/templates/index.tmpl
@@ -1,12 +1,24 @@
<!doctype html> <html lang="en-GB"> <head> - <meta charset="UTF-8" /> + <meta charset="utf-8" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Searchix</title> - <link href="/static/style.css" rel="stylesheet"/> + <link href="/static/base.css" rel="stylesheet" /> + <link href="/static/style.css" rel="stylesheet" /> </head> <body> - <h1>Searchix</h1> + <header> + <h1>Searchix</h1> + <p>Search Nix Packages and options from NixOS, Darwin and Home-Manager</p> + </header> + <main> + <label for="query">Search </label> + <form> + <input id="query" name="query" type="search" value="" /> + <button>Search</button> + </form> + </main> {{ .LiveReload }} </body> </html>
M justfilejustfile
@@ -2,7 +2,7 @@ default:
@just --list --justfile {{ justfile() }} --unsorted prepare: - ln -sf $(nix-build --no-out-link -A css) frontend/static/style.css + ln -sf $(nix-build --no-out-link -A css) frontend/static/base.css checkformat: gofmt -d .