[WV2] Simplify item search layout
This commit is contained in:
parent
74386b45d7
commit
955aeb984e
1 changed files with 20 additions and 20 deletions
|
|
@ -85,8 +85,6 @@
|
||||||
= submit_tag "Change pose", name: nil, class: "pose-submit-button"
|
= submit_tag "Change pose", name: nil, class: "pose-submit-button"
|
||||||
|
|
||||||
.outfit-controls-section
|
.outfit-controls-section
|
||||||
%h1 Customize your pet
|
|
||||||
|
|
||||||
= form_with url: wardrobe_v2_path, method: :get, class: "item-search-form" do |f|
|
= form_with url: wardrobe_v2_path, method: :get, class: "item-search-form" do |f|
|
||||||
= outfit_state_params
|
= outfit_state_params
|
||||||
= f.text_field "q[name]", placeholder: "Search for items...", value: params.dig(:q, :name), "aria-label": "Search for items"
|
= f.text_field "q[name]", placeholder: "Search for items...", value: params.dig(:q, :name), "aria-label": "Search for items"
|
||||||
|
|
@ -94,21 +92,23 @@
|
||||||
|
|
||||||
- if @search_mode
|
- if @search_mode
|
||||||
= render "search_results"
|
= render "search_results"
|
||||||
- elsif @outfit.worn_items.any?
|
- else
|
||||||
.worn-items
|
%h1 Untitled outfit
|
||||||
- outfit_items_by_zone(@outfit).each do |zone_group|
|
- if @outfit.worn_items.any?
|
||||||
.zone-group
|
.worn-items
|
||||||
%h3.zone-label= zone_group[:zone_label]
|
- outfit_items_by_zone(@outfit).each do |zone_group|
|
||||||
%ul.items-list
|
.zone-group
|
||||||
- zone_group[:items].each do |item|
|
%h3.zone-label= zone_group[:zone_label]
|
||||||
%li.item-card
|
%ul.items-list
|
||||||
.item-thumbnail
|
- zone_group[:items].each do |item|
|
||||||
= image_tag item.thumbnail_url, alt: item.name, loading: "lazy"
|
%li.item-card
|
||||||
.item-info
|
.item-thumbnail
|
||||||
.item-name= item.name
|
= image_tag item.thumbnail_url, alt: item.name, loading: "lazy"
|
||||||
.item-badges
|
.item-info
|
||||||
= render "items/badges/kind", item: item
|
.item-name= item.name
|
||||||
= render "items/badges/first_seen", item: item
|
.item-badges
|
||||||
= button_to wardrobe_v2_path, method: :get, class: "item-remove-button", title: "Remove #{item.name}", "aria-label": "Remove #{item.name}" do
|
= render "items/badges/kind", item: item
|
||||||
❌
|
= render "items/badges/first_seen", item: item
|
||||||
= outfit_state_params @outfit.without_item(item)
|
= button_to wardrobe_v2_path, method: :get, class: "item-remove-button", title: "Remove #{item.name}", "aria-label": "Remove #{item.name}" do
|
||||||
|
❌
|
||||||
|
= outfit_state_params @outfit.without_item(item)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue