Replace search bar with title and New Search button on results page
Header now shows "Search results for: <keyword>" with meta stats, and a "New Search" button that navigates back to the homepage. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -117,25 +117,19 @@
|
||||
|
||||
<div class="h-full flex flex-col max-w-[1400px] mx-auto w-full">
|
||||
<!-- Header -->
|
||||
<div class="flex-shrink-0 border-b border-surface-border px-6 py-3 flex items-center gap-4">
|
||||
<form onsubmit={handleSearch} class="flex-1">
|
||||
<div class="relative group">
|
||||
<svg class="absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-text-tertiary"
|
||||
fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" />
|
||||
</svg>
|
||||
<input type="text" bind:value={query} placeholder="Search products..."
|
||||
class="w-full pl-9 pr-3 py-1.5 bg-surface-raised border border-surface-border rounded text-sm
|
||||
text-text-primary placeholder-text-tertiary focus:border-accent/50 focus:outline-none transition-colors" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="flex-shrink-0 border-b border-surface-border px-6 py-3 flex items-center justify-between">
|
||||
<div class="flex items-center gap-2">
|
||||
<h1 class="text-sm font-semibold text-text-primary">Search results for:
|
||||
<span class="text-accent-text">{query}</span>
|
||||
</h1>
|
||||
{#if meta}
|
||||
<span class="text-2xs text-text-tertiary whitespace-nowrap">
|
||||
{meta.totalResults} results from {meta.storeCount} stores in {meta.duration}ms
|
||||
<span class="text-2xs text-text-tertiary">
|
||||
({meta.totalResults} results from {meta.storeCount} stores in {meta.duration}ms)
|
||||
</span>
|
||||
{/if}
|
||||
</div>
|
||||
<a href="/" class="btn-secondary text-xs py-1">New Search</a>
|
||||
</div>
|
||||
|
||||
<!-- Errors -->
|
||||
{#if meta?.errors?.length > 0}
|
||||
|
||||
Reference in New Issue
Block a user