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:
mariosemes
2026-03-26 21:52:22 +01:00
parent ac05e83bdd
commit acda8d5270

View File

@@ -117,24 +117,18 @@
<div class="h-full flex flex-col max-w-[1400px] mx-auto w-full"> <div class="h-full flex flex-col max-w-[1400px] mx-auto w-full">
<!-- Header --> <!-- Header -->
<div class="flex-shrink-0 border-b border-surface-border px-6 py-3 flex items-center gap-4"> <div class="flex-shrink-0 border-b border-surface-border px-6 py-3 flex items-center justify-between">
<form onsubmit={handleSearch} class="flex-1"> <div class="flex items-center gap-2">
<div class="relative group"> <h1 class="text-sm font-semibold text-text-primary">Search results for:
<svg class="absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-text-tertiary" <span class="text-accent-text">{query}</span>
fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"> </h1>
<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" /> {#if meta}
</svg> <span class="text-2xs text-text-tertiary">
<input type="text" bind:value={query} placeholder="Search products..." ({meta.totalResults} results from {meta.storeCount} stores in {meta.duration}ms)
class="w-full pl-9 pr-3 py-1.5 bg-surface-raised border border-surface-border rounded text-sm </span>
text-text-primary placeholder-text-tertiary focus:border-accent/50 focus:outline-none transition-colors" /> {/if}
</div> </div>
</form> <a href="/" class="btn-secondary text-xs py-1">New Search</a>
{#if meta}
<span class="text-2xs text-text-tertiary whitespace-nowrap">
{meta.totalResults} results from {meta.storeCount} stores in {meta.duration}ms
</span>
{/if}
</div> </div>
<!-- Errors --> <!-- Errors -->