impress/app/views/wardrobe/show.html.haml

61 lines
2.2 KiB
Text
Raw Normal View History

2025-11-02 00:43:54 -07:00
- title "Wardrobe v2"
!!! 5
%html
%head
%meta{charset: 'utf-8'}
%meta{name: 'viewport', content: 'width=device-width, initial-scale=1'}
%title= yield :title
%link{href: image_path('favicon.png'), rel: 'icon'}
= stylesheet_link_tag "application/hanger-spinner"
= stylesheet_link_tag "application/outfit-viewer"
2025-11-11 17:21:03 -08:00
= page_stylesheet_link_tag "wardrobe/show"
2025-11-02 00:43:54 -07:00
= javascript_include_tag "application", async: true
= javascript_include_tag "idiomorph", async: true
= javascript_include_tag "outfit-viewer", async: true
= javascript_include_tag "species-color-picker", async: true
2025-11-11 17:41:57 -08:00
= javascript_include_tag "pose-picker", async: true
2025-11-11 17:21:03 -08:00
= javascript_include_tag "wardrobe/show", async: true
2025-11-02 01:55:17 -07:00
= csrf_meta_tags
%meta{name: 'outfit-viewer-morph-mode', value: 'full-page'}
2025-11-02 00:43:54 -07:00
%body.wardrobe-v2
2025-11-02 01:55:17 -07:00
.wardrobe-container
.outfit-preview-section
- if @pet_type.nil?
.no-preview-message
%p
We haven't seen this kind of pet before! Try a different species/color
combination.
- else
= outfit_viewer @outfit
2025-11-02 00:43:54 -07:00
2025-11-11 18:07:06 -08:00
.preview-controls
2025-12-26 23:19:39 -08:00
= render "species_color_picker"
2025-11-11 17:41:57 -08:00
2025-11-11 18:07:06 -08:00
- if @pet_type
2025-12-26 23:19:39 -08:00
= render "pose_picker"
2025-11-02 00:43:54 -07:00
2025-11-02 01:55:17 -07:00
.outfit-controls-section
2025-12-26 23:01:40 -08:00
.item-search-form
- if @search_mode
= button_to wardrobe_v2_path, method: :get, class: "back-button" do
= outfit_state_params except: [:q]
= form_with url: wardrobe_v2_path, method: :get, class: "search-form" do |f|
= outfit_state_params
= f.text_field "q[name]", placeholder: "Search for items...", value: params.dig(:q, :name), "aria-label": "Search for items"
= f.submit "Search"
2025-11-02 23:04:59 -08:00
- if @search_mode
= render "search_results"
2025-12-26 22:43:17 -08:00
- else
%h1 Untitled outfit
- if @outfit.worn_items.any?
.worn-items
- outfit_items_by_zone(@outfit).each do |zone_group|
.zone-group
%h3.zone-label= zone_group[:zone_label]
%ul.items-list
- zone_group[:items].each do |item|
2025-12-26 23:19:39 -08:00
= render "item_card", item: item