workarea-one_theme 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.editorconfig +20 -0
- data/.eslintignore +1 -0
- data/.eslintrc +25 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
- data/.github/ISSUE_TEMPLATE/documentation-request.md +17 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- data/.github/workflows/ci.yml +60 -0
- data/.gitignore +21 -0
- data/.rubocop.yml +3 -0
- data/.stylelintrc.json +8 -0
- data/CHANGELOG.md +267 -0
- data/CODE_OF_CONDUCT.md +3 -0
- data/CONTRIBUTING.md +3 -0
- data/Gemfile +20 -0
- data/LICENSE.md +3 -0
- data/README.md +173 -0
- data/Rakefile +63 -0
- data/app/assets/fonts/workarea/storefront/Hind/hind_bold_webfont.woff +0 -0
- data/app/assets/fonts/workarea/storefront/Hind/hind_bold_webfont.woff2 +0 -0
- data/app/assets/fonts/workarea/storefront/Hind/hind_regular_webfont.woff +0 -0
- data/app/assets/fonts/workarea/storefront/Hind/hind_regular_webfont.woff2 +0 -0
- data/app/assets/fonts/workarea/storefront/Muli/muli_bold_webfont.woff +0 -0
- data/app/assets/fonts/workarea/storefront/Muli/muli_bold_webfont.woff2 +0 -0
- data/app/assets/fonts/workarea/storefront/Muli/muli_bolditalic_webfont.woff +0 -0
- data/app/assets/fonts/workarea/storefront/Muli/muli_bolditalic_webfont.woff2 +0 -0
- data/app/assets/fonts/workarea/storefront/Muli/muli_italic_webfont.woff +0 -0
- data/app/assets/fonts/workarea/storefront/Muli/muli_italic_webfont.woff2 +0 -0
- data/app/assets/fonts/workarea/storefront/Muli/muli_regular_webfont.woff +0 -0
- data/app/assets/fonts/workarea/storefront/Muli/muli_regular_webfont.woff2 +0 -0
- data/app/assets/fonts/workarea/storefront/Playfair_Display/playfairdisplay_bold_webfont.woff +0 -0
- data/app/assets/fonts/workarea/storefront/Playfair_Display/playfairdisplay_bold_webfont.woff2 +0 -0
- data/app/assets/fonts/workarea/storefront/Playfair_Display/playfairdisplay_bolditalic_webfont.woff +0 -0
- data/app/assets/fonts/workarea/storefront/Playfair_Display/playfairdisplay_bolditalic_webfont.woff2 +0 -0
- data/app/assets/fonts/workarea/storefront/Playfair_Display/playfairdisplay_italic_webfont.woff +0 -0
- data/app/assets/fonts/workarea/storefront/Playfair_Display/playfairdisplay_italic_webfont.woff2 +0 -0
- data/app/assets/fonts/workarea/storefront/Playfair_Display/playfairdisplay_regular_webfont.woff +0 -0
- data/app/assets/fonts/workarea/storefront/Playfair_Display/playfairdisplay_regular_webfont.woff2 +0 -0
- data/app/assets/fonts/workarea/storefront/Source_Serif_Pro/source_serif_pro_bold_webfont.woff +0 -0
- data/app/assets/fonts/workarea/storefront/Source_Serif_Pro/source_serif_pro_bold_webfont.woff2 +0 -0
- data/app/assets/fonts/workarea/storefront/Source_Serif_Pro/source_serif_pro_regular_webfont.woff +0 -0
- data/app/assets/fonts/workarea/storefront/Source_Serif_Pro/source_serif_pro_regular_webfont.woff2 +0 -0
- data/app/assets/fonts/workarea/storefront/lora/lora_bold_webfont.woff +0 -0
- data/app/assets/fonts/workarea/storefront/lora/lora_bold_webfont.woff2 +0 -0
- data/app/assets/fonts/workarea/storefront/lora/lora_bolditalic_webfont.woff +0 -0
- data/app/assets/fonts/workarea/storefront/lora/lora_bolditalic_webfont.woff2 +0 -0
- data/app/assets/fonts/workarea/storefront/lora/lora_italic_webfont.woff +0 -0
- data/app/assets/fonts/workarea/storefront/lora/lora_italic_webfont.woff2 +0 -0
- data/app/assets/fonts/workarea/storefront/lora/lora_regular_webfont.woff +0 -0
- data/app/assets/fonts/workarea/storefront/lora/lora_regular_webfont.woff2 +0 -0
- data/app/assets/fonts/workarea/storefront/roboto/roboto_bold_webfont.woff +0 -0
- data/app/assets/fonts/workarea/storefront/roboto/roboto_bold_webfont.woff2 +0 -0
- data/app/assets/fonts/workarea/storefront/roboto/roboto_italic_webfont.woff +0 -0
- data/app/assets/fonts/workarea/storefront/roboto/roboto_italic_webfont.woff2 +0 -0
- data/app/assets/fonts/workarea/storefront/roboto/roboto_regular_webfont.woff +0 -0
- data/app/assets/fonts/workarea/storefront/roboto/roboto_regular_webfont.woff2 +0 -0
- data/app/assets/images/workarea/admin/content_block_types/hero_slider.svg +1 -0
- data/app/assets/images/workarea/admin/content_block_types/taxonomy_with_category_summary.svg +1 -0
- data/app/assets/images/workarea/admin/content_block_types/taxonomy_with_products.svg +1 -0
- data/app/assets/images/workarea/storefront/dialog_close.svg +1 -0
- data/app/assets/images/workarea/storefront/icons/account.svg +1 -0
- data/app/assets/images/workarea/storefront/icons/arrow_left.svg +1 -0
- data/app/assets/images/workarea/storefront/icons/arrow_right.svg +1 -0
- data/app/assets/images/workarea/storefront/icons/cart.svg +1 -0
- data/app/assets/images/workarea/storefront/icons/chevron_down.svg +1 -0
- data/app/assets/images/workarea/storefront/icons/chevron_right.svg +1 -0
- data/app/assets/images/workarea/storefront/icons/search.svg +1 -0
- data/app/assets/images/workarea/storefront/logo.png +0 -0
- data/app/assets/javascripts/workarea/storefront/application.js.erb +147 -0
- data/app/assets/javascripts/workarea/storefront/clothing/modules/product_details_color_buttons.js +86 -0
- data/app/assets/javascripts/workarea/storefront/dependencies/jquery.payment.js +655 -0
- data/app/assets/javascripts/workarea/storefront/modules/address_region_fields.js +93 -0
- data/app/assets/javascripts/workarea/storefront/modules/cart_indicator.js +35 -0
- data/app/assets/javascripts/workarea/storefront/modules/checkout_primary_payments.js +136 -0
- data/app/assets/javascripts/workarea/storefront/modules/header_search_ui.js +64 -0
- data/app/assets/javascripts/workarea/storefront/modules/mobile_filters.js +79 -0
- data/app/assets/javascripts/workarea/storefront/modules/mobile_nav_button.js +137 -0
- data/app/assets/javascripts/workarea/storefront/modules/quantity_control.js +56 -0
- data/app/assets/javascripts/workarea/storefront/modules/utility_nav_dropdown.js +43 -0
- data/app/assets/javascripts/workarea/storefront/one_theme/config.js +20 -0
- data/app/assets/javascripts/workarea/storefront/product_quickview/templates/quickview_button.jst.ejs +3 -0
- data/app/assets/javascripts/workarea/storefront/reviews/modules/product_reviews_sort_menus.js +82 -0
- data/app/assets/javascripts/workarea/storefront/reviews/templates/sort_by_property.jst.ejs +19 -0
- data/app/assets/javascripts/workarea/storefront/templates/log_out_link.jst.ejs +1 -0
- data/app/assets/javascripts/workarea/storefront/templates/saved_addresses_property.jst.ejs +23 -0
- data/app/assets/stylesheets/jquery_ui/storefront/_ui_autocomplete.scss +17 -0
- data/app/assets/stylesheets/jquery_ui/storefront/_ui_dialog.scss +150 -0
- data/app/assets/stylesheets/jquery_ui/storefront/_ui_menu.scss +42 -0
- data/app/assets/stylesheets/one_theme/.keep +0 -0
- data/app/assets/stylesheets/workarea/storefront/base/_forms.scss +197 -0
- data/app/assets/stylesheets/workarea/storefront/base/_tables.scss +32 -0
- data/app/assets/stylesheets/workarea/storefront/blog/components/_blog_entry.scss +139 -0
- data/app/assets/stylesheets/workarea/storefront/blog/components/_blog_entry_summary.scss +90 -0
- data/app/assets/stylesheets/workarea/storefront/clothing/components/_color_options.scss +57 -0
- data/app/assets/stylesheets/workarea/storefront/clothing/components/_size_options.scss +123 -0
- data/app/assets/stylesheets/workarea/storefront/components/_account_dashboard.scss +33 -0
- data/app/assets/stylesheets/workarea/storefront/components/_box.scss +45 -0
- data/app/assets/stylesheets/workarea/storefront/components/_breadcrumbs.scss +27 -0
- data/app/assets/stylesheets/workarea/storefront/components/_button.scss +72 -0
- data/app/assets/stylesheets/workarea/storefront/components/_button_property.scss +41 -0
- data/app/assets/stylesheets/workarea/storefront/components/_cart.scss +26 -0
- data/app/assets/stylesheets/workarea/storefront/components/_category_summary_content_block.scss +78 -0
- data/app/assets/stylesheets/workarea/storefront/components/_checkout_addresses.scss +21 -0
- data/app/assets/stylesheets/workarea/storefront/components/_checkout_payment.scss +58 -0
- data/app/assets/stylesheets/workarea/storefront/components/_checkout_progress.scss +47 -0
- data/app/assets/stylesheets/workarea/storefront/components/_checkout_shipping.scss +15 -0
- data/app/assets/stylesheets/workarea/storefront/components/_checkout_step_summary.scss +47 -0
- data/app/assets/stylesheets/workarea/storefront/components/_color_box.scss +48 -0
- data/app/assets/stylesheets/workarea/storefront/components/_data_card.scss +70 -0
- data/app/assets/stylesheets/workarea/storefront/components/_hamburger.scss +107 -0
- data/app/assets/stylesheets/workarea/storefront/components/_header.scss +31 -0
- data/app/assets/stylesheets/workarea/storefront/components/_hero_slider_content_block.scss +75 -0
- data/app/assets/stylesheets/workarea/storefront/components/_loading.scss +92 -0
- data/app/assets/stylesheets/workarea/storefront/components/_mobile_filters.scss +42 -0
- data/app/assets/stylesheets/workarea/storefront/components/_mobile_nav.scss +146 -0
- data/app/assets/stylesheets/workarea/storefront/components/_option_button.scss +45 -0
- data/app/assets/stylesheets/workarea/storefront/components/_order_help_menu.scss +33 -0
- data/app/assets/stylesheets/workarea/storefront/components/_order_summary.scss +19 -0
- data/app/assets/stylesheets/workarea/storefront/components/_page_container.scss +31 -0
- data/app/assets/stylesheets/workarea/storefront/components/_page_content.scss +30 -0
- data/app/assets/stylesheets/workarea/storefront/components/_page_footer.scss +96 -0
- data/app/assets/stylesheets/workarea/storefront/components/_page_header.scss +188 -0
- data/app/assets/stylesheets/workarea/storefront/components/_page_messages.scss +36 -0
- data/app/assets/stylesheets/workarea/storefront/components/_page_sub_footer.scss +39 -0
- data/app/assets/stylesheets/workarea/storefront/components/_pagination.scss +10 -0
- data/app/assets/stylesheets/workarea/storefront/components/_payment_icon.scss +29 -0
- data/app/assets/stylesheets/workarea/storefront/components/_primary_nav.scss +99 -0
- data/app/assets/stylesheets/workarea/storefront/components/_product_detail_container.scss +19 -0
- data/app/assets/stylesheets/workarea/storefront/components/_product_details.scss +94 -0
- data/app/assets/stylesheets/workarea/storefront/components/_product_list.scss +182 -0
- data/app/assets/stylesheets/workarea/storefront/components/_product_list_content_block.scss +20 -0
- data/app/assets/stylesheets/workarea/storefront/components/_product_media.scss +109 -0
- data/app/assets/stylesheets/workarea/storefront/components/_product_prices.scss +45 -0
- data/app/assets/stylesheets/workarea/storefront/components/_product_summary.scss +92 -0
- data/app/assets/stylesheets/workarea/storefront/components/_promo_code_accordion.scss +13 -0
- data/app/assets/stylesheets/workarea/storefront/components/_property.scss +68 -0
- data/app/assets/stylesheets/workarea/storefront/components/_quantity_control.scss +77 -0
- data/app/assets/stylesheets/workarea/storefront/components/_result_filters.scss +57 -0
- data/app/assets/stylesheets/workarea/storefront/components/_select_menu.scss +68 -0
- data/app/assets/stylesheets/workarea/storefront/components/_svg_icon.scss +78 -0
- data/app/assets/stylesheets/workarea/storefront/components/_taxonomy_content_block.scss +173 -0
- data/app/assets/stylesheets/workarea/storefront/components/_text_box.scss +57 -0
- data/app/assets/stylesheets/workarea/storefront/components/_text_button.scss +19 -0
- data/app/assets/stylesheets/workarea/storefront/components/_utility_nav.scss +49 -0
- data/app/assets/stylesheets/workarea/storefront/components/_value.scss +51 -0
- data/app/assets/stylesheets/workarea/storefront/email/_settings.scss +23 -0
- data/app/assets/stylesheets/workarea/storefront/generic/_fonts.scss.erb +11 -0
- data/app/assets/stylesheets/workarea/storefront/objects/_content_wrapper.scss +23 -0
- data/app/assets/stylesheets/workarea/storefront/product_quickview/components/_quickview_button.scss +33 -0
- data/app/assets/stylesheets/workarea/storefront/reviews/components/_reviews.scss +66 -0
- data/app/assets/stylesheets/workarea/storefront/reviews/components/_write_review.scss +71 -0
- data/app/assets/stylesheets/workarea/storefront/settings/_colors.scss.erb +21 -0
- data/app/assets/stylesheets/workarea/storefront/settings/_font_families.scss.erb +6 -0
- data/app/assets/stylesheets/workarea/storefront/settings/_global.scss +39 -0
- data/app/assets/stylesheets/workarea/storefront/settings/_typography.scss +8 -0
- data/app/assets/stylesheets/workarea/storefront/settings/_z_indexes.scss +43 -0
- data/app/assets/stylesheets/workarea/storefront/share/components/_share_buttons.scss +22 -0
- data/app/assets/stylesheets/workarea/storefront/slick_slider/components/_slick_slider.scss +171 -0
- data/app/assets/stylesheets/workarea/storefront/swatches/components/_swatch_facet.scss +26 -0
- data/app/assets/stylesheets/workarea/storefront/swatches/components/_swatch_options.scss +55 -0
- data/app/assets/stylesheets/workarea/storefront/theme_config/_midnight_color_scheme.scss +110 -0
- data/app/assets/stylesheets/workarea/storefront/theme_config/_one_color_scheme.scss +104 -0
- data/app/assets/stylesheets/workarea/storefront/theme_config/_workarea_color_scheme.scss +105 -0
- data/app/assets/stylesheets/workarea/storefront/theme_config/fonts/_hind.scss +19 -0
- data/app/assets/stylesheets/workarea/storefront/theme_config/fonts/_lora.scss +33 -0
- data/app/assets/stylesheets/workarea/storefront/theme_config/fonts/_muli.scss +33 -0
- data/app/assets/stylesheets/workarea/storefront/theme_config/fonts/_playfair_display.scss +33 -0
- data/app/assets/stylesheets/workarea/storefront/theme_config/fonts/_roboto.scss +26 -0
- data/app/assets/stylesheets/workarea/storefront/theme_config/fonts/_source_serif_pro.scss +19 -0
- data/app/assets/stylesheets/workarea/storefront/tools/_checkout_section.scss +12 -0
- data/app/assets/stylesheets/workarea/storefront/tools/_full_bleed_container.scss +15 -0
- data/app/assets/stylesheets/workarea/storefront/typography/_headings.scss +81 -0
- data/app/assets/stylesheets/workarea/storefront/typography/_links.scss +27 -0
- data/app/assets/stylesheets/workarea/storefront/typography/_text.scss +30 -0
- data/app/helpers/workarea/storefront/one_theme_helper.rb +71 -0
- data/app/seeds/workarea/browse_navigation_seeds.rb +35 -0
- data/app/seeds/workarea/content_block_page_seeds.rb +22 -0
- data/app/seeds/workarea/theme_home_page_seeds.rb +58 -0
- data/app/seeds/workarea/theme_layout_content_seeds.rb +41 -0
- data/app/view_models/workarea/storefront/content_blocks/category_summary_view_model.decorator +21 -0
- data/app/view_models/workarea/storefront/content_blocks/hero_slider_block_view_model.rb +44 -0
- data/app/view_models/workarea/storefront/content_blocks/product_list_view_model.decorator +50 -0
- data/app/view_models/workarea/storefront/content_blocks/taxonomy_with_category_view_model.rb +49 -0
- data/app/view_models/workarea/storefront/content_blocks/taxonomy_with_products_view_model.rb +21 -0
- data/app/view_models/workarea/storefront/product_view_model.decorator +11 -0
- data/app/views/layouts/workarea/storefront/_wish_lists_link.html.haml +4 -0
- data/app/views/layouts/workarea/storefront/application.html.haml +211 -0
- data/app/views/layouts/workarea/storefront/checkout.html.haml +97 -0
- data/app/views/workarea/storefront/blog_comments/index.html.haml +31 -0
- data/app/views/workarea/storefront/blog_entries/_summary.html.haml +26 -0
- data/app/views/workarea/storefront/blog_entries/show.html.haml +85 -0
- data/app/views/workarea/storefront/blogs/_blog_navigation.html.haml +7 -0
- data/app/views/workarea/storefront/blogs/index.html.haml +47 -0
- data/app/views/workarea/storefront/cart_items/create.html.haml +66 -0
- data/app/views/workarea/storefront/carts/show.html.haml +175 -0
- data/app/views/workarea/storefront/categories/show.html.haml +105 -0
- data/app/views/workarea/storefront/checkouts/_gift_card_payment.html.haml +38 -0
- data/app/views/workarea/storefront/checkouts/_summary.html.haml +102 -0
- data/app/views/workarea/storefront/checkouts/addresses.html.haml +56 -0
- data/app/views/workarea/storefront/checkouts/confirmation.html.haml +58 -0
- data/app/views/workarea/storefront/checkouts/payment.html.haml +186 -0
- data/app/views/workarea/storefront/checkouts/shipping.html.haml +38 -0
- data/app/views/workarea/storefront/content_blocks/_blog_entry.html.haml +19 -0
- data/app/views/workarea/storefront/content_blocks/_category_summary.html.haml +20 -0
- data/app/views/workarea/storefront/content_blocks/_hero_slider.html.haml +15 -0
- data/app/views/workarea/storefront/content_blocks/_product_list.html.haml +11 -0
- data/app/views/workarea/storefront/content_blocks/_social_networks.html.haml +17 -0
- data/app/views/workarea/storefront/content_blocks/_taxonomy_with_category_summary.html.haml +26 -0
- data/app/views/workarea/storefront/content_blocks/_taxonomy_with_products.html.haml +26 -0
- data/app/views/workarea/storefront/menus/index.html.haml +17 -0
- data/app/views/workarea/storefront/orders/_summary.html.haml +286 -0
- data/app/views/workarea/storefront/products/_media.html.haml +22 -0
- data/app/views/workarea/storefront/products/_media_carousel.html.haml +25 -0
- data/app/views/workarea/storefront/products/_pricing.html.haml +40 -0
- data/app/views/workarea/storefront/products/_reviews.html.haml +27 -0
- data/app/views/workarea/storefront/products/_subscription_fields.html.haml +15 -0
- data/app/views/workarea/storefront/products/_summary.html.haml +16 -0
- data/app/views/workarea/storefront/products/_swatch_summary.html.haml +17 -0
- data/app/views/workarea/storefront/products/package_show.html.haml +46 -0
- data/app/views/workarea/storefront/products/show.html.haml +53 -0
- data/app/views/workarea/storefront/products/templates/_generic.html.haml +61 -0
- data/app/views/workarea/storefront/products/templates/_gift_card.html.haml +68 -0
- data/app/views/workarea/storefront/products/templates/_option_selects.html.haml +61 -0
- data/app/views/workarea/storefront/products/templates/_option_thumbnails.html.haml +67 -0
- data/app/views/workarea/storefront/products/templates/_swatches.html.haml +78 -0
- data/app/views/workarea/storefront/reviews/new.html.haml +72 -0
- data/app/views/workarea/storefront/searches/content.html.haml +78 -0
- data/app/views/workarea/storefront/searches/show.html.haml +97 -0
- data/app/views/workarea/storefront/shared/_address_fields.html.haml +109 -0
- data/app/views/workarea/storefront/shares/_share_buttons.html.haml +17 -0
- data/app/views/workarea/storefront/style_guides/base/_forms.html.haml +91 -0
- data/app/views/workarea/storefront/style_guides/components/_breadcrumbs.html.haml +13 -0
- data/app/views/workarea/storefront/style_guides/components/_button.html.haml +69 -0
- data/app/views/workarea/storefront/style_guides/components/_category_summary_content_block.html.haml +54 -0
- data/app/views/workarea/storefront/style_guides/components/_header.html.haml +18 -0
- data/app/views/workarea/storefront/style_guides/components/_hero_slider_content_block.html.haml +46 -0
- data/app/views/workarea/storefront/style_guides/components/_mobile_filters.html.haml +17 -0
- data/app/views/workarea/storefront/style_guides/components/_product_list_content_block.html.haml +46 -0
- data/app/views/workarea/storefront/style_guides/components/_product_summary.html.haml +47 -0
- data/app/views/workarea/storefront/style_guides/components/_svg_icon.html.haml +63 -0
- data/app/views/workarea/storefront/style_guides/components/_taxonomy_with_category_summary_content_block.html.haml +33 -0
- data/app/views/workarea/storefront/style_guides/components/_taxonomy_with_products_content_block.html.haml +33 -0
- data/app/views/workarea/storefront/style_guides/components/_text_box.html.haml +63 -0
- data/app/views/workarea/storefront/style_guides/settings/_color_variables.html.haml +79 -0
- data/app/views/workarea/storefront/style_guides/settings/color_schemes/_midnight_color_scheme.html.haml +7 -0
- data/app/views/workarea/storefront/style_guides/settings/color_schemes/_one_color_scheme.html.haml +7 -0
- data/app/views/workarea/storefront/style_guides/settings/color_schemes/_workarea_color_scheme.html.haml +8 -0
- data/app/views/workarea/storefront/style_guides/typography/_headings.html.haml +47 -0
- data/app/views/workarea/storefront/style_guides/typography/_links.html.haml +27 -0
- data/app/views/workarea/storefront/users/accounts/_wish_list_summary.html.haml +16 -0
- data/app/views/workarea/storefront/users/accounts/edit.html.haml +41 -0
- data/app/views/workarea/storefront/users/accounts/show.html.haml +118 -0
- data/app/views/workarea/storefront/users/credit_cards/edit.html.haml +74 -0
- data/app/views/workarea/storefront/users/credit_cards/new.html.haml +66 -0
- data/app/views/workarea/storefront/users/orders/index.html.haml +22 -0
- data/app/views/workarea/storefront/users/orders/show.html.haml +31 -0
- data/app/views/workarea/storefront/users/wish_lists/show.html.haml +136 -0
- data/app/views/workarea/storefront/wish_lists/show.html.haml +99 -0
- data/bin/rails +20 -0
- data/config/initializers/appends.rb +62 -0
- data/config/initializers/configuration.rb +9 -0
- data/config/initializers/content_block_types.rb +91 -0
- data/config/initializers/dragonfly.rb +50 -0
- data/config/initializers/seeds.rb +5 -0
- data/config/initializers/theme.rb +16 -0
- data/config/initializers/workarea.rb +3 -0
- data/config/locales/en.yml +26 -0
- data/config/routes.rb +2 -0
- data/lib/tasks/one_theme_tasks.rake +4 -0
- data/lib/workarea/one_theme.rb +24 -0
- data/lib/workarea/one_theme/engine.rb +13 -0
- data/lib/workarea/one_theme/version.rb +5 -0
- data/package.json +9 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/config/manifest.js +4 -0
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/jobs/application_job.rb +2 -0
- data/test/dummy/app/mailers/application_mailer.rb +4 -0
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +38 -0
- data/test/dummy/bin/update +29 -0
- data/test/dummy/bin/yarn +11 -0
- data/test/dummy/config.ru +5 -0
- data/test/dummy/config/application.rb +29 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/cable.yml +10 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +54 -0
- data/test/dummy/config/environments/production.rb +91 -0
- data/test/dummy/config/environments/test.rb +44 -0
- data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/test/dummy/config/initializers/assets.rb +14 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/workarea.rb +5 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +33 -0
- data/test/dummy/config/puma.rb +56 -0
- data/test/dummy/config/routes.rb +5 -0
- data/test/dummy/config/secrets.yml +32 -0
- data/test/dummy/config/spring.rb +6 -0
- data/test/dummy/db/seeds.rb +2 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/package.json +5 -0
- data/test/helpers/workarea/storefront/reviews_helper_test.decorator +11 -0
- data/test/integration/workarea/blog/wordpress_import_integration_test.decorator +27 -0
- data/test/integration/workarea/storefront/sharing_integration_test.decorator +40 -0
- data/test/integration/workarea/storefront/swatches_integration_test.decorator +28 -0
- data/test/system/workarea/admin/guest_browsing_system_test.decorator +40 -0
- data/test/system/workarea/storefront/analytics_system_test.decorator +51 -0
- data/test/system/workarea/storefront/browse_swatches_system_test.decorator +48 -0
- data/test/system/workarea/storefront/cart_items_system_test.decorator +98 -0
- data/test/system/workarea/storefront/categories_system_test.decorator +100 -0
- data/test/system/workarea/storefront/content_search_autocomplete_system_test.decorator +33 -0
- data/test/system/workarea/storefront/content_search_system_test.decorator +21 -0
- data/test/system/workarea/storefront/content_system_test.decorator +21 -0
- data/test/system/workarea/storefront/guest_checkout_system_test.decorator +37 -0
- data/test/system/workarea/storefront/logged_in_checkout_system_test.decorator +34 -0
- data/test/system/workarea/storefront/login_system_test.decorator +94 -0
- data/test/system/workarea/storefront/navigation_system_test.decorator +28 -0
- data/test/system/workarea/storefront/passwords_system_test.decorator +59 -0
- data/test/system/workarea/storefront/review_system_test.decorator +23 -0
- data/test/system/workarea/storefront/search_autocomplete_system_test.decorator +46 -0
- data/test/system/workarea/storefront/search_system_test.decorator +71 -0
- data/test/teaspoon_env.rb +6 -0
- data/test/test_helper.rb +10 -0
- data/test/view_models/workarea/storefront/taxonomy_with_category_view_model_test.rb +35 -0
- data/test/view_models/workarea/storefront/taxonomy_with_products_view_model_test.rb +28 -0
- data/workarea-one_theme.gemspec +33 -0
- data/yarn.lock +3290 -0
- metadata +582 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.product-media
|
|
2
|
+
- if product.images.length == 0
|
|
3
|
+
.product-details__primary-image
|
|
4
|
+
= link_to(product_image_url(product.primary_image, :zoom), target: '_blank', rel: 'noopener', class: 'product-details__primary-image-link', data: { dialog_button: '' }, style: intrinsic_ratio_product_image_styles(product.primary_image)) do
|
|
5
|
+
= image_tag product_image_url(product.primary_image, :detail), alt: 'View Larger Image', class: 'product-details__primary-image-link-image'
|
|
6
|
+
|
|
7
|
+
- else
|
|
8
|
+
.product-media__primary-image
|
|
9
|
+
= link_to(product_image_url(product.primary_image, :zoom), target: '_blank', rel: 'noopener', class: 'product-media__primary-image-link', data: { dialog_button: '' }, style: intrinsic_ratio_product_image_styles(product.primary_image)) do
|
|
10
|
+
%picture
|
|
11
|
+
%source{ srcset: product_image_url(product.primary_image, :detail), product_image_url(product.primary_image, :detail) => '1x', product_image_url(product.primary_image, :detail_retina) => '2x', media: "(min-width: #{Workarea.config.storefront_break_points[:medium]}px)" }
|
|
12
|
+
%source{ srcset: product_image_url(product.primary_image, :detail_mobile), product_image_url(product.primary_image, :detail_mobile) => '1x', product_image_url(product.primary_image, :detail_mobile_retina) => '2x' }
|
|
13
|
+
= image_tag product_image_url(product.primary_image, :detail), alt: t('workarea.storefront.products.image_alt_attribute', name: product.name), class: 'product-media__primary-image-link-image'
|
|
14
|
+
|
|
15
|
+
- if product.images.length > 1
|
|
16
|
+
.product-media__alt-images
|
|
17
|
+
.grid.grid--center
|
|
18
|
+
- product.images.each_with_index do |image, index|
|
|
19
|
+
.grid__cell{ class: product.alt_images_class }
|
|
20
|
+
.product-media__alt-image
|
|
21
|
+
- button_class = index == 0 ? 'product-media__alt-image-link product-media__alt-image-link--selected' : 'product-media__alt-image-link'
|
|
22
|
+
= link_to(image_tag(product_image_url(image, :small_thumb), alt: t('workarea.storefront.products.zoom')), product_image_url(image, :zoom), class: button_class, target: '_blank', rel: 'noopener', data: { alternate_image_button: { src: product_image_url(image, :detail) }.to_json })
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.product-media{ class: ('product-media--carousel' unless product.images.length < 2) }
|
|
2
|
+
.product-media__container
|
|
3
|
+
- if product.images.length == 0
|
|
4
|
+
.product-media__primary-image
|
|
5
|
+
= link_to(product_image_url(product.primary_image, :zoom), target: '_blank', rel: 'noopener', class: 'product-media__primary-image-link', data: { dialog_button: '' }, style: intrinsic_ratio_product_image_styles(product.primary_image)) do
|
|
6
|
+
= image_tag product_image_url(product.primary_image, :detail), alt: 'View Larger Image', class: 'product-media__primary-image-link-image'
|
|
7
|
+
|
|
8
|
+
- else
|
|
9
|
+
%ul.product-media__primary-image{ id: "#{product.id}_primary_media_carousel", data: { slick_slider: media_primary_image_slider_options(product.id) } }
|
|
10
|
+
- product.images.each_with_index do |image, index|
|
|
11
|
+
%li.product-media__primary-image-item
|
|
12
|
+
= link_to(product_image_url(image, :zoom), target: '_blank', rel: 'noopener', class: 'product-media__primary-image-link', data: { dialog_button: '' }, style: intrinsic_ratio_product_image_styles(product.primary_image)) do
|
|
13
|
+
%picture
|
|
14
|
+
%source{ srcset: product_image_url(image, :detail), product_image_url(image, :detail) => '1x', product_image_url(image, :detail_retina) => '2x', media: "(min-width: #{Workarea.config.storefront_break_points[:medium]}px)" }
|
|
15
|
+
%source{ srcset: product_image_url(image, :detail_mobile), product_image_url(image, :detail_mobile) => '1x', product_image_url(image, :detail_mobile_retina) => '2x' }
|
|
16
|
+
= image_tag product_image_url(image, :detail), alt: t('workarea.storefront.products.image_alt_attribute', name: product.name), class: 'product-media__primary-image-link-image'
|
|
17
|
+
|
|
18
|
+
- if product.images.length > 1
|
|
19
|
+
%ul.product-media__alt-image-list{ id: "#{product.id}_alt_media_carousel", data: { slick_slider: media_alt_image_slider_options(product.id) } }
|
|
20
|
+
- product.images.each_with_index do |image, index|
|
|
21
|
+
%li.product-media__alt-image
|
|
22
|
+
- button_class = index == 0 ? 'product-media__alt-image-link product-media__alt-image-link--selected' : 'product-media__alt-image-link'
|
|
23
|
+
= link_to(image_tag(product_image_url(image, :small_thumb), alt: t('workarea.storefront.products.zoom')), product_image_url(image, :zoom), class: button_class, target: '_blank', rel: 'noopener', data: { alternate_image_button: { src: product_image_url(image, :detail) }.to_json })
|
|
24
|
+
|
|
25
|
+
= append_partials('storefront.product_details_alt_images', product: product)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
- cache "#{product.cache_key}/prices", expires_in: Workarea.config.cache_expirations.product_pricing_fragment_cache do
|
|
2
|
+
- if product.one_price?
|
|
3
|
+
%p.product-prices__price
|
|
4
|
+
- if product.show_sell_range?
|
|
5
|
+
%span
|
|
6
|
+
= number_to_currency(product.sell_min_price)
|
|
7
|
+
%span – #{number_to_currency product.sell_max_price}
|
|
8
|
+
- else
|
|
9
|
+
%span
|
|
10
|
+
= number_to_currency(product.sell_min_price)
|
|
11
|
+
|
|
12
|
+
- else
|
|
13
|
+
|
|
14
|
+
%p.product-prices__price.product-prices__price--original
|
|
15
|
+
- if product.show_original_range?
|
|
16
|
+
%s #{number_to_currency product.original_min_price} – #{number_to_currency product.original_max_price}
|
|
17
|
+
- else
|
|
18
|
+
%s= number_to_currency product.original_min_price
|
|
19
|
+
|
|
20
|
+
- if product.on_sale?
|
|
21
|
+
%p.product-prices__price.product-prices__price--sale
|
|
22
|
+
- if product.show_sell_range?
|
|
23
|
+
%span
|
|
24
|
+
= number_to_currency(product.sell_min_price)
|
|
25
|
+
%span – #{number_to_currency product.sell_max_price}
|
|
26
|
+
- else
|
|
27
|
+
%span
|
|
28
|
+
= number_to_currency(product.sell_min_price)
|
|
29
|
+
|
|
30
|
+
- else
|
|
31
|
+
%p.product-prices__price
|
|
32
|
+
- if product.show_sell_range?
|
|
33
|
+
%span
|
|
34
|
+
= number_to_currency(product.sell_min_price)
|
|
35
|
+
%span – #{number_to_currency product.sell_max_price}
|
|
36
|
+
- else
|
|
37
|
+
%span
|
|
38
|
+
= number_to_currency(product.sell_min_price)
|
|
39
|
+
|
|
40
|
+
= append_partials('storefront.product_pricing', product: product)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
- if product.has_reviews?
|
|
2
|
+
#reviews.reviews
|
|
3
|
+
.reviews__header.grid.grid--middle
|
|
4
|
+
.grid__cell.grid__cell--50-at-medium
|
|
5
|
+
.grid.grid--middle.grid--auto
|
|
6
|
+
.grid__cell
|
|
7
|
+
%h2.reviews__heading= t('workarea.storefront.reviews.reviews', count: product.reviews.length)
|
|
8
|
+
|
|
9
|
+
.grid__cell
|
|
10
|
+
%p.reviews__write-action= link_to t('workarea.storefront.reviews.write_a_review'), new_product_review_path(product), class: 'button button--wide', data: { dialog_button: '' }
|
|
11
|
+
- if display_purchase_requirement_message
|
|
12
|
+
%span.reviews__write-purchase-requirement= t('workarea.storefront.reviews.purchase_requirement')
|
|
13
|
+
-# Review sort select injected here by product_reviews_sort_menus.js
|
|
14
|
+
|
|
15
|
+
%ol.reviews__review-group
|
|
16
|
+
- product.reviews.each do |review|
|
|
17
|
+
%li.reviews__review{ data: { product_review_section_entry: { rating: review.rating.to_f, createdAt: review.created_at.to_i }.to_json } }
|
|
18
|
+
= rating_stars(review.rating)
|
|
19
|
+
|
|
20
|
+
%h3.reviews__review-title= review.title
|
|
21
|
+
%p.reviews__review-body= review.body
|
|
22
|
+
.reviews__review-meta
|
|
23
|
+
%p.reviews__review-author
|
|
24
|
+
%span= review.user_info
|
|
25
|
+
- if review.verified?
|
|
26
|
+
%p.reviews__review-verified= t('workarea.storefront.reviews.verified_purchaser')
|
|
27
|
+
%p.reviews__review-date= local_time(review.created_at, format: :long, itemprop: 'datePublished')
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.grid__cell
|
|
2
|
+
- if product.subscribable?
|
|
3
|
+
%div{ data: { subscription_fields: '' } }
|
|
4
|
+
.button-property
|
|
5
|
+
.value
|
|
6
|
+
= check_box_tag :subscription, nil, params[:subscription], id: dom_id(product, 'subscription')
|
|
7
|
+
= label_tag dom_id(product, 'subscription'), nil, class: 'button-property__name' do
|
|
8
|
+
%span.button-property__text= t('workarea.storefront.products.subscribe')
|
|
9
|
+
= link_to t('workarea.storefront.products.subscription_info_link'), subscriptions_path
|
|
10
|
+
|
|
11
|
+
.property{ class: ('hidden' unless params[:subscription].present?) }
|
|
12
|
+
= label_tag :subscription_frequency, nil, class: 'property__name', for: dom_id(product, 'subscription_frequency') do
|
|
13
|
+
%span.property__text= t('workarea.storefront.products.subscription_frequency_options')
|
|
14
|
+
.value
|
|
15
|
+
= select_tag :subscription_frequency, options_for_select(subscription_frequency_options, params[:subscription_frequency]), id: dom_id(product, 'subscription_frequency')
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
- cache "#{product.cache_key}/summary", expires_in: 75.minutes do
|
|
2
|
+
.product-summary__media
|
|
3
|
+
.product-summary__media-container
|
|
4
|
+
= link_to product_path(product, product.browse_link_options), class: 'product-summary__media-link', style: intrinsic_ratio_product_image_styles(product.primary_image), data: { analytics_product_impression: product_impression_data(product), analytics: product_click_analytics_data(product).to_json } do
|
|
5
|
+
= image_tag(product_image_url(product.primary_image, :large_thumb), alt: product.name, class: 'product-summary__media-image')
|
|
6
|
+
|
|
7
|
+
.product-summary__info
|
|
8
|
+
%p.product-summary__name= link_to product.name, product_path(product, product.browse_link_options), data: { analytics: product_click_analytics_data(product).to_json }
|
|
9
|
+
|
|
10
|
+
.product-prices.product-prices--summary
|
|
11
|
+
= render 'workarea/storefront/products/pricing', product: product
|
|
12
|
+
|
|
13
|
+
= append_partials('storefront.product_summary', product: product)
|
|
14
|
+
|
|
15
|
+
.product-summary__overlay
|
|
16
|
+
= render 'workarea/storefront/products/quickview_button_placeholder', product: product
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
- if product.try(:display_browse_swatches?)
|
|
2
|
+
.swatch-options.swatch-options--small
|
|
3
|
+
%ul.swatch-options__group
|
|
4
|
+
- product.browse_swatch_option.selections.each do |selection|
|
|
5
|
+
- swatch = product.swatches_by_option[selection.optionize]
|
|
6
|
+
- swatch_content = render_browse_swatch(selection, swatch)
|
|
7
|
+
|
|
8
|
+
- if product.current_browse_selection?(selection)
|
|
9
|
+
%li.swatch-options__swatch.swatch-options__swatch--selected>
|
|
10
|
+
= swatch_content
|
|
11
|
+
- else
|
|
12
|
+
%li.swatch-options__swatch>
|
|
13
|
+
- selection_options = option_selection_url_for(product, product.browse_swatch_option, selection)
|
|
14
|
+
- product_path = product_path(product, product.browse_link_options.merge(selection_options))
|
|
15
|
+
|
|
16
|
+
= link_to product_path, title: selection, class: 'swatch-options__swatch-button', data: { product_summary_swatch: { url: summary_product_path(product, selection_options) }.to_json } do
|
|
17
|
+
= swatch_content
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
- @title = @product.browser_title
|
|
2
|
+
- @breadcrumbs = @product.breadcrumbs
|
|
3
|
+
- params[:sku] = nil # HACK: avoid issues with current_sku
|
|
4
|
+
|
|
5
|
+
- content_for :head do
|
|
6
|
+
- cache "#{@product.cache_key}/head", expires_in: 1.hour do
|
|
7
|
+
%meta{ property: 'recent-view', content: recent_view_content(product_id: @product.id) }
|
|
8
|
+
%meta{ property: 'global-id', content: @product.to_global_id.to_param }
|
|
9
|
+
= append_partials('storefront.product_head', product: @product)
|
|
10
|
+
|
|
11
|
+
%link{ href: product_path(@product), rel: 'canonical' }
|
|
12
|
+
|
|
13
|
+
- unless @product.meta_description.blank?
|
|
14
|
+
%meta{ name: :description, content: strip_tags(@product.meta_description) }
|
|
15
|
+
|
|
16
|
+
%meta{ property: 'og:url', content: url_for }
|
|
17
|
+
%meta{ property: 'og:title', content: @product.name }
|
|
18
|
+
%meta{ property: 'og:type', content: 'product' }
|
|
19
|
+
- @product.images.each do |image|
|
|
20
|
+
%meta{ property: 'og:image', content: product_image_url(image, :detail) }
|
|
21
|
+
- unless @product.meta_description.blank?
|
|
22
|
+
%meta{ property: 'og:description', content: strip_tags(@product.meta_description) }
|
|
23
|
+
|
|
24
|
+
- cache "#{@product.cache_key}/show", expires_in: 1.hour do
|
|
25
|
+
.view
|
|
26
|
+
.product-detail-container.product-detail-container--package{ itemscope: true, itemtype: 'http://schema.org/Product', data: { analytics: product_view_analytics_data(@product).to_json } }
|
|
27
|
+
|
|
28
|
+
.product-details{ class: "product-details--#{@product.template}" }
|
|
29
|
+
= render "workarea/storefront/products/templates/#{@product.template}", product: @product
|
|
30
|
+
|
|
31
|
+
.product-detail-packaged-products{ class: "product-detail-packaged-products--#{@product.template}" }
|
|
32
|
+
- @product.packaged_products.each do |product|
|
|
33
|
+
.product-detail-container__section
|
|
34
|
+
.product-details{ class: "product-details--#{product.template}", itemprop: 'isRelatedTo', itemscope: true, itemtype: 'http://schema.org/Product', data: { analytics: product_view_analytics_data(@product).to_json, packaged_product_id: product.id } }
|
|
35
|
+
= render "workarea/storefront/products/templates/#{product.template}", product: product
|
|
36
|
+
|
|
37
|
+
- if @product.recommendations.any?
|
|
38
|
+
%h2.recommendations__heading= t('workarea.storefront.recommendations.heading')
|
|
39
|
+
|
|
40
|
+
.grid{ data: { analytics: product_list_analytics_data('Product Recommendations').to_json } }
|
|
41
|
+
- @product.recommendations.each do |product|
|
|
42
|
+
.grid__cell.grid__cell--50.grid__cell--33-at-medium.grid__cell--16-at-wide
|
|
43
|
+
.product-summary.product-summary--small{ itemprop: 'isRelatedTo', itemscope: true, itemtype: 'http://schema.org/Product' }
|
|
44
|
+
= render 'workarea/storefront/products/summary', product: product
|
|
45
|
+
|
|
46
|
+
= append_partials('storefront.product_show', product: @product)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
- @title = @product.browser_title
|
|
2
|
+
- @breadcrumbs = @product.breadcrumbs
|
|
3
|
+
|
|
4
|
+
- content_for :head do
|
|
5
|
+
- cache "#{@product.cache_key}/head", expires_in: 1.hour do
|
|
6
|
+
%meta{ property: 'global-id', content: @product.to_global_id.to_param }
|
|
7
|
+
= append_partials('storefront.product_head', product: @product)
|
|
8
|
+
|
|
9
|
+
%link{ href: product_url(@product), rel: 'canonical' }
|
|
10
|
+
|
|
11
|
+
%meta{ name: :description, content: strip_tags(@product.meta_description) }
|
|
12
|
+
|
|
13
|
+
%meta{ property: 'og:url', content: url_for(only_path: false) }
|
|
14
|
+
%meta{ property: 'og:title', content: @product.name }
|
|
15
|
+
%meta{ property: 'og:type', content: 'product' }
|
|
16
|
+
- @product.images.each do |image|
|
|
17
|
+
%meta{ property: 'og:image', content: product_image_url(image, :detail) }
|
|
18
|
+
%meta{ property: 'og:image:secure_url', content: product_image_url(image, :detail) }
|
|
19
|
+
%meta{ property: 'og:description', content: strip_tags(@product.meta_description) }
|
|
20
|
+
|
|
21
|
+
- cache "#{@product.cache_key}/show", expires_in: 1.hour do
|
|
22
|
+
|
|
23
|
+
= render_schema_org(product_schema(@product, related_products: @product.recommendations))
|
|
24
|
+
|
|
25
|
+
.view
|
|
26
|
+
.product-detail-container{ data: { analytics: product_view_analytics_data(@product).to_json } }
|
|
27
|
+
|
|
28
|
+
.product-details{ class: "product-details--#{@product.template}" }
|
|
29
|
+
= render "workarea/storefront/products/templates/#{@product.template}", product: @product
|
|
30
|
+
|
|
31
|
+
.product-detail-container__section
|
|
32
|
+
- if @product.description.present?
|
|
33
|
+
.product-detail-container__description#description
|
|
34
|
+
.product-detail-container__description-body!= @product.description
|
|
35
|
+
|
|
36
|
+
%p.product-details__id
|
|
37
|
+
%span{ itemprop: 'productID' }= @product.id
|
|
38
|
+
|
|
39
|
+
= append_partials('storefront.product_description', product: @product)
|
|
40
|
+
|
|
41
|
+
= render 'workarea/storefront/products/share', product: @product
|
|
42
|
+
|
|
43
|
+
- if @product.recommendations.any?
|
|
44
|
+
.recommendations
|
|
45
|
+
%h2.recommendations__heading= t('workarea.storefront.recommendations.heading')
|
|
46
|
+
.recommendations__products
|
|
47
|
+
.grid.grid--flush{ data: { analytics: product_list_analytics_data('Product Recommendations').to_json } }
|
|
48
|
+
- @product.recommendations.each do |product|
|
|
49
|
+
.grid__cell.grid__cell--50.grid__cell--33-at-medium.grid__cell--16-at-wide
|
|
50
|
+
.product-summary.product-summary--small
|
|
51
|
+
= render 'workarea/storefront/products/summary', product: product
|
|
52
|
+
|
|
53
|
+
= append_partials('storefront.product_show', product: @product)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
.grid
|
|
2
|
+
.grid__cell.grid__cell--50-at-medium
|
|
3
|
+
= render 'workarea/storefront/products/media_carousel', product: product
|
|
4
|
+
|
|
5
|
+
.grid__cell.grid__cell--50-at-medium
|
|
6
|
+
.product-details__name
|
|
7
|
+
%h1.product-details__heading= product.name
|
|
8
|
+
|
|
9
|
+
.product-prices.product-prices--details
|
|
10
|
+
= render 'workarea/storefront/products/pricing', product: product
|
|
11
|
+
|
|
12
|
+
= form_tag cart_items_path, method: 'post', class: 'product-details__add-to-cart-form', data: { dialog_form: { dialogOptions: { closeAll: true, initModules: true } }, analytics: add_to_cart_analytics_data(product).to_json } do
|
|
13
|
+
= hidden_field_tag :product_id, product.id, id: dom_id(product, 'product_id')
|
|
14
|
+
= hidden_field_tag :via, params[:via], id: dom_id(product, 'via')
|
|
15
|
+
|
|
16
|
+
.grid.grid--middle
|
|
17
|
+
.grid__cell.grid__cell--60
|
|
18
|
+
.grid
|
|
19
|
+
.grid__cell
|
|
20
|
+
- if product.sku_options.one?
|
|
21
|
+
= hidden_field_tag :sku, product.sku_options.first.second
|
|
22
|
+
|
|
23
|
+
- else
|
|
24
|
+
.property
|
|
25
|
+
= label_tag :sku, nil, class: 'property__name', for: "sku_#{dom_id(product)}" do
|
|
26
|
+
%span.property__text= t('workarea.storefront.products.select_options')
|
|
27
|
+
.value
|
|
28
|
+
= select_tag :sku, options_for_select(product.sku_options, params[:sku]), required: true, id: "sku_#{dom_id(product)}", data: { product_details_sku_select: product.slug }
|
|
29
|
+
|
|
30
|
+
= append_partials('storefront.add_to_cart_form', product: product)
|
|
31
|
+
|
|
32
|
+
- if product.purchasable?
|
|
33
|
+
.grid__cell
|
|
34
|
+
.product-details__quantity
|
|
35
|
+
.property
|
|
36
|
+
= label_tag :quantity, nil, class: 'property__name', for: "quantity#{dom_id(product)}" do
|
|
37
|
+
%span.property__text= t('workarea.storefront.products.quantity')
|
|
38
|
+
.quantity-control
|
|
39
|
+
= button_tag '-', { type: 'button', data: { quantity_control: { 'direction': 'dec', 'autosubmit': false }.to_json }, class: 'quantity-control__button quantity-control__decrement'}
|
|
40
|
+
.value= number_field_tag :quantity, params[:quantity] || 1, class: 'quantity-control__input text-box text-box--x-small', required: true, min: 1, id: "quantity#{dom_id(product)}"
|
|
41
|
+
= button_tag '+', { type: 'button', data: { quantity_control: { 'direction': 'inc', 'autosubmit': false }.to_json }, class: 'quantity-control__button quantity-control__increment'}
|
|
42
|
+
|
|
43
|
+
.grid__cell
|
|
44
|
+
- if product.purchasable?
|
|
45
|
+
%p.product-details__add-to-cart-action= button_tag t('workarea.storefront.products.add_to_cart'), value: 'add_to_cart', class: 'button'
|
|
46
|
+
|
|
47
|
+
- else
|
|
48
|
+
= hidden_field_tag :quantity, params[:quantity] || 1, id: "quantity#{dom_id(product)}"
|
|
49
|
+
%p.product-details__unavailable= t('workarea.storefront.products.unavailable')
|
|
50
|
+
|
|
51
|
+
- if params[:sku].present?
|
|
52
|
+
%p.product-details__inventory-status= product.inventory_status
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
- if product.description.present?
|
|
56
|
+
.product-details__description
|
|
57
|
+
%p= truncated_product_description(product, t('workarea.storefront.products.read_more'))
|
|
58
|
+
|
|
59
|
+
= append_partials('storefront.product_details', product: product)
|
|
60
|
+
|
|
61
|
+
%p.product-details__full-details=link_to t('workarea.storefront.products.view_full_details'), product_path(product, color: params[:color]), class: 'text-button'
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
.grid
|
|
2
|
+
.grid__cell.grid__cell--50-at-medium
|
|
3
|
+
= render 'workarea/storefront/products/media_carousel', product: product
|
|
4
|
+
|
|
5
|
+
.grid__cell.grid__cell--50-at-medium
|
|
6
|
+
|
|
7
|
+
.product-details__name
|
|
8
|
+
%h1.product-details__heading= product.name
|
|
9
|
+
|
|
10
|
+
%p.product-details__id
|
|
11
|
+
%span= product.id
|
|
12
|
+
|
|
13
|
+
.product-prices.product-prices--details
|
|
14
|
+
= render 'workarea/storefront/products/pricing', product: product
|
|
15
|
+
|
|
16
|
+
- if product.description.present?
|
|
17
|
+
.product-details__description
|
|
18
|
+
%p= truncated_product_description(product, t('workarea.storefront.products.read_more'))
|
|
19
|
+
|
|
20
|
+
= form_tag cart_items_path, method: 'post', class: 'product-details__add-to-cart-form', data: { dialog_form: { dialogOptions: { closeAll: true, initModules: true } }, analytics: add_to_cart_analytics_data(product).to_json } do
|
|
21
|
+
= hidden_field_tag :product_id, product.id, id: dom_id(product, 'product_id')
|
|
22
|
+
= hidden_field_tag :via, params[:via], id: dom_id(product, 'via')
|
|
23
|
+
|
|
24
|
+
- if product.sku_options.one?
|
|
25
|
+
= hidden_field_tag :sku, product.sku_options.first.second
|
|
26
|
+
|
|
27
|
+
- else
|
|
28
|
+
.property
|
|
29
|
+
= label_tag :sku, nil, class: 'property__name', for: "sku_#{dom_id(product)}" do
|
|
30
|
+
%span.property__text= t('workarea.storefront.products.select_options')
|
|
31
|
+
.value
|
|
32
|
+
= select_tag :sku, options_for_select(product.sku_options, params[:sku]), required: true, id: "sku_#{dom_id(product)}", data: { product_details_sku_select: product.slug }
|
|
33
|
+
- if params[:sku].present?
|
|
34
|
+
.value__note= product.inventory_status
|
|
35
|
+
|
|
36
|
+
= hidden_field_tag :quantity, 1, id: "quantity#{dom_id(product)}"
|
|
37
|
+
|
|
38
|
+
.message.message--info
|
|
39
|
+
%p.message__type
|
|
40
|
+
%span.message__icon= t('workarea.storefront.messages.info')
|
|
41
|
+
%p.message__text= t('workarea.storefront.gift_cards.email_to_recipient')
|
|
42
|
+
|
|
43
|
+
.property
|
|
44
|
+
= label_tag :email, nil, class: "property__name", for: "email_#{dom_id(product)}" do
|
|
45
|
+
%span.property__text= t('workarea.storefront.gift_cards.recipients_email')
|
|
46
|
+
.value= email_field_tag :email, params[:email], class: 'text-box', required: true, id: "email_#{dom_id(product)}"
|
|
47
|
+
.property
|
|
48
|
+
= label_tag :from, nil, class: "property__name", for: "from_#{dom_id(product)}" do
|
|
49
|
+
%span.property__text= t('workarea.storefront.gift_cards.senders_email')
|
|
50
|
+
%span.property__requirement.property__requirement--optional= t('workarea.storefront.forms.optional')
|
|
51
|
+
.value= text_field_tag :from, params[:from], class: 'text-box', id: "from_#{dom_id(product)}", maxlength: 100
|
|
52
|
+
.property
|
|
53
|
+
= label_tag :message, nil, class: "property__name", for: "message_#{dom_id(product)}" do
|
|
54
|
+
%span.property__text= t('workarea.storefront.gift_cards.message_to_recipient')
|
|
55
|
+
%span.property__requirement.property__requirement--optional= t('workarea.storefront.forms.optional')
|
|
56
|
+
.value= text_area_tag :message, params[:message], class: 'text-box text-box--multi-line', id: "message_#{dom_id(product)}", maxlength: 500
|
|
57
|
+
|
|
58
|
+
- if product.purchasable?
|
|
59
|
+
%p.product-details__add-to-cart-action= button_tag t('workarea.storefront.products.add_to_cart'), value: 'add_to_cart', class: 'button button--large'
|
|
60
|
+
|
|
61
|
+
- else
|
|
62
|
+
%p.product-details__unavailable= t('workarea.storefront.products.unavailable')
|
|
63
|
+
|
|
64
|
+
= append_partials('storefront.add_to_cart_form', product: product)
|
|
65
|
+
|
|
66
|
+
= append_partials('storefront.product_details', product: product)
|
|
67
|
+
|
|
68
|
+
%p.product-details__full-details=link_to t('workarea.storefront.products.view_full_details'), product_path(product, color: params[:color]), class: 'text-button'
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
.grid
|
|
2
|
+
.grid__cell.grid__cell--50-at-medium
|
|
3
|
+
= render 'workarea/storefront/products/media_carousel', product: product
|
|
4
|
+
|
|
5
|
+
.grid__cell.grid__cell--50-at-medium
|
|
6
|
+
.product-details__name
|
|
7
|
+
%h1.product-details__heading= product.name
|
|
8
|
+
|
|
9
|
+
.product-prices.product-prices--details
|
|
10
|
+
= render 'workarea/storefront/products/pricing', product: product
|
|
11
|
+
|
|
12
|
+
= form_tag cart_items_path, method: 'post', class: 'product-details__add-to-cart-form', data: { dialog_form: { dialogOptions: { closeAll: true, initModules: true } }, analytics: add_to_cart_analytics_data(product).to_json } do
|
|
13
|
+
= hidden_field_tag :product_id, product.id, id: dom_id(product, 'product_id')
|
|
14
|
+
= hidden_field_tag :sku, product.current_sku
|
|
15
|
+
= hidden_field_tag :via, params[:via], id: dom_id(product, 'via')
|
|
16
|
+
|
|
17
|
+
.grid.grid--middle
|
|
18
|
+
.grid__cell.grid__cell--60
|
|
19
|
+
.grid
|
|
20
|
+
.grid__cell
|
|
21
|
+
- product.options_for_selection.each do |option|
|
|
22
|
+
.property
|
|
23
|
+
= label_tag option.slug, nil, class: 'property__name', for: "#{option.slug}_#{dom_id(product)}" do
|
|
24
|
+
%span.property__text= option.name
|
|
25
|
+
.value
|
|
26
|
+
= select_tag option.slug, options_for_select([[t('workarea.storefront.products.select_option', name: option.name), nil]] + option.selections, option.current), required: true, id: "#{option.slug}_#{dom_id(product)}", data: { product_details_sku_select: product.slug }
|
|
27
|
+
|
|
28
|
+
= append_partials('storefront.add_to_cart_form', product: product)
|
|
29
|
+
|
|
30
|
+
- if product.purchasable?
|
|
31
|
+
.grid__cell
|
|
32
|
+
.product-details__quantity
|
|
33
|
+
.property
|
|
34
|
+
= label_tag :quantity, nil, class: 'property__name', for: "quantity#{dom_id(product)}" do
|
|
35
|
+
%span.property__text= t('workarea.storefront.products.quantity')
|
|
36
|
+
.quantity-control
|
|
37
|
+
= button_tag '-', { type: 'button', data: { quantity_control: { 'direction': 'dec', 'autosubmit': false }.to_json }, class: 'quantity-control__button quantity-control__decrement'}
|
|
38
|
+
.value= number_field_tag :quantity, params[:quantity] || 1, class: 'quantity-control__input text-box text-box--x-small', required: true, min: 1, id: "quantity#{dom_id(product)}"
|
|
39
|
+
= button_tag '+', { type: 'button', data: { quantity_control: { 'direction': 'inc', 'autosubmit': false }.to_json }, class: 'quantity-control__button quantity-control__increment'}
|
|
40
|
+
|
|
41
|
+
- unless product.currently_selected_options.blank?
|
|
42
|
+
= link_to t('workarea.storefront.products.clear_selections'), product_path(product), data: { option_button: '' }
|
|
43
|
+
|
|
44
|
+
.grid__cell
|
|
45
|
+
%p.product-details__add-to-cart-action= button_tag t('workarea.storefront.products.add_to_cart'), value: 'add_to_cart', class: 'button'
|
|
46
|
+
|
|
47
|
+
- else
|
|
48
|
+
.grid__cell
|
|
49
|
+
= hidden_field_tag :quantity, params[:quantity] || 1, id: "quantity#{dom_id(product)}"
|
|
50
|
+
%p.product-details__unavailable= t('workarea.storefront.products.unavailable')
|
|
51
|
+
|
|
52
|
+
- if product.current_sku.present?
|
|
53
|
+
%p.product-details__inventory-status= product.inventory_status
|
|
54
|
+
|
|
55
|
+
- if product.description.present?
|
|
56
|
+
.product-details__description
|
|
57
|
+
%p= truncated_product_description(product, t('workarea.storefront.products.read_more'))
|
|
58
|
+
|
|
59
|
+
= append_partials('storefront.product_details', product: product)
|
|
60
|
+
|
|
61
|
+
%p.product-details__full-details=link_to t('workarea.storefront.products.view_full_details'), product_path(product, color: params[:color]), class: 'text-button'
|