x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<div class="grid w-[56rem] max-w-full gap-10">
<div class="grid content-start gap-2">
<p class="text-xs font-semibold text-ink-muted">Run a search</p>
<div class="grid gap-4 rounded-card border border-line bg-surface p-5">
<div class="grid gap-2 sm:grid-cols-[8rem_1fr] sm:items-baseline">
<p class="text-[13px] font-semibold text-ink-muted">Price</p>
<div class="flex flex-wrap gap-2">
<form class="contents" action="/searches" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="drT1qg1Pgwr85mfuBuPN3_O48YEwRGQvLc2k0Zt6A7sQqyFHFkR86Bhx10TSlTf2AyCm9E4VzmfHXW-h6Fr76g" /><input type="hidden" name="engine" value="google_shopping" /><input type="hidden" name="q" value="espresso machine" /><input type="hidden" name="gl" value="us" /><input type="hidden" name="shoprs" value="a1" /><button name="button" type="submit" class="inline-flex h-9 items-center rounded-full border border-line-strong bg-surface px-4 text-sm text-ink-soft shadow-field transition-colors hover:border-ink-faint hover:text-ink" data-engine="google_shopping">Under $300</button></form>
<form class="contents" action="/searches" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="T_PR0EUL9sWTk8suBVZUiGpCncUOPn2nNxVotDPfObkp7AU9XgAJJ3cEe4TRIK6hmtrKsHBv1-_dhaPEQP_B6A" /><input type="hidden" name="engine" value="google_shopping" /><input type="hidden" name="q" value="espresso machine" /><input type="hidden" name="gl" value="us" /><input type="hidden" name="shoprs" value="a2" /><button name="button" type="submit" class="inline-flex h-9 items-center rounded-full border border-line-strong bg-surface px-4 text-sm text-ink-soft shadow-field transition-colors hover:border-ink-faint hover:text-ink" data-engine="google_shopping">$300 to $800</button></form>
<form class="contents" action="/searches" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="YUOozg2kd_1NBAd3rIQZ9aijpzWhIEz6rsWRqyxU19gHXHwjFq-IH6mTt9148uPcWDvwQN9x5rJEVVrbX3QviQ" /><input type="hidden" name="engine" value="google_shopping" /><input type="hidden" name="q" value="espresso machine" /><input type="hidden" name="gl" value="us" /><input type="hidden" name="shoprs" value="a3" /><button name="button" type="submit" class="inline-flex h-9 items-center rounded-full border border-line-strong bg-surface px-4 text-sm text-ink-soft shadow-field transition-colors hover:border-ink-faint hover:text-ink" data-engine="google_shopping">Over $800</button></form>
</div>
</div>
<div class="grid gap-2 sm:grid-cols-[8rem_1fr] sm:items-baseline">
<p class="text-[13px] font-semibold text-ink-muted">Brand</p>
<div class="flex flex-wrap gap-2">
<form class="contents" action="/searches" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="NH0bpB9vpAI8JLNfVmdfuyactPUcH_mr0xw_63g7o-RSYs9JBGRb4NizA_WCEaWS1gTjgGJOU-M5jPSbCxtbtQ" /><input type="hidden" name="engine" value="google_shopping" /><input type="hidden" name="q" value="espresso machine" /><input type="hidden" name="gl" value="us" /><input type="hidden" name="shoprs" value="b1" /><button name="button" type="submit" class="inline-flex h-9 items-center rounded-full border border-line-strong bg-surface px-4 text-sm text-ink-soft shadow-field transition-colors hover:border-ink-faint hover:text-ink" data-engine="google_shopping">Breville</button></form>
<form class="contents" action="/searches" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="JsM0P1Wb3fIVxss9Bx0JtNVi_2bG8W9c6DQGDDTzjn1A3ODSTpAiEPFRe5fTa_OdJfqoE7igxRQCpM18R9N2LA" /><input type="hidden" name="engine" value="google_shopping" /><input type="hidden" name="q" value="espresso machine" /><input type="hidden" name="gl" value="us" /><input type="hidden" name="shoprs" value="b2" /><button name="button" type="submit" class="inline-flex h-9 items-center rounded-full border border-line-strong bg-surface px-4 text-sm text-ink-soft shadow-field transition-colors hover:border-ink-faint hover:text-ink" data-engine="google_shopping">De'Longhi</button></form>
<form class="contents" action="/searches" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="lZ9jHX3BUFW2-BARNgMnKDdXnlceXVZ0rPYUsSG11dzzgLfwZsqvt1JvoLvidd0Bx8_JImAM_DxGZt_BUpUtjQ" /><input type="hidden" name="engine" value="google_shopping" /><input type="hidden" name="q" value="espresso machine" /><input type="hidden" name="gl" value="us" /><input type="hidden" name="shoprs" value="b3" /><button name="button" type="submit" class="inline-flex h-9 items-center rounded-full border border-line-strong bg-surface px-4 text-sm text-ink-soft shadow-field transition-colors hover:border-ink-faint hover:text-ink" data-engine="google_shopping">Gaggia</button></form>
<form class="contents" action="/searches" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="LkrlBW3w0YxLfhtNEd84LvnBq7lAV64KS1rbs7tKGZpIVTHodvsubq_pq-fFqcIHCVn8zD4GBEKhyhDDyGrhyw" /><input type="hidden" name="engine" value="google_shopping" /><input type="hidden" name="q" value="espresso machine" /><input type="hidden" name="gl" value="us" /><input type="hidden" name="shoprs" value="b4" /><button name="button" type="submit" class="inline-flex h-9 items-center rounded-full border border-line-strong bg-surface px-4 text-sm text-ink-soft shadow-field transition-colors hover:border-ink-faint hover:text-ink" data-engine="google_shopping">Rancilio</button></form>
</div>
</div>
</div>
</div>
<div class="grid content-start gap-2">
<p class="text-xs font-semibold text-ink-muted">Read only</p>
<div class="grid gap-4 rounded-card border border-line bg-surface p-5">
<div class="grid gap-2 sm:grid-cols-[8rem_1fr] sm:items-baseline">
<p class="text-[13px] font-semibold text-ink-muted">Price</p>
<div class="flex flex-wrap gap-2">
<span class="inline-flex h-9 items-center rounded-full border border-line-strong bg-surface px-4 text-sm text-ink-soft">Under $300</span>
<span class="inline-flex h-9 items-center rounded-full border border-line-strong bg-surface px-4 text-sm text-ink-soft">$300 to $800</span>
<span class="inline-flex h-9 items-center rounded-full border border-line-strong bg-surface px-4 text-sm text-ink-soft">Over $800</span>
</div>
</div>
<div class="grid gap-2 sm:grid-cols-[8rem_1fr] sm:items-baseline">
<p class="text-[13px] font-semibold text-ink-muted">Brand</p>
<div class="flex flex-wrap gap-2">
<span class="inline-flex h-9 items-center rounded-full border border-line-strong bg-surface px-4 text-sm text-ink-soft">Breville</span>
<span class="inline-flex h-9 items-center rounded-full border border-line-strong bg-surface px-4 text-sm text-ink-soft">De'Longhi</span>
<span class="inline-flex h-9 items-center rounded-full border border-line-strong bg-surface px-4 text-sm text-ink-soft">Gaggia</span>
<span class="inline-flex h-9 items-center rounded-full border border-line-strong bg-surface px-4 text-sm text-ink-soft">Rancilio</span>
</div>
</div>
</div>
</div>
</div>
1
2
3
4
5
<% filters = [ { "type" => "Price", "options" => [ { "text" => "Under $300", "shoprs" => "a1" }, { "text" => "$300 to $800", "shoprs" => "a2" }, { "text" => "Over $800", "shoprs" => "a3" } ] }, { "type" => "Brand", "options" => [ { "text" => "Breville", "shoprs" => "b1" }, { "text" => "De'Longhi", "shoprs" => "b2" }, { "text" => "Gaggia", "shoprs" => "b3" }, { "text" => "Rancilio", "shoprs" => "b4" } ] } ] %>
<div class="grid w-[56rem] max-w-full gap-10">
<div class="grid content-start gap-2"><p class="text-xs font-semibold text-ink-muted">Run a search</p><%= render Results::FiltersComponent.new(items: filters, engine: "google_shopping", query: "espresso machine", carry: { gl: "us" }) %></div>
<div class="grid content-start gap-2"><p class="text-xs font-semibold text-ink-muted">Read only</p><%= render Results::FiltersComponent.new(items: filters, engine: "google_shopping", query: "espresso machine") %></div>
</div>