workarea-one_theme 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- 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,67 @@
|
|
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_with_index do |option, index|
|
22
|
+
.property
|
23
|
+
= label_tag option.slug, nil, class: 'property__name', for: "#{option.slug}_#{dom_id(product)}", id: "aria_product_option_#{option.slug}_#{index}" do
|
24
|
+
%span.property__text= option_label(option)
|
25
|
+
.value
|
26
|
+
- option.selections.each do |selection|
|
27
|
+
= radio_button_tag option.slug, selection, option.current == selection, required: true, title: selection, class: 'visually-hidden', aria: { labelledby: "aria_product_option_#{option.slug}_#{index}" }
|
28
|
+
= link_to option_selection_url_for(product, option, selection), title: selection, class: "option-button option-button--#{selection.downcase.dasherize}#{' option-button--active' if option.current == selection}", data: { option_button: '' } do
|
29
|
+
- if product.images_by_option[selection.optionize].present?
|
30
|
+
= image_tag(product_image_url(product.images_by_option[selection.optionize].first, :swatch_thumb), alt: selection, class: 'option-button__image')
|
31
|
+
- else
|
32
|
+
%span.option-button__text= selection
|
33
|
+
|
34
|
+
= append_partials('storefront.add_to_cart_form', product: product)
|
35
|
+
|
36
|
+
- if product.purchasable?
|
37
|
+
.grid__cell
|
38
|
+
.product-details__quantity
|
39
|
+
.property
|
40
|
+
= label_tag :quantity, nil, class: 'property__name', for: "quantity#{dom_id(product)}" do
|
41
|
+
%span.property__text= t('workarea.storefront.products.quantity')
|
42
|
+
.quantity-control
|
43
|
+
= button_tag '-', { type: 'button', data: { quantity_control: { 'direction': 'dec', 'autosubmit': false }.to_json }, class: 'quantity-control__button quantity-control__decrement'}
|
44
|
+
.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)}"
|
45
|
+
= button_tag '+', { type: 'button', data: { quantity_control: { 'direction': 'inc', 'autosubmit': false }.to_json }, class: 'quantity-control__button quantity-control__increment'}
|
46
|
+
|
47
|
+
- unless product.currently_selected_options.blank?
|
48
|
+
= link_to t('workarea.storefront.products.clear_selections'), product_path(product), data: { option_button: '' }
|
49
|
+
|
50
|
+
.grid__cell
|
51
|
+
%p.product-details__add-to-cart-action= button_tag t('workarea.storefront.products.add_to_cart'), value: 'add_to_cart', class: 'button'
|
52
|
+
|
53
|
+
- else
|
54
|
+
.grid__cell
|
55
|
+
= hidden_field_tag :quantity, params[:quantity] || 1, id: "quantity#{dom_id(product)}"
|
56
|
+
%p.product-details__unavailable= t('workarea.storefront.products.unavailable')
|
57
|
+
|
58
|
+
- if product.current_sku.present?
|
59
|
+
%p.product-details__inventory-status= product.inventory_status
|
60
|
+
|
61
|
+
- if product.description.present?
|
62
|
+
.product-details__description
|
63
|
+
%p= truncated_product_description(product, t('workarea.storefront.products.read_more'))
|
64
|
+
|
65
|
+
= append_partials('storefront.product_details', product: product)
|
66
|
+
|
67
|
+
%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,78 @@
|
|
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
|
+
= append_partials('storefront.product_pricing_details', product: product)
|
13
|
+
|
14
|
+
- if product.description.present?
|
15
|
+
.product-details__description
|
16
|
+
%p= truncated_product_description(product, t('workarea.storefront.products.read_more'))
|
17
|
+
|
18
|
+
= 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
|
19
|
+
= hidden_field_tag :product_id, product.id, id: dom_id(product, 'product_id')
|
20
|
+
= hidden_field_tag :sku, product.current_sku
|
21
|
+
= hidden_field_tag :via, params[:via], id: dom_id(product, 'via')
|
22
|
+
|
23
|
+
.grid.grid--middle
|
24
|
+
.grid__cell.grid__cell--60
|
25
|
+
.grid
|
26
|
+
.grid__cell
|
27
|
+
- product.options_for_selection.each do |option|
|
28
|
+
.property
|
29
|
+
= label_tag option.slug, nil, class: 'property__name', for: "#{option.slug}_#{dom_id(product)}" do
|
30
|
+
%span.property__text= option_label(option)
|
31
|
+
.value
|
32
|
+
- option.selections.each do |selection|
|
33
|
+
= radio_button_tag option.slug, selection, option.current == selection, required: true, title: selection, class: 'visually-hidden'
|
34
|
+
= link_to option_selection_url_for(product, option, selection), title: selection, class: "option-button option-button--#{selection.downcase.dasherize} option-button--#{option.name.downcase}#{' option-button--active' if option.current == selection}", data: { option_button: '' } do
|
35
|
+
- swatch_content = render_swatch_option(selection, product.swatches_by_option[selection.optionize])
|
36
|
+
|
37
|
+
- if swatch_content.present?
|
38
|
+
= swatch_content
|
39
|
+
- elsif product.images_by_option[selection.optionize].present?
|
40
|
+
= image_tag(product_image_url(product.images_by_option[selection.optionize].first, :swatch_thumb), alt: selection, class: 'option-button__image')
|
41
|
+
- else
|
42
|
+
%span.option-button__text= selection
|
43
|
+
|
44
|
+
= append_partials('storefront.add_to_cart_form', product: product)
|
45
|
+
|
46
|
+
- if product.purchasable?
|
47
|
+
.grid__cell
|
48
|
+
.product-details__quantity
|
49
|
+
.property
|
50
|
+
= label_tag :quantity, nil, class: 'property__name', for: "quantity#{dom_id(product)}" do
|
51
|
+
%span.property__text= t('workarea.storefront.products.quantity')
|
52
|
+
.quantity-control
|
53
|
+
= button_tag '-', { type: 'button', data: { quantity_control: { 'direction': 'dec', 'autosubmit': false }.to_json }, class: 'quantity-control__button quantity-control__decrement'}
|
54
|
+
.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)}"
|
55
|
+
= button_tag '+', { type: 'button', data: { quantity_control: { 'direction': 'inc', 'autosubmit': false }.to_json }, class: 'quantity-control__button quantity-control__increment'}
|
56
|
+
|
57
|
+
- unless product.currently_selected_options.blank?
|
58
|
+
.grid__cell
|
59
|
+
= link_to t('workarea.storefront.products.clear_selections'), product_path(product), data: { option_button: '' }
|
60
|
+
|
61
|
+
.grid__cell
|
62
|
+
%p.product-details__add-to-cart-action= button_tag t('workarea.storefront.products.add_to_cart'), value: 'add_to_cart', class: 'button'
|
63
|
+
|
64
|
+
- else
|
65
|
+
.grid__cell
|
66
|
+
= hidden_field_tag :quantity, params[:quantity] || 1, id: "quantity#{dom_id(product)}"
|
67
|
+
%p.product-details__unavailable= t('workarea.storefront.products.unavailable')
|
68
|
+
|
69
|
+
- if product.current_sku.present?
|
70
|
+
%p.product-details__inventory-status= product.inventory_status
|
71
|
+
|
72
|
+
- if product.description.present?
|
73
|
+
.product-details__description
|
74
|
+
%p= truncated_product_description(product, t('workarea.storefront.products.read_more'))
|
75
|
+
|
76
|
+
= append_partials('storefront.product_details', product: product)
|
77
|
+
|
78
|
+
%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,72 @@
|
|
1
|
+
- @title = t('workarea.storefront.reviews.write_a_review_title', name: @product.browser_title)
|
2
|
+
|
3
|
+
.write-review.view
|
4
|
+
%h1.heading.heading--3= t('workarea.storefront.reviews.write_a_review_title', name: @product.browser_title)
|
5
|
+
|
6
|
+
- unless request.get?
|
7
|
+
- if @create_review.errors.any?
|
8
|
+
- @create_review.errors.full_messages.each do |message|
|
9
|
+
= render_message 'error', message, data: { analytics: validation_error_analytics_data('review').to_json }
|
10
|
+
|
11
|
+
= form_tag create_product_review_path(@product), method: 'post', id: 'review_form', data: { product_review_ajax_submit: '' } do
|
12
|
+
= hidden_field_tag 'review[product_id]', @product.id
|
13
|
+
|
14
|
+
- if display_purchase_requirement_message
|
15
|
+
%span.write-review__purchase-requirement= t('workarea.storefront.reviews.purchase_requirement')
|
16
|
+
|
17
|
+
- if @review.requires_public_info?
|
18
|
+
.grid
|
19
|
+
.grid__cell.grid__cell--50-at-medium
|
20
|
+
.property
|
21
|
+
= label_tag 'review[first_name]', nil, class: 'property__name' do
|
22
|
+
%span.property__requirement.property__requirement--required= t('workarea.storefront.forms.required')
|
23
|
+
%span.property__text= t('workarea.storefront.users.first_name')
|
24
|
+
.value
|
25
|
+
= text_field_tag 'review[first_name]', @review.first_name, class: 'text-box', required: true
|
26
|
+
.value__note= t('workarea.storefront.reviews.notes.display_name')
|
27
|
+
|
28
|
+
.grid__cell.grid__cell--50-at-medium
|
29
|
+
.property
|
30
|
+
= label_tag 'review[last_name]', nil, class: 'property__name' do
|
31
|
+
%span.property__requirement.property__requirement--required= t('workarea.storefront.forms.required')
|
32
|
+
%span.property__text= t('workarea.storefront.users.last_name')
|
33
|
+
.value
|
34
|
+
= text_field_tag 'review[last_name]', @review.last_name, class: 'text-box', required: true
|
35
|
+
.value__note= t('workarea.storefront.reviews.notes.display_name')
|
36
|
+
|
37
|
+
- if @review.anonymous?
|
38
|
+
.property
|
39
|
+
= label_tag 'review[email]', nil, class: 'property__name' do
|
40
|
+
%span.property__text= t('workarea.storefront.users.email')
|
41
|
+
%span.property__requirement.property__requirement--optional= t('workarea.storefront.forms.optional')
|
42
|
+
.value
|
43
|
+
= email_field_tag 'review[email]', @review.email, class: 'text-box', autocapitalize: 'off', autocorrect: 'off', autocomplete: 'email'
|
44
|
+
.value__note= t('workarea.storefront.reviews.notes.email')
|
45
|
+
|
46
|
+
%fieldset.write-review__rating-fieldset
|
47
|
+
%legend.write-review__rating-ledgend= t('workarea.storefront.reviews.rating')
|
48
|
+
%ul.write-review__ratings
|
49
|
+
- (1..5).each do |i|
|
50
|
+
%li.write-review__rating
|
51
|
+
= radio_button_tag 'review[rating]', i, i == 5 ? true : false, class: 'write-review__rating-input', data: { rating_button: '' }
|
52
|
+
= label_tag "review[rating][#{i}]", nil, class: 'write-review__star' do
|
53
|
+
= inline_svg 'workarea/storefront/icons/star.svg', class: 'write-review__star-icon', title: t('workarea.storefront.reviews.stars', count: i)
|
54
|
+
|
55
|
+
.property
|
56
|
+
= label_tag 'review[title]', nil, class: 'property__name' do
|
57
|
+
%span.property__text= t('workarea.storefront.reviews.review_title')
|
58
|
+
.value= text_field_tag 'review[title]', nil, class: 'text-box', required: true
|
59
|
+
|
60
|
+
.property
|
61
|
+
= label_tag 'review[body]', nil, class: 'property__name' do
|
62
|
+
%span.property__text= t('workarea.storefront.reviews.your_review')
|
63
|
+
.value= text_area_tag 'review[body]', nil, class: 'text-box text-box--multi-line', required: true
|
64
|
+
|
65
|
+
.property= recaptcha_tags
|
66
|
+
|
67
|
+
.grid.grid--middle
|
68
|
+
.grid__cell.grid__cell--50
|
69
|
+
= link_to t('workarea.storefront.forms.cancel'), product_path(@product), data: { dialog_close_button: '' }
|
70
|
+
.grid__cell.grid__cell--50
|
71
|
+
.grid.grid--auto.grid--right.grid--middle
|
72
|
+
.grid__cell= button_tag t('workarea.storefront.reviews.submit'), value: 'submit_review', class: 'button'
|
@@ -0,0 +1,78 @@
|
|
1
|
+
- @title = t('workarea.storefront.searches.title')
|
2
|
+
|
3
|
+
- content_for :head do
|
4
|
+
%meta{ property: 'recent-view', content: recent_view_content(search: @search.query_string) }
|
5
|
+
= append_partials('storefront.search_head', search: @search)
|
6
|
+
|
7
|
+
- if @search.first_page?
|
8
|
+
%link{ href: search_path(q: @search.query_string), rel: 'canonical' }
|
9
|
+
%meta{ name: 'robots', content: 'noindex, follow' }
|
10
|
+
- unless @search.last_page?
|
11
|
+
%link{ href: url_for(q: @search.query_string, page: @search.next_page), rel: 'next' }
|
12
|
+
- unless @search.first_page?
|
13
|
+
%link{ href: url_for(q: @search.query_string, page: @search.prev_page), rel: 'prev' }
|
14
|
+
|
15
|
+
%meta{ property: 'og:url', content: url_for }
|
16
|
+
%meta{ property: 'og:title', content: page_title }
|
17
|
+
%meta{ property: 'og:type', content: 'website' }
|
18
|
+
%meta{ property: 'og:image', content: root_path + image_path('workarea/storefront/logo.png') }
|
19
|
+
|
20
|
+
- content_for :breadcrumbs do
|
21
|
+
%p.breadcrumbs__node-group
|
22
|
+
%span.breadcrumbs__node{ itemprop: 'breadcrumb' }
|
23
|
+
= link_to t('workarea.storefront.layouts.home'), root_path, rel: 'home'
|
24
|
+
%span.breadcrumbs__node{ itemprop: 'breadcrumb' }
|
25
|
+
%span= t('workarea.storefront.searches.title')
|
26
|
+
%span.breadcrumbs__node{ itemprop: 'breadcrumb' }
|
27
|
+
%span= @search.query_string
|
28
|
+
|
29
|
+
.view{ data: { analytics: search_results_view_analytics_data(@search).to_json } }
|
30
|
+
|
31
|
+
.search-results
|
32
|
+
.header.header--center-at-small
|
33
|
+
.grid.grid--middle
|
34
|
+
.grid__cell.grid__cell--50-at-medium
|
35
|
+
.header__title
|
36
|
+
- if @search.multiple_result_types?
|
37
|
+
%h1.visually-hidden= pluralize(@search.total, t('workarea.storefront.searches.content_result'))
|
38
|
+
|
39
|
+
%ul.search-result-types
|
40
|
+
- if @search.product_total > 0
|
41
|
+
%li= link_to pluralize(@search.product_total, t('workarea.storefront.searches.product_result')), search_path(q: @search.query_string, type: 'show')
|
42
|
+
%li= pluralize(@search.content_total, t('workarea.storefront.searches.content_result'))
|
43
|
+
- else
|
44
|
+
%h1= pluralize(@search.total, t('workarea.storefront.searches.result'))
|
45
|
+
|
46
|
+
.grid__cell.grid__cell--50-at-medium
|
47
|
+
.grid.grid--right.grid--middle
|
48
|
+
.grid__cell.grid__cell--50-at-medium
|
49
|
+
= form_tag content_search_path, method: 'get' do
|
50
|
+
= hidden_field_tag :q, @search.query_string
|
51
|
+
.property
|
52
|
+
= label_tag 'sort_top', nil, class: 'property__name' do
|
53
|
+
%span.property__text= t('workarea.storefront.searches.sort_by')
|
54
|
+
%span.value= select_tag :sort, options_for_select(@search.sorts, selected: @search.sort), id: 'sort_top', data: { form_submitting_control: '' }
|
55
|
+
.hidden-if-js-enabled= button_tag t('workarea.storefront.searches.sort'), value: 'sort_content_top', class: 'button'
|
56
|
+
|
57
|
+
= append_partials('storefront.search_browse_controls', search: @search)
|
58
|
+
|
59
|
+
- if @search.customization_content_blocks_for('above_results').present?
|
60
|
+
.search-query-content= render_content_blocks(@search.customization_content_blocks_for('above_results'))
|
61
|
+
|
62
|
+
- if @search.query_suggestions.any?
|
63
|
+
.search-results__related
|
64
|
+
%span.search-results__related-title= t('workarea.storefront.searches.suggestions')
|
65
|
+
.grid.grid--auto
|
66
|
+
- @search.query_suggestions.each do |search|
|
67
|
+
.grid__cell
|
68
|
+
%span.search-results__related-term= link_to search, content_search_path(q: search)
|
69
|
+
|
70
|
+
.pagination{ data: { pagination: pagination_data(@search.content) } }
|
71
|
+
%ul
|
72
|
+
- @search.content.each do |result|
|
73
|
+
%li{ data: { pagination_item: '' } }
|
74
|
+
= link_to result.name, send("#{result.resource_name}_path", result)
|
75
|
+
%p= truncate(result.summary, length: 100)
|
76
|
+
- if show_pagination?(@search.content)
|
77
|
+
.pagination__button
|
78
|
+
= link_to t('workarea.storefront.pagination.next_page'), pagination_path_for(page: @search.next_page), class: 'button button--large', data: { pagination_button: '' }
|
@@ -0,0 +1,97 @@
|
|
1
|
+
- @title = t('workarea.storefront.searches.title')
|
2
|
+
|
3
|
+
- content_for :head do
|
4
|
+
%meta{ name: 'robots', content: 'noindex' }
|
5
|
+
= append_partials('storefront.search_head', search: @search)
|
6
|
+
|
7
|
+
%meta{ property: 'og:url', content: url_for(only_path: false) }
|
8
|
+
%meta{ property: 'og:title', content: page_title }
|
9
|
+
%meta{ property: 'og:type', content: 'website' }
|
10
|
+
%meta{ property: 'og:image', content: @search.open_graph_asset.url }
|
11
|
+
%meta{ property: 'og:image:secure_url', content: @search.open_graph_asset.url }
|
12
|
+
|
13
|
+
- content_for :breadcrumbs do
|
14
|
+
%p.breadcrumbs__node-group
|
15
|
+
%span.breadcrumbs__node
|
16
|
+
= link_to t('workarea.storefront.layouts.home'), root_path, rel: 'home'
|
17
|
+
%span.breadcrumbs__node
|
18
|
+
%span= t('workarea.storefront.searches.title')
|
19
|
+
%span.breadcrumbs__node
|
20
|
+
%span= @search.query_string
|
21
|
+
|
22
|
+
- content_for :drawer do
|
23
|
+
- if @search.facets.any?
|
24
|
+
#mobile-filters-overlay.mobile-filters-overlay.hidden
|
25
|
+
#mobile-filter-drawer.mobile-filters
|
26
|
+
.mobile-filters__content
|
27
|
+
- if @search.facets.any?
|
28
|
+
.result-filters
|
29
|
+
- @search.facets.each do |facet|
|
30
|
+
- unless @search.autoselected_filter?(facet.system_name)
|
31
|
+
= render "workarea/storefront/facets/#{facet.type}", facet: facet
|
32
|
+
|
33
|
+
.view{ data: { analytics: search_results_view_analytics_data(@search).to_json } }
|
34
|
+
|
35
|
+
.search-results
|
36
|
+
.header.header--center-at-small
|
37
|
+
.grid.grid--middle
|
38
|
+
.grid__cell.grid__cell--50-at-medium
|
39
|
+
.header__title
|
40
|
+
%h1= pluralize(@search.total, t('workarea.storefront.searches.result'))
|
41
|
+
|
42
|
+
- if @search.message.present?
|
43
|
+
= render_message 'info', @search.message
|
44
|
+
|
45
|
+
= append_partials('storefront.above_search_results', search: @search)
|
46
|
+
|
47
|
+
- if @search.total.zero?
|
48
|
+
.grid__cell.grid__cell--50-at-medium
|
49
|
+
%p
|
50
|
+
= t('workarea.storefront.products.none_found')
|
51
|
+
= link_to t('workarea.storefront.products.reset_filters'), search_path(q: @search.query_string)
|
52
|
+
|
53
|
+
- else
|
54
|
+
.grid__cell.grid__cell--50-at-medium
|
55
|
+
.grid.grid--right.grid--middle
|
56
|
+
.grid__cell.grid__cell--50-at-medium
|
57
|
+
- if @search.facets.any?
|
58
|
+
.header__filter-button
|
59
|
+
%button.button{ data: { mobile_filters: ''} }= t('workarea.storefront.products.filter_results')
|
60
|
+
|
61
|
+
.grid__cell.grid__cell--50-at-medium
|
62
|
+
= form_tag search_path, method: 'get' do
|
63
|
+
= facet_hidden_inputs(@search.facets)
|
64
|
+
= hidden_field_tag :q, @search.query_string
|
65
|
+
.property
|
66
|
+
= label_tag 'sort_top', nil, class: 'property__name' do
|
67
|
+
%span.property__text= t('workarea.storefront.searches.sort_by')
|
68
|
+
.value
|
69
|
+
= select_tag :sort, options_for_select(@search.sorts, selected: @search.sort), id: 'sort_top', data: { form_submitting_control: '' }
|
70
|
+
.hidden-if-js-enabled= button_tag t('workarea.storefront.searches.sort'), value: 'sort_products_top', class: 'button'
|
71
|
+
|
72
|
+
= append_partials('storefront.search_browse_controls', search: @search)
|
73
|
+
|
74
|
+
- if @search.results_content.present?
|
75
|
+
.search-results__content= render_content_blocks(@search.results_content)
|
76
|
+
|
77
|
+
- if @search.customization_content_blocks_for('above_results').present?
|
78
|
+
.search-results__content= render_content_blocks(@search.customization_content_blocks_for('above_results'))
|
79
|
+
|
80
|
+
- if @search.query_suggestions.any?
|
81
|
+
.search-results__related
|
82
|
+
%span.search-results__related-title= t('workarea.storefront.searches.suggestions')
|
83
|
+
|
84
|
+
.grid.grid--auto
|
85
|
+
- @search.query_suggestions.each do |search|
|
86
|
+
.grid__cell
|
87
|
+
%span.search-results__related-term= link_to search, search_path(q: search), class: 'search-results__related-link'
|
88
|
+
|
89
|
+
.pagination{ data: { analytics: product_list_analytics_data("Search Results for \"#{@search.query_string}\"").to_json, pagination: pagination_data(@search.products), back_to_top_button: '' } }
|
90
|
+
.grid
|
91
|
+
- @search.products.each_with_index do |product, position|
|
92
|
+
.grid__cell.grid__cell--50.grid__cell--25-at-medium.grid__cell--20-at-wide{ data: { pagination_item: '' } }
|
93
|
+
.product-summary{ data: { search_results_product_grid_summary: { id: product.catalog_id, position: position }.to_json } }
|
94
|
+
= render 'workarea/storefront/products/summary', product: product
|
95
|
+
- if show_pagination?(@search.products)
|
96
|
+
.pagination__button
|
97
|
+
= link_to t('workarea.storefront.pagination.next_page'), pagination_path_for(page: @search.next_page), class: 'button button--large', data: { pagination_button: '' }
|
@@ -0,0 +1,109 @@
|
|
1
|
+
- title_label = label.gsub(/_/, ' ').capitalize
|
2
|
+
.address-fields
|
3
|
+
.grid
|
4
|
+
.grid__cell.grid__cell--50-at-medium
|
5
|
+
.property
|
6
|
+
= label_tag "#{label}[first_name]", nil, class: 'property__name' do
|
7
|
+
%span.property__text= t('workarea.storefront.addresses.first_name')
|
8
|
+
.value
|
9
|
+
= text_field_tag "#{label}[first_name]", address.first_name, class: 'text-box', required: true, title: "#{title_label} First Name", autocomplete: 'given-name'
|
10
|
+
- if address.errors[:first_name].present?
|
11
|
+
%span.value__error= address.errors[:first_name].first
|
12
|
+
|
13
|
+
.grid__cell.grid__cell--50-at-medium
|
14
|
+
.property
|
15
|
+
= label_tag "#{label}[last_name]", nil, class: 'property__name' do
|
16
|
+
%span.property__text= t('workarea.storefront.addresses.last_name')
|
17
|
+
.value
|
18
|
+
= text_field_tag "#{label}[last_name]", address.last_name, class: 'text-box', required: true, autocomplete: 'family-name', title: "#{title_label} Last Name"
|
19
|
+
- if address.errors[:last_name].present?
|
20
|
+
%span.value__error= address.errors[:last_name].first
|
21
|
+
|
22
|
+
.grid__cell
|
23
|
+
= optional_field(t('workarea.storefront.addresses.company_prompt'), address.company) do
|
24
|
+
.property
|
25
|
+
= label_tag "#{label}[company]", nil, class: 'property__name' do
|
26
|
+
%span.property__text= t('workarea.storefront.addresses.company')
|
27
|
+
%span.property__requirement.property__requirement--optional= t('workarea.storefront.forms.optional')
|
28
|
+
.value= text_field_tag "#{label}[company]", address.company, class: 'text-box', title: "#{title_label} #{t('workarea.storefront.addresses.company')}", autocomplete: 'organization'
|
29
|
+
|
30
|
+
.grid__cell
|
31
|
+
.property
|
32
|
+
= label_tag "#{label}[street]", nil, class: 'property__name' do
|
33
|
+
%span.property__requirement.property__requirement--required= t('workarea.storefront.forms.required')
|
34
|
+
%span.property__text= t('workarea.storefront.addresses.street')
|
35
|
+
.value
|
36
|
+
= text_field_tag "#{label}[street]", address.street, class: 'text-box', required: true, autocomplete: 'address-line1', title: "#{title_label} Street Line 1"
|
37
|
+
- if address.errors[:street].present?
|
38
|
+
%span.value__error= address.errors[:street].first
|
39
|
+
- unless address.allow_po_box?
|
40
|
+
%span.value__note= t('workarea.storefront.addresses.no_po_boxes')
|
41
|
+
|
42
|
+
.grid__cell
|
43
|
+
.property
|
44
|
+
= label_tag "#{label}[street_2]", nil, class: 'property__name' do
|
45
|
+
%span.property__text= t('workarea.storefront.addresses.street_2')
|
46
|
+
%span.property__requirement.property__requirement--optional= t('workarea.storefront.forms.optional')
|
47
|
+
.value
|
48
|
+
= text_field_tag "#{label}[street_2]", address.street_2, class: 'text-box', autocomplete: 'address-line2', title: "#{title_label} Street Line 2"
|
49
|
+
- if address.errors[:street_2].present?
|
50
|
+
%span.value__error= address.errors[:street_2].first
|
51
|
+
|
52
|
+
.grid__cell
|
53
|
+
.property{ data: { address_region_fields: 'country' } }
|
54
|
+
= label_tag "#{label}[country]", nil, class: 'property__name' do
|
55
|
+
%span.property__requirement.property__requirement--required= t('workarea.storefront.forms.required')
|
56
|
+
%span.property__text= t('workarea.storefront.addresses.country')
|
57
|
+
.value
|
58
|
+
- options = options_for_select(country_options, address.country.try(:alpha2))
|
59
|
+
= select_tag "#{label}[country]", options, title: "#{title_label} Country"
|
60
|
+
- if address.errors[:country].present?
|
61
|
+
%span.value__error= address.errors[:country].first
|
62
|
+
|
63
|
+
.grid__cell.grid__cell--33-at-medium
|
64
|
+
.property
|
65
|
+
= label_tag "#{label}[city]", nil, class: 'property__name' do
|
66
|
+
%span.property__requirement.property__requirement--required= t('workarea.storefront.forms.required')
|
67
|
+
%span.property__text= t('workarea.storefront.addresses.city')
|
68
|
+
.value
|
69
|
+
= text_field_tag "#{label}[city]", address.city, class: 'text-box', required: true, autocomplete: 'address-level2', title: "#{title_label} City"
|
70
|
+
- if address.errors[:city].present?
|
71
|
+
%span.value__error= address.errors[:city].first
|
72
|
+
|
73
|
+
.grid__cell.grid__cell--33-at-medium
|
74
|
+
.property{ data: { address_region_fields: 'region' } }
|
75
|
+
= label_tag "#{label}[region]", nil, class: 'property__name' do
|
76
|
+
%span.property__requirement.property__requirement--required= t('workarea.storefront.forms.required')
|
77
|
+
%span.property__text= t('workarea.storefront.addresses.region')
|
78
|
+
.value
|
79
|
+
- options = grouped_options_for_select(region_options, address.region)
|
80
|
+
= select_tag "#{label}_region_select", options, required: true, title: "#{title_label} Region", class: 'hidden', prompt: t('workarea.storefront.addresses.select_state'), aria: { label: "#{title_label} #{t('workarea.storefront.addresses.region')}"}
|
81
|
+
= text_field_tag "#{label}[region]", address.region, class: 'text-box', title: "#{title_label} Region"
|
82
|
+
- if address.errors[:region].present?
|
83
|
+
%span.value__error= address.errors[:region].first
|
84
|
+
|
85
|
+
.grid__cell.grid__cell--33-at-medium
|
86
|
+
.property
|
87
|
+
= label_tag "#{label}[postal_code]", nil, class: 'property__name' do
|
88
|
+
%span.property__requirement.property__requirement--required= t('workarea.storefront.forms.required')
|
89
|
+
%span.property__text= t('workarea.storefront.addresses.postal_code')
|
90
|
+
.value
|
91
|
+
= text_field_tag "#{label}[postal_code]", address.postal_code, class: 'text-box', required: true, autocomplete: 'postal-code', title: "#{title_label} Postal Code"
|
92
|
+
- if address.errors[:postal_code].present?
|
93
|
+
%span.value__error= address.errors[:postal_code].first
|
94
|
+
|
95
|
+
.grid__cell
|
96
|
+
.grid.grid--auto.grid--bottom
|
97
|
+
.grid__cell
|
98
|
+
.property
|
99
|
+
= label_tag "#{label}[phone_number]", nil, class: 'property__name' do
|
100
|
+
%span.property__text= t('workarea.storefront.addresses.phone_number')
|
101
|
+
%span.property__requirement.property__requirement--optional= t('workarea.storefront.forms.optional')
|
102
|
+
.value= telephone_field_tag "#{label}[phone_number]", number_to_phone(address.phone_number), autocomplete: 'tel', class: 'text-box', placeholder: '555-555-5555', title: "#{title_label} #{t('workarea.storefront.addresses.phone_number')}", pattern: '[0-9-]+'
|
103
|
+
.grid__cell
|
104
|
+
.property
|
105
|
+
.grid.grid--auto.grid--middle
|
106
|
+
.grid__cell
|
107
|
+
= label_tag "#{label}[phone_extension]", nil, class: 'property__name' do
|
108
|
+
%span.property__text= t('workarea.storefront.addresses.phone_extension')
|
109
|
+
.value= telephone_field_tag "#{label}[phone_extension]", address.phone_extension, autocomplete: 'tel-extension', class: 'text-box text-box--x-small', title: "#{title_label} #{t('workarea.storefront.addresses.phone_extension')}", pattern: '\d+'
|