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,97 @@
|
|
1
|
+
!!!
|
2
|
+
/
|
3
|
+
Platform: Workarea Ecommerce
|
4
|
+
Web: http://workarea.com
|
5
|
+
Email: sales@workarea.com
|
6
|
+
Phone: 215-925-1800
|
7
|
+
%html{ lang: 'en' }
|
8
|
+
%head
|
9
|
+
%meta{ charset: 'utf-8' }
|
10
|
+
%title= page_title
|
11
|
+
%meta{ name: 'robots', content: 'noodp' }
|
12
|
+
= csrf_meta_tags
|
13
|
+
%meta{ name: 'viewport', content: 'width=device-width, initial-scale=1.0' }
|
14
|
+
%meta{ property: 'locale', content: I18n.locale }
|
15
|
+
%meta{ property: 'environment', content: Rails.env }
|
16
|
+
= alternate_locales_tags
|
17
|
+
= render 'workarea/storefront/favicons/tags'
|
18
|
+
%link{ rel: 'manifest', href: web_manifest_path }
|
19
|
+
%meta{ name: 'theme-color', content: Workarea.config.web_manifest.theme_color }
|
20
|
+
|
21
|
+
:css
|
22
|
+
@-ms-viewport { width: device-width; }
|
23
|
+
@viewport { width: device-width; }
|
24
|
+
= yield :head
|
25
|
+
= stylesheet_link_tag Workarea.config.asset_manifests.storefront_stylesheet, media: 'all'
|
26
|
+
= yield :css
|
27
|
+
|
28
|
+
= append_partials('storefront.document_head')
|
29
|
+
= javascript_include_tag Workarea.config.asset_manifests.storefront_javascript_head
|
30
|
+
|
31
|
+
%body
|
32
|
+
= append_partials('storefront.body_top')
|
33
|
+
|
34
|
+
%nav.accessibility-nav.visually-hidden
|
35
|
+
= link_to t('workarea.storefront.layouts.accessibility_info'), accessibility_path
|
36
|
+
= link_to t('workarea.storefront.layouts.main_content'), '#main_content', accesskey: 'S'
|
37
|
+
|
38
|
+
.page-messages{ role: 'complementary' }
|
39
|
+
= flash_messages if flash.present?
|
40
|
+
|
41
|
+
#top.page-container
|
42
|
+
|
43
|
+
.page-header.page-header--checkout{ role: 'banner' }
|
44
|
+
.page-header__main
|
45
|
+
|
46
|
+
.content-wrapper
|
47
|
+
|
48
|
+
.grid.grid--middle
|
49
|
+
.grid__cell.grid__cell--50-at-medium
|
50
|
+
= link_to image_tag('workarea/storefront/logo.png', alt: t('workarea.storefront.layouts.logo'), class: 'page-header__logo', width: 256), root_path, rel: 'home'
|
51
|
+
|
52
|
+
.grid__cell.grid__cell--50-at-medium
|
53
|
+
%ul.order-help-menu
|
54
|
+
%li.order-help-menu__item
|
55
|
+
= link_to t('workarea.storefront.layouts.contact_us'), contact_path, data: { dialog_button: '' }, class: 'link link--secondary'
|
56
|
+
%li.order-help-menu__item
|
57
|
+
= link_to page_path('shipping-information'), target: '_blank', rel: 'noopener', data: { dialog_button: '' }, class: 'link link--secondary' do
|
58
|
+
= t('workarea.storefront.layouts.shipping_policy')
|
59
|
+
%li.order-help-menu__item
|
60
|
+
= link_to page_path('return-information'), target: '_blank', rel: 'noopener', data: { dialog_button: '' }, class: 'link link--secondary' do
|
61
|
+
= t('workarea.storefront.layouts.returns')
|
62
|
+
|
63
|
+
.page-content.page-content--checkout
|
64
|
+
|
65
|
+
.content-wrapper
|
66
|
+
|
67
|
+
= render 'workarea/storefront/checkouts/checkout_progress' if @checkout_step.present?
|
68
|
+
|
69
|
+
- content_for_page_aside = yield :page_aside
|
70
|
+
|
71
|
+
.grid
|
72
|
+
.grid__cell{ class: ('grid__cell--60-at-medium' if content_for_page_aside.present?)}
|
73
|
+
#main_content.page-content__main{ role: 'main', class: ('page-content__main--full-width' if content_for_page_aside.empty?) }
|
74
|
+
= yield
|
75
|
+
%p.visually-hidden= link_to t('workarea.storefront.layouts.top_of_page'), '#top'
|
76
|
+
|
77
|
+
- if content_for_page_aside.present?
|
78
|
+
.grid__cell.grid__cell--40-at-medium
|
79
|
+
.page-content__aside{ role: 'complementary' }
|
80
|
+
= content_for_page_aside
|
81
|
+
%p.visually-hidden= link_to t('workarea.storefront.layouts.top_of_page'), '#top'
|
82
|
+
|
83
|
+
.page-footer{ role: 'contentinfo' }
|
84
|
+
.content-wrapper
|
85
|
+
.grid.grid--middle
|
86
|
+
.grid__cell.grid__cell--50-at-medium
|
87
|
+
%p.page-sub-footer__copyright © #{Time.now.year} One Theme. Powered by Workarea.
|
88
|
+
|
89
|
+
.grid__cell.grid__cell--50-at-medium
|
90
|
+
.page-sub-footer__payment-icons
|
91
|
+
= all_payment_icons
|
92
|
+
|
93
|
+
%p.visually-hidden= link_to t('workarea.storefront.layouts.top_of_page'), '#top'
|
94
|
+
|
95
|
+
= javascript_include_tag Workarea.config.asset_manifests.storefront_javascript
|
96
|
+
= yield :javascript
|
97
|
+
= append_partials('storefront.javascript')
|
@@ -0,0 +1,31 @@
|
|
1
|
+
#write-comment.blog-entry__section
|
2
|
+
|
3
|
+
%h2.blog-entry__comment-heading= t('workarea.storefront.blogs.write_comment')
|
4
|
+
|
5
|
+
- if !logged_in?
|
6
|
+
|
7
|
+
%p #{t('workarea.storefront.blogs.must_be_logged_in')} #{link_to t('workarea.storefront.users.login'), login_path(return_to: blog_entry_path(@entry))}
|
8
|
+
|
9
|
+
- else
|
10
|
+
|
11
|
+
- if @comment.present? && @comment.errors.present?
|
12
|
+
= render 'workarea/storefront/shared/errors', errors: @comment.errors
|
13
|
+
|
14
|
+
= form_tag blog_entry_comment_path(@entry), method: 'post', class: 'blog-entry__comments-form', id: 'comment-form' do
|
15
|
+
|
16
|
+
- if current_user.public_info.blank?
|
17
|
+
.property
|
18
|
+
= label_tag 'first_name', nil, class: 'property__name' do
|
19
|
+
%span.property__text= t('workarea.storefront.users.first_name')
|
20
|
+
.value= text_field_tag 'first_name', nil, class: 'text-box', required: true
|
21
|
+
.property
|
22
|
+
= label_tag 'last_name', nil, class: 'property__name' do
|
23
|
+
%span.property__text= t('workarea.storefront.users.last_name')
|
24
|
+
.value= text_field_tag 'last_name', nil, class: 'text-box', required: true
|
25
|
+
|
26
|
+
.property
|
27
|
+
= label_tag 'body', nil, class: 'property__name' do
|
28
|
+
%span.property__text= t('workarea.storefront.blogs.comment')
|
29
|
+
.value= text_area_tag 'body', @comment.try(:body), class: 'text-box text-box--full-width text-box--multi-line', required: true, minlength: 10
|
30
|
+
|
31
|
+
= button_tag t('workarea.storefront.blogs.submit_comment'), value: 'submit_comment', class: 'button'
|
@@ -0,0 +1,26 @@
|
|
1
|
+
= render_schema_org(blog_posting_schema(entry))
|
2
|
+
|
3
|
+
%article.blog-entry-summary__entry{ class: entry.featured ? 'blog-entry-summary__entry--featured' : '', data: { pagination_item: '' } }
|
4
|
+
%heading
|
5
|
+
%h2.blog-entry-summary__entry-title
|
6
|
+
= link_to entry.name, blog_entry_path(entry)
|
7
|
+
|
8
|
+
%p.blog-entry-summary__entry-author
|
9
|
+
%span= entry.author
|
10
|
+
%p.blog-entry-summary__entry-datetime
|
11
|
+
= local_time(entry.written_at, format: :long)
|
12
|
+
%p.blog-entry-summary__entry-comment-count= link_to t('workarea.storefront.blogs.comments', count: entry.comment_count), blog_entry_path(entry, anchor: 'blog-entry-comments')
|
13
|
+
|
14
|
+
- if entry.has_thumbnail_image?
|
15
|
+
%p.blog-entry-summary__entry-thumbnail= image_tag(entry.thumbnail_image_url)
|
16
|
+
|
17
|
+
- if entry.tags.present?
|
18
|
+
.blog-entry-summary__entry-tags
|
19
|
+
%p.blog-entry-summary__entry-label= t('workarea.storefront.blogs.tags')
|
20
|
+
%ul.blog-entry-summary__entry-tags-list
|
21
|
+
- entry.tags.each do |tag|
|
22
|
+
%li.blog-entry-summary__entry-tags-list-item= link_to tag, blog_tagged_path(@blog, tag)
|
23
|
+
|
24
|
+
.blog-entry-summary__content
|
25
|
+
= entry.summary
|
26
|
+
= link_to t('workarea.storefront.blogs.read_more'), blog_entry_path(entry), class: 'blog-entry-summary__read-more-link'
|
@@ -0,0 +1,85 @@
|
|
1
|
+
- @title = @entry.browser_title
|
2
|
+
- @breadcrumbs = @breadcrumbs
|
3
|
+
|
4
|
+
- add_css(@entry.css)
|
5
|
+
- add_javascript(@entry.javascript)
|
6
|
+
|
7
|
+
= render_schema_org(breadcrumb_list_schema([[t('workarea.storefront.layouts.home'), root_url], [@entry.blog.name, blog_url(@entry.blog)], [@entry.name, blog_entry_url(@entry)]]))
|
8
|
+
= render_schema_org(blog_posting_schema(@entry))
|
9
|
+
|
10
|
+
- content_for :breadcrumbs do
|
11
|
+
%p.breadcrumbs__node-group
|
12
|
+
%span.breadcrumbs__node
|
13
|
+
= link_to t('workarea.storefront.layouts.home'), root_path, rel: 'home'
|
14
|
+
%span.breadcrumbs__node
|
15
|
+
= link_to @entry.blog.name, blog_path(@entry.blog)
|
16
|
+
%span.breadcrumbs__node
|
17
|
+
= @entry.name
|
18
|
+
|
19
|
+
- content_for :head do
|
20
|
+
%link{ href: blog_entry_path(@entry), rel: 'canonical' }
|
21
|
+
%meta{ property: 'og:title', content: @entry.name }
|
22
|
+
%meta{ property: 'og:type', content: 'article' }
|
23
|
+
%meta{ property: 'og:url', content: blog_entry_path(@entry) }
|
24
|
+
- if @entry.has_thumbnail_image?
|
25
|
+
%meta{ property: 'og:image', content: @entry.thumbnail_image_url }
|
26
|
+
%meta{ property: 'global-id', content: @entry.to_global_id.to_param }
|
27
|
+
- unless @entry.meta_description.blank?
|
28
|
+
%meta{ name: :description, content: @entry.meta_description }
|
29
|
+
|
30
|
+
- content_for :page_aside do
|
31
|
+
= render 'workarea/storefront/blogs/blog_navigation', blog: @entry.blog
|
32
|
+
|
33
|
+
%article.blog-entry.view
|
34
|
+
|
35
|
+
%heading.blog-entry__header
|
36
|
+
- if @entry.content_blocks_for(:blog_header).present?
|
37
|
+
!= render_content_blocks(@entry.content_blocks_for('blog_header'))
|
38
|
+
|
39
|
+
%h1.blog-entry__title
|
40
|
+
= @entry.name
|
41
|
+
%p.blog-entry__author= @entry.author
|
42
|
+
%p.blog-entry__datetime
|
43
|
+
= local_time(@entry.written_at, format: :long)
|
44
|
+
%p.blog-entry__comment-count= link_to t('workarea.storefront.blogs.comments', count: @entry.comment_count), blog_entry_path(@entry, anchor: 'blog-entry-comments')
|
45
|
+
|
46
|
+
- if @entry.tags.present?
|
47
|
+
.blog-entry__tags
|
48
|
+
%p.blog-entry__label= t('workarea.storefront.blogs.tags')
|
49
|
+
%ul.blog-entry__tags-list
|
50
|
+
- @entry.tags.each do |tag|
|
51
|
+
%li.blog-entry__tags-list-item= link_to tag, blog_tagged_path(@entry.blog, tag)
|
52
|
+
|
53
|
+
.blog-entry__body
|
54
|
+
- if @entry.content_blocks_for(:blog_content).present?
|
55
|
+
!= render_content_blocks(@entry.content_blocks_for('blog_content'))
|
56
|
+
|
57
|
+
- if @entry.products.present?
|
58
|
+
.blog-entry__products
|
59
|
+
%h2.blog-entry__products-heading= t('workarea.storefront.blogs.related_products')
|
60
|
+
%ul.grid.grid--flush
|
61
|
+
- @entry.products.each do |product|
|
62
|
+
= render_schema_org(product_schema(product))
|
63
|
+
%li.grid__cell.grid__cell--50.grid__cell--25-at-medium>
|
64
|
+
.product-summary
|
65
|
+
= render 'workarea/storefront/products/summary', product: product
|
66
|
+
|
67
|
+
#blog-entry-comments.blog-entry__comments
|
68
|
+
|
69
|
+
- if @entry.comments.present?
|
70
|
+
.blog-entry__section
|
71
|
+
.blog-entry__comments-header
|
72
|
+
%h2.blog-entry__comments-heading= t('workarea.storefront.blogs.comments', count: @entry.comment_count)
|
73
|
+
%p.blog-entry__write-comment-link= link_to t('workarea.storefront.blogs.write_comment'), '#write-comment', class: 'button'
|
74
|
+
%ul.blog-entry__comment-group
|
75
|
+
- @entry.comments.each do |comment|
|
76
|
+
%li.blog-entry__comment
|
77
|
+
%p.blog-entry__comment-item.blog-entry__comment-item--author
|
78
|
+
= comment.user_info
|
79
|
+
%p.blog-entry__comment-item.blog-entry__comment-item--datetime
|
80
|
+
= local_time(comment.created_at, format: :long);
|
81
|
+
|
82
|
+
%p.blog-entry__comment-item.blog-entry__comment-item--body
|
83
|
+
= comment.body
|
84
|
+
|
85
|
+
#write-comment.blog-entry__section{ data: { blog_comment_placeholder: blog_entry_comments_path(@entry) } }
|
@@ -0,0 +1,7 @@
|
|
1
|
+
- if blog.tags.present?
|
2
|
+
%h2.blog-tags__heading= t('workarea.storefront.blogs.tags')
|
3
|
+
.blog-tags{ role: 'navigation' }
|
4
|
+
- blog.tags.each do |tag|
|
5
|
+
%li.secondary-nav__item
|
6
|
+
= link_to blog_tagged_path(blog, tag[:name]), class: 'secondary-nav__link' do
|
7
|
+
= t('workarea.storefront.blogs.tag_link', tag)
|
@@ -0,0 +1,47 @@
|
|
1
|
+
- @title = @blog_index.browser_title
|
2
|
+
|
3
|
+
- add_css(@blog_index.css)
|
4
|
+
- add_javascript(@blog_index.javascript)
|
5
|
+
|
6
|
+
- content_for :head do
|
7
|
+
%link{ href: blog_path(@blog_index), rel: 'canonical' }
|
8
|
+
- unless @blog_index.meta_description.blank?
|
9
|
+
%meta{ name: :description, content: @blog_index.meta_description }
|
10
|
+
|
11
|
+
.blog-index.view
|
12
|
+
|
13
|
+
= render_content_blocks(@blog_index.content_blocks_for(:header_content))
|
14
|
+
|
15
|
+
%h1.blog-entry-summary__title= t('workarea.storefront.blogs.name')
|
16
|
+
|
17
|
+
- @blog_index.each do |blog|
|
18
|
+
%section
|
19
|
+
%h2.blog-index__title
|
20
|
+
= link_to blog.name, blog_path(blog)
|
21
|
+
|
22
|
+
.pagination-results
|
23
|
+
.blog-entry-summary__entry-group
|
24
|
+
- blog.entries_on_index.each do |entry|
|
25
|
+
%article.blog-entry-summary__entry{ class: entry.featured ? 'blog-entry-summary__entry--featured' : '', itemprop: 'blogPost', itemscope: true, itemtype: 'http://schema.org/BlogPosting' }
|
26
|
+
%heading
|
27
|
+
%h2.blog-entry-summary__entry-title{ itemprop: 'headline' }
|
28
|
+
= link_to entry.name, blog_entry_path(entry), itemprop: 'url'
|
29
|
+
|
30
|
+
%p.blog-entry-summary__entry-author{ itemprop: 'author', itemType: 'http://schema.org/Person' }
|
31
|
+
%span{ itemprop: 'name' }= entry.author
|
32
|
+
%p.blog-entry-summary__entry-datetime
|
33
|
+
= local_time(entry.written_at, format: :long, itemprop: 'datePublished dateModified')
|
34
|
+
%p.blog-entry-summary__entry-comment-count{ itemprop: 'commentCount' }= link_to t('workarea.storefront.blogs.comments', count: entry.comment_count), blog_entry_path(entry, anchor: 'blog-entry-comments')
|
35
|
+
|
36
|
+
- if entry.has_thumbnail_image?
|
37
|
+
%p.blog-entry-summary__entry-thumbnail= image_tag(entry.thumbnail_image_url, itemprop: 'image' )
|
38
|
+
|
39
|
+
- if entry.tags.present?
|
40
|
+
.blog-entry-summary__entry-tags
|
41
|
+
%p.blog-entry-summary__entry-label= t('workarea.storefront.blogs.tags')
|
42
|
+
%ul.blog-entry-summary__entry-tags-list
|
43
|
+
- entry.tags.each do |tag|
|
44
|
+
%li.blog-entry-summary__entry-tags-list-item= link_to tag, blog_tagged_path(blog, tag)
|
45
|
+
.blog-entry-summary__content{ itemprop: 'description' }
|
46
|
+
= entry.summary
|
47
|
+
= link_to t('workarea.storefront.blogs.read_more'), blog_entry_path(entry), class: 'blog-entry-summary__read-more-link'
|
@@ -0,0 +1,66 @@
|
|
1
|
+
.view
|
2
|
+
- if @item.blank?
|
3
|
+
= render_message 'error', data: { message_show_dismiss: 'false' } do
|
4
|
+
= t('workarea.storefront.flash_messages.cart_item_error')
|
5
|
+
|
6
|
+
- else
|
7
|
+
= render_message 'success', data: { message_show_dismiss: 'false' } do
|
8
|
+
= t('workarea.storefront.flash_messages.cart_item_added')
|
9
|
+
|
10
|
+
.product-list__item{ data: { cart_count: current_order.quantity, analytics: add_to_cart_confirmation_analytics_data(@item).to_json } }
|
11
|
+
.product-list__item-cell
|
12
|
+
.product-list__summary
|
13
|
+
%p.product-list__media= link_to image_tag(product_image_url(@item.image, :small_thumb), alt: @item.product_name, class: 'product-list__media-image'), product_url(@item.product, sku: @item.sku), class: 'product-list__media-link'
|
14
|
+
.product-list__info
|
15
|
+
%p.product-list__name= link_to @item.product_name, product_path(@item.product, sku: @item.sku)
|
16
|
+
%p.product-list__id= @item.sku_name
|
17
|
+
- if @item.has_options?
|
18
|
+
.product-list__option-group
|
19
|
+
- @item.details.each do |name, value|
|
20
|
+
%p.product-list__option #{name.titleize}: #{value}
|
21
|
+
- @item.customizations.each do |name, value|
|
22
|
+
%p.product-list__customization #{name.titleize}: #{value}
|
23
|
+
= append_partials('storefront.cart_item_details', item: @item, index: 0)
|
24
|
+
.product-list__item-cell
|
25
|
+
%table.table
|
26
|
+
%thead
|
27
|
+
%tr
|
28
|
+
%th.table__prices= t('workarea.storefront.orders.price')
|
29
|
+
%th#aria_cart_item_quantity.table__quantity= t('workarea.storefront.orders.quantity')
|
30
|
+
%th.table__prices= t('workarea.storefront.orders.total')
|
31
|
+
%tbody
|
32
|
+
%tr
|
33
|
+
%td.table__prices
|
34
|
+
= render 'workarea/storefront/carts/pricing', item: @item, css_block: 'table'
|
35
|
+
%td.table__quantity
|
36
|
+
= form_tag cart_item_path(@item), method: :patch, class: 'inline-form', data: { analytics: update_cart_item_analytics_data(@item).to_json } do
|
37
|
+
.inline-form__cell
|
38
|
+
.quantity-control
|
39
|
+
= button_tag '-', { type: 'button', data: { quantity_control: { 'direction': 'dec', 'autosubmit': true }.to_json }, class: 'quantity-control__button quantity-control__decrement'}
|
40
|
+
.value= number_field_tag :quantity, @item.quantity, min: 1, required: true, class: 'quantity-control__input text-box text-box--x-small', data: { form_submitting_control: '' }, title: t('workarea.storefront.orders.quantity'), id: dom_id(@item, 'cart_item'), aria: { labelledby: 'aria_cart_item_quantity' }
|
41
|
+
= button_tag '+', { type: 'button', data: { quantity_control: { 'direction': 'inc', 'autosubmit': true }.to_json }, class: 'quantity-control__button quantity-control__increment'}
|
42
|
+
|
43
|
+
%p.inline-form__cell.hidden-if-js-enabled= button_tag t('workarea.storefront.carts.update'), value: 'change_quantity', class: 'button'
|
44
|
+
%td.table__prices
|
45
|
+
- @item.total_adjustments.each do |adjustment|
|
46
|
+
%p.table__price
|
47
|
+
- if @item.total_adjustments.many?
|
48
|
+
%span.table__price-label= adjustment.description
|
49
|
+
|
50
|
+
- if adjustment.discount?
|
51
|
+
%strong.table__price-discount= number_to_currency(adjustment.amount)
|
52
|
+
- else
|
53
|
+
%span= number_to_currency(adjustment.amount)
|
54
|
+
|
55
|
+
- if @item.total_adjustments.many?
|
56
|
+
%p.table__price
|
57
|
+
%span.table__price-label= t('workarea.storefront.orders.item_total')
|
58
|
+
%span= number_to_currency(@item.total_price)
|
59
|
+
|
60
|
+
.grid.grid--middle
|
61
|
+
.grid__cell.grid__cell--50
|
62
|
+
.grid__cell= link_to t('workarea.storefront.carts.continue_shopping'), root_path, class: 'text-button', data: { dialog_close_button: true }
|
63
|
+
.grid__cell.grid__cell--50
|
64
|
+
.grid.grid--auto.grid--right.grid--middle
|
65
|
+
.grid__cell= link_to t('workarea.storefront.carts.view_cart'), cart_path, class: 'text-button'
|
66
|
+
.grid__cell= link_to t('workarea.storefront.carts.checkout'), checkout_path, class: 'button'
|
@@ -0,0 +1,175 @@
|
|
1
|
+
- @title = t('workarea.storefront.carts.title')
|
2
|
+
|
3
|
+
.cart.view{ data: { analytics: cart_view_analytics_data(@cart).to_json } }
|
4
|
+
- if @cart.no_items?
|
5
|
+
|
6
|
+
%h1= t('workarea.storefront.carts.empty')
|
7
|
+
|
8
|
+
%p.cart__continue-shopping
|
9
|
+
= link_to t('workarea.storefront.carts.continue_shopping'), root_path, class: 'button'
|
10
|
+
|
11
|
+
- else
|
12
|
+
|
13
|
+
.grid.grid--middle
|
14
|
+
.grid__cell.grid__cell--80-at-medium
|
15
|
+
%h1= t('workarea.storefront.carts.title')
|
16
|
+
|
17
|
+
.grid__cell.grid__cell--20-at-medium
|
18
|
+
.cart__checkout-action-group
|
19
|
+
%p.cart__checkout-action= link_to t('workarea.storefront.carts.checkout'), checkout_path, class: 'button button--large'
|
20
|
+
= append_partials('storefront.cart_checkout_actions', cart: @cart)
|
21
|
+
|
22
|
+
%ul.product-list{ data: { analytics: product_list_analytics_data('Cart').to_json } }
|
23
|
+
- @cart.items.each_with_index do |item, index|
|
24
|
+
%li.product-list__item
|
25
|
+
.product-list__item-cell
|
26
|
+
.product-list__summary
|
27
|
+
%p.product-list__media= link_to image_tag(product_image_url(item.image, :small_thumb), alt: item.product_name, class: 'product-list__media-image'), product_url(item.product, sku: item.sku), class: 'product-list__media-link'
|
28
|
+
.product-list__info
|
29
|
+
%p.product-list__name= link_to item.product_name, product_path(item.product, sku: item.sku)
|
30
|
+
%p.product-list__id= item.sku_name
|
31
|
+
%p.product-list__inventory-status= item.inventory_status
|
32
|
+
- if item.has_options?
|
33
|
+
.product-list__option-group
|
34
|
+
- item.details.each do |name, value|
|
35
|
+
%p.product-list__option #{name.titleize}: #{value}
|
36
|
+
- item.customizations.each do |name, value|
|
37
|
+
%p.product-list__customization #{name.titleize}: #{value}
|
38
|
+
= append_partials('storefront.cart_item_details', item: item, index: index)
|
39
|
+
|
40
|
+
.product-list__actions
|
41
|
+
.grid.grid--auto.grid--left
|
42
|
+
.grid__cell
|
43
|
+
= form_tag cart_item_path(item), method: 'delete', class: 'action-group__item', data: { analytics: remove_from_cart_analytics_data(item).to_json } do
|
44
|
+
%p= button_tag t('workarea.storefront.carts.remove'), value: 'remove_item', class: 'text-button'
|
45
|
+
= append_partials('storefront.cart_item_actions', item: item)
|
46
|
+
|
47
|
+
.product-list__item-cell
|
48
|
+
%table.table
|
49
|
+
%thead
|
50
|
+
%tr
|
51
|
+
%th.table__prices= t('workarea.storefront.orders.price')
|
52
|
+
%th.table__quantity= t('workarea.storefront.orders.quantity')
|
53
|
+
%th.table__prices= t('workarea.storefront.orders.total')
|
54
|
+
%tbody
|
55
|
+
%tr
|
56
|
+
%td.table__prices
|
57
|
+
= render 'workarea/storefront/carts/pricing', item: item, css_block: 'table'
|
58
|
+
%td.table__quantity
|
59
|
+
.product-details__quantity
|
60
|
+
= form_tag cart_item_path(item), method: :patch, class: 'inline-form', data: { analytics: update_cart_item_analytics_data(item).to_json } do
|
61
|
+
.inline-form__cell
|
62
|
+
.quantity-control
|
63
|
+
= button_tag '-', { type: 'button', data: { quantity_control: { 'direction': 'dec', 'autosubmit': true }.to_json }, class: 'quantity-control__button quantity-control__decrement'}
|
64
|
+
.value= number_field_tag :quantity, item.quantity, min: 1, required: true, class: 'quantity-control__input text-box text-box--x-small', data: { form_submitting_control: '' }, title: t('workarea.storefront.orders.quantity'), id: "quantity_#{index}", aria: { label: t('workarea.storefront.orders.quantity') }
|
65
|
+
= button_tag '+', { type: 'button', data: { quantity_control: { 'direction': 'inc', 'autosubmit': true }.to_json }, class: 'quantity-control__button quantity-control__increment'}
|
66
|
+
%p.inline-form__cell.hidden-if-js-enabled= button_tag t('workarea.storefront.carts.update'), value: 'change_quantity', class: 'button'
|
67
|
+
|
68
|
+
%td.table__prices
|
69
|
+
- item.total_adjustments.each do |adjustment|
|
70
|
+
%p.table__price
|
71
|
+
- if item.total_adjustments.many?
|
72
|
+
%span.table__price-label= adjustment.description
|
73
|
+
|
74
|
+
- if adjustment.discount?
|
75
|
+
%strong.table__price-discount= number_to_currency(adjustment.amount)
|
76
|
+
- else
|
77
|
+
%span= number_to_currency(adjustment.amount)
|
78
|
+
|
79
|
+
- if item.total_adjustments.many?
|
80
|
+
%p.table__price
|
81
|
+
%span.table__price-label= t('workarea.storefront.orders.item_total')
|
82
|
+
%span= number_to_currency(item.total_price)
|
83
|
+
- @cart.free_gifts.each do |item|
|
84
|
+
%li.product-list__item
|
85
|
+
.product-list__item-cell
|
86
|
+
.product-list__summary
|
87
|
+
%p.product-list__media= link_to image_tag(product_image_url(item.image, :small_thumb), alt: item.product_name, class: 'product-list__media-image'), product_url(item.product, sku: item.sku), class: 'product-list__media-link'
|
88
|
+
.product-list__info
|
89
|
+
%p.product-list__name= link_to item.product_name, product_path(item.product, sku: item.sku)
|
90
|
+
%p.product-list__id= item.sku
|
91
|
+
.product-list__item-cell
|
92
|
+
%table.table
|
93
|
+
%thead
|
94
|
+
%tr
|
95
|
+
%th.table__prices= t('workarea.storefront.orders.price')
|
96
|
+
%th.table__quantity= t('workarea.storefront.orders.quantity')
|
97
|
+
%th.table__prices= t('workarea.storefront.orders.total')
|
98
|
+
%tbody
|
99
|
+
%tr
|
100
|
+
%td.table__prices
|
101
|
+
%p.table__price
|
102
|
+
%span= t('workarea.storefront.carts.free_gift')
|
103
|
+
%td.table__quantity
|
104
|
+
%p= item.quantity
|
105
|
+
%td.table__prices
|
106
|
+
%p.table__price
|
107
|
+
%span= t('workarea.storefront.carts.free_gift')
|
108
|
+
.grid.grid--right
|
109
|
+
.grid__cell.grid__cell--33-at-medium
|
110
|
+
= optional_field(t('workarea.storefront.carts.enter_promo_code_prompt'), params[:promo_code]) do
|
111
|
+
.cart__promo-code
|
112
|
+
= form_tag add_promo_code_to_cart_path, id: 'promo_code_form', method: 'post', class: 'inline-form' do
|
113
|
+
%h2.heading.heading--4= t('workarea.storefront.orders.promo_code')
|
114
|
+
.inline-form__cell
|
115
|
+
.value= text_field_tag :promo_code, params[:promo_code], class: 'text-box', autocomplete: 'off', autocorrect: 'off', autocapitalize: 'off', required: true, title: t('workarea.storefront.orders.promo_code')
|
116
|
+
%p.inline-form__cell= button_tag t('workarea.storefront.carts.add'), value: 'add_promo_code', class: 'button'
|
117
|
+
|
118
|
+
.grid__cell.grid__cell--33-at-medium
|
119
|
+
= append_partials('storefront.cart_additional_information', cart: @cart)
|
120
|
+
.grid__cell.grid__cell--33-at-medium
|
121
|
+
%table.table.table--totals
|
122
|
+
%tbody
|
123
|
+
%tr
|
124
|
+
%th
|
125
|
+
%span= t('workarea.storefront.orders.subtotal')
|
126
|
+
%td= number_to_currency @cart.subtotal_price
|
127
|
+
- @cart.total_adjustments.each do |adjustment|
|
128
|
+
%tr
|
129
|
+
%th
|
130
|
+
%span= adjustment.description
|
131
|
+
%td
|
132
|
+
- if adjustment.discount?
|
133
|
+
%strong= number_to_currency(adjustment.amount)
|
134
|
+
- else
|
135
|
+
%span= number_to_currency(adjustment.amount)
|
136
|
+
- if @cart.requires_shipping?
|
137
|
+
%tr
|
138
|
+
%th
|
139
|
+
%span= t('workarea.storefront.orders.shipping')
|
140
|
+
%td
|
141
|
+
- if @cart.show_shipping_services?
|
142
|
+
#{@cart.shipping_service} - #{number_to_currency(@cart.shipping_total)}
|
143
|
+
- else
|
144
|
+
= t('workarea.storefront.carts.calculated_at_checkout')
|
145
|
+
%tr
|
146
|
+
%th
|
147
|
+
%span= t('workarea.storefront.orders.tax')
|
148
|
+
%td
|
149
|
+
- if @cart.show_taxes?
|
150
|
+
= number_to_currency @cart.tax_total
|
151
|
+
- else
|
152
|
+
= t('workarea.storefront.carts.calculated_at_checkout')
|
153
|
+
%tr.table__total
|
154
|
+
%th
|
155
|
+
%span= t('workarea.storefront.orders.total')
|
156
|
+
%td= number_to_currency(@cart.total_price)
|
157
|
+
|
158
|
+
.cart__checkout-action-group
|
159
|
+
%p.cart__checkout-action= link_to t('workarea.storefront.carts.checkout'), checkout_path, class: 'button button--large'
|
160
|
+
= append_partials('storefront.cart_checkout_actions', cart: @cart)
|
161
|
+
|
162
|
+
- cache @cart.cache_key, expires_in: Workarea.config.cache_expirations.cart_recommendations_fragment_cache do
|
163
|
+
- if @cart.recommendations.any?
|
164
|
+
.recommendations
|
165
|
+
%h2.recommendations__heading= t('workarea.storefront.recommendations.heading')
|
166
|
+
|
167
|
+
.recommendations__products
|
168
|
+
.grid.grid--flush
|
169
|
+
- @cart.recommendations.each do |product|
|
170
|
+
.grid__cell.grid__cell--50.grid__cell--33-at-medium.grid__cell--16-at-wide
|
171
|
+
.product-summary.product-summary--small
|
172
|
+
= render 'workarea/storefront/products/summary', product: product
|
173
|
+
|
174
|
+
%div{ data: { recommendations_placeholder: recent_views_path } }
|
175
|
+
= append_partials('storefront.cart_show', cart: @cart)
|