diff --git a/.gitignore b/.gitignore index 73e8f22cf0d39c706e7cdce5e39f1903a0f9181b..4c7073f9fac0c30fd2050d79a60ef447af58ebeb 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ .DS_Store data/ repomix-output.xml +dev-data/ diff --git a/bb.edn b/bb.edn index 1e8ec120921761a9a4f28f36578efb1567407cb3..43cc60c9461466e0f7cb08cfea5c600edf95a662 100644 --- a/bb.edn +++ b/bb.edn @@ -9,11 +9,10 @@ :task (do (deref (p/process ["mkdir" "-p" "dev-data"] {:inherit true})) (deref (p/process ["cargo" "watch" - "-x" "run -p server" + "-x" "run -p sorter2-server" "-w" "server/"] {:inherit true :env (merge (into {} (System/getenv)) - {"SLUG_DATA_DIR" "dev-data" - "SLUG_KEYS" "dev:dev" - "PORT" "8080" - "RUST_LOG" "info"})})))}}} + {"SORTER2_DATA_DIR" "dev-data" + "PORT" "8080" + "RUST_LOG" "info"})})))}}} diff --git a/server/src/html/mod.rs b/server/src/html/mod.rs index 322dffefeaa3b8560c1c2b2f70ba8e5a8c555022..0acba3ac745f23be473243e0a9b9cc6e57e8d86f 100644 --- a/server/src/html/mod.rs +++ b/server/src/html/mod.rs @@ -232,7 +232,8 @@ pub fn input_panel(query: &str, error: Option<&str>) -> Markup { html! { section id="parser-panel" class="demo-panel" { form method="post" action="/ui" id="parser-form" { - textarea + input + type="text" name="query" id="parser-input" rows="3" diff --git a/server/static/sorter.css b/server/static/sorter.css index 04f4fabdea3de7c3bc54805d0d3d9e0cea6eeefd..a648e88a57290346b1069868134a212b180def52 100644 --- a/server/static/sorter.css +++ b/server/static/sorter.css @@ -34,29 +34,20 @@ body { font-size: 0.75rem; } -.demo-panel { - max-width: 40rem; - margin: 4rem auto 2rem; - padding: 2rem; - background: var(--panel); - border: 1px solid var(--border); - border-radius: 8px; -} - -.demo-panel h1 { - margin-top: 0; -} - .btn-primary { background: var(--accent); color: #0f1115; - border: none; + border-style: outset; + border-width: 3px; padding: 0.5rem 1rem; - border-radius: 4px; font-size: 1rem; cursor: pointer; } +.btn-primary:active { + border-style: inset; +} + .btn-primary:hover { filter: brightness(1.1); } @@ -103,11 +94,15 @@ code { color: var(--muted); } +#parser-panel { + display: flex; + flex-direction: column; +} + #parser-input { - width: 100%; + width: 90%; padding: 0.5rem; border: 1px solid var(--border); - border-radius: 4px; background: var(--bg); color: var(--fg); font-size: 1rem; @@ -115,7 +110,12 @@ code { resize: vertical; } +#parser-input:focus-visible { + outline: 0; +} + #parser-form .btn-primary { + width: 10%; margin-top: 0.5rem; }