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,33 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
#MULI
|
3
|
+
\*------------------------------------*/
|
4
|
+
|
5
|
+
// scss-lint:disable VariableForProperty
|
6
|
+
|
7
|
+
@font-face {
|
8
|
+
font-family: 'Muli';
|
9
|
+
src: font-url('workarea/storefront/muli/muli_regular_webfont.woff2') format('woff2'), font-url('workarea/storefront/muli/muli_regular_webfont.woff') format('woff');
|
10
|
+
font-weight: normal;
|
11
|
+
font-style: normal;
|
12
|
+
}
|
13
|
+
|
14
|
+
@font-face {
|
15
|
+
font-family: 'Muli';
|
16
|
+
src: font-url('workarea/storefront/muli/muli_italic_webfont.woff2') format('woff2'), font-url('workarea/storefront/muli/muli_italic_webfont.woff') format('woff');
|
17
|
+
font-weight: normal;
|
18
|
+
font-style: italic;
|
19
|
+
}
|
20
|
+
|
21
|
+
@font-face {
|
22
|
+
font-family: 'Muli';
|
23
|
+
src: font-url('workarea/storefront/muli/muli_bold_webfont.woff2') format('woff2'), font-url('workarea/storefront/muli/muli_bold_webfont.woff') format('woff');
|
24
|
+
font-weight: bold;
|
25
|
+
font-style: normal;
|
26
|
+
}
|
27
|
+
|
28
|
+
@font-face {
|
29
|
+
font-family: 'Muli';
|
30
|
+
src: font-url('workarea/storefront/muli/muli_bolditalic_webfont.woff2') format('woff2'), font-url('workarea/storefront/muli/muli_bolditalic_webfont.woff') format('woff');
|
31
|
+
font-weight: bold;
|
32
|
+
font-style: italic;
|
33
|
+
}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
#PLAYFAIR_DISPLAY
|
3
|
+
\*------------------------------------*/
|
4
|
+
|
5
|
+
// scss-lint:disable VariableForProperty
|
6
|
+
|
7
|
+
@font-face {
|
8
|
+
font-family: 'Playfair Display';
|
9
|
+
src: font-url('workarea/storefront/Playfair_Display/playfairdisplay_regular_webfont.woff2') format('woff2'), font-url('workarea/storefront/Playfair_Display/playfairdisplay_regular_webfont.woff') format('woff');
|
10
|
+
font-weight: normal;
|
11
|
+
font-style: normal;
|
12
|
+
}
|
13
|
+
|
14
|
+
@font-face {
|
15
|
+
font-family: 'Playfair Display';
|
16
|
+
src: font-url('workarea/storefront/Playfair_Display/playfairdisplay_italic_webfont.woff2') format('woff2'), font-url('workarea/storefront/Playfair_Display/playfairdisplay_italic_webfont.woff') format('woff');
|
17
|
+
font-weight: normal;
|
18
|
+
font-style: italic;
|
19
|
+
}
|
20
|
+
|
21
|
+
@font-face {
|
22
|
+
font-family: 'Playfair Display';
|
23
|
+
src: font-url('workarea/storefront/Playfair_Display/playfairdisplay_bold_webfont.woff2') format('woff2'), font-url('workarea/storefront/Playfair_Display/playfairdisplay_bold_webfont.woff') format('woff');
|
24
|
+
font-weight: bold;
|
25
|
+
font-style: normal;
|
26
|
+
}
|
27
|
+
|
28
|
+
@font-face {
|
29
|
+
font-family: 'Playfair Display';
|
30
|
+
src: font-url('workarea/storefront/Playfair_Display/playfairdisplay_bolditalic_webfont.woff2') format('woff2'), font-url('workarea/storefront/Playfair_Display/playfairdisplay_bolditalic_webfont.woff') format('woff');
|
31
|
+
font-weight: bold;
|
32
|
+
font-style: italic;
|
33
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
#ROBOTO
|
3
|
+
\*------------------------------------*/
|
4
|
+
|
5
|
+
// scss-lint:disable VariableForProperty
|
6
|
+
|
7
|
+
@font-face {
|
8
|
+
font-family: 'Roboto';
|
9
|
+
src: font-url('workarea/storefront/roboto/roboto_regular_webfont.woff2') format('woff2'), font-url('workarea/storefront/roboto/roboto_regular_webfont.woff') format('woff');
|
10
|
+
font-weight: normal;
|
11
|
+
font-style: normal;
|
12
|
+
}
|
13
|
+
|
14
|
+
@font-face {
|
15
|
+
font-family: 'Roboto';
|
16
|
+
src: font-url('workarea/storefront/roboto/roboto_bold_webfont.woff2') format('woff2'), font-url('workarea/storefront/roboto/roboto_bold_webfont.woff') format('woff');
|
17
|
+
font-weight: bold;
|
18
|
+
font-style: normal;
|
19
|
+
}
|
20
|
+
|
21
|
+
@font-face {
|
22
|
+
font-family: 'Roboto';
|
23
|
+
src: font-url('workarea/storefront/roboto/roboto_italic_webfont.woff2') format('woff2'), font-url('workarea/storefront/roboto/roboto_italic_webfont.woff') format('woff');
|
24
|
+
font-weight: normal;
|
25
|
+
font-style: italic;
|
26
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
#SOURCE-SERIF-PRO
|
3
|
+
\*------------------------------------*/
|
4
|
+
|
5
|
+
// scss-lint:disable VariableForProperty
|
6
|
+
|
7
|
+
@font-face {
|
8
|
+
font-family: 'Source Serif Pro';
|
9
|
+
src: font-url('workarea/storefront/source_serif_pro/source_serif_pro_regular_webfont.woff2') format('woff2'), font-url('workarea/storefront/source_serif_pro/source_serif_pro_regular_webfont.woff') format('woff');
|
10
|
+
font-weight: normal;
|
11
|
+
font-style: normal;
|
12
|
+
}
|
13
|
+
|
14
|
+
@font-face {
|
15
|
+
font-family: 'Source Serif Pro';
|
16
|
+
src: font-url('workarea/storefront/source_serif_pro/source_serif_pro_bold_webfont.woff2') format('woff2'), font-url('workarea/storefront/source_serif_pro/source_serif_pro_bold_webfont.woff') format('woff');
|
17
|
+
font-weight: bold;
|
18
|
+
font-style: normal;
|
19
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
#CHECKOUT-SECTION
|
3
|
+
\*------------------------------------*/
|
4
|
+
|
5
|
+
$checkout-section-padding: $spacing-unit * 2 !default;
|
6
|
+
$checkout-section-background-color: $background-color-component !default;
|
7
|
+
|
8
|
+
|
9
|
+
@mixin checkout-section {
|
10
|
+
padding: $checkout-section-padding;
|
11
|
+
background-color: $checkout-section-background-color;
|
12
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/**
|
2
|
+
* full-bleed-container
|
3
|
+
*
|
4
|
+
* Used to make content full bleed when it is wrapped by parent with a max-width
|
5
|
+
* https://css-tricks.com/full-width-containers-limited-width-parents/
|
6
|
+
*/
|
7
|
+
|
8
|
+
@mixin full-bleed-container {
|
9
|
+
position: relative;
|
10
|
+
right: 50%;
|
11
|
+
left: 50%;
|
12
|
+
margin-right: -50vw;
|
13
|
+
margin-left: -50vw;
|
14
|
+
width: 100vw;
|
15
|
+
}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
#HEADING
|
3
|
+
\*------------------------------------*/
|
4
|
+
|
5
|
+
$heading-1-font-size: 36px !default;
|
6
|
+
$heading-2-font-size: 30px !default;
|
7
|
+
$heading-3-font-size: 24px !default;
|
8
|
+
$heading-4-font-size: 20px !default;
|
9
|
+
$heading-5-font-size: 18px !default;
|
10
|
+
$heading-6-font-size: 16px !default;
|
11
|
+
|
12
|
+
$heading-fancy-font-family: $secondary-font-family !default;
|
13
|
+
|
14
|
+
|
15
|
+
/**
|
16
|
+
* Defines common heading element styles.
|
17
|
+
*/
|
18
|
+
h1, h2, h3, h4, h5, h6,
|
19
|
+
%heading,
|
20
|
+
.heading {
|
21
|
+
display: block;
|
22
|
+
margin-bottom: $spacing-unit * 2;
|
23
|
+
color: $heading-color;
|
24
|
+
font-weight: bold;
|
25
|
+
}
|
26
|
+
|
27
|
+
|
28
|
+
/**
|
29
|
+
* Define specific font styles for each heading.
|
30
|
+
*/
|
31
|
+
h1,
|
32
|
+
%heading--1,
|
33
|
+
.heading--1 {
|
34
|
+
font-size: $heading-1-font-size;
|
35
|
+
font-family: $heading-fancy-font-family;
|
36
|
+
}
|
37
|
+
|
38
|
+
h2,
|
39
|
+
%heading--2,
|
40
|
+
.heading--2 {
|
41
|
+
font-size: $heading-2-font-size;
|
42
|
+
}
|
43
|
+
|
44
|
+
h3,
|
45
|
+
%heading--3,
|
46
|
+
.heading--3 {
|
47
|
+
font-size: $heading-3-font-size;
|
48
|
+
}
|
49
|
+
|
50
|
+
h4,
|
51
|
+
%heading--4,
|
52
|
+
.heading--4 {
|
53
|
+
font-size: $heading-4-font-size;
|
54
|
+
}
|
55
|
+
|
56
|
+
h5,
|
57
|
+
%heading--5,
|
58
|
+
.heading--5 {
|
59
|
+
font-size: $heading-5-font-size;
|
60
|
+
}
|
61
|
+
|
62
|
+
h6,
|
63
|
+
%heading--6,
|
64
|
+
.heading--6 {
|
65
|
+
font-size: $heading-6-font-size;
|
66
|
+
}
|
67
|
+
|
68
|
+
%heading--fancy,
|
69
|
+
.heading--fancy {
|
70
|
+
font-family: $heading-fancy-font-family;
|
71
|
+
font-weight: bold;
|
72
|
+
}
|
73
|
+
|
74
|
+
%heading--center-at-small,
|
75
|
+
.heading--center-at-small {
|
76
|
+
text-align: center;
|
77
|
+
|
78
|
+
@include respond-to($medium-breakpoint) {
|
79
|
+
text-align: left;
|
80
|
+
}
|
81
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
#LINKS
|
3
|
+
\*------------------------------------*/
|
4
|
+
|
5
|
+
a,
|
6
|
+
%link,
|
7
|
+
.link {
|
8
|
+
color: $link-color;
|
9
|
+
text-decoration: none;
|
10
|
+
cursor: pointer;
|
11
|
+
|
12
|
+
&:hover {
|
13
|
+
color: $link-color-hover;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
%link--secondary,
|
18
|
+
.link--secondary {
|
19
|
+
color: $link-secondary-color;
|
20
|
+
opacity: 0.6;
|
21
|
+
transition: opacity 0.15s ease-in;
|
22
|
+
|
23
|
+
&:hover {
|
24
|
+
color: $link-secondary-color-hover;
|
25
|
+
opacity: 1;
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
/*------------------------------------*\
|
2
|
+
#TEXT
|
3
|
+
\*------------------------------------*/
|
4
|
+
|
5
|
+
$blockquote-font-size: 20px !default;
|
6
|
+
$blockquote-color: $heading-color;
|
7
|
+
|
8
|
+
p, blockquote,
|
9
|
+
pre {
|
10
|
+
margin-bottom: $vertical-margin;
|
11
|
+
}
|
12
|
+
|
13
|
+
blockquote {
|
14
|
+
color: $blockquote-color;
|
15
|
+
font-size: $blockquote-font-size;
|
16
|
+
font-weight: bold;
|
17
|
+
}
|
18
|
+
|
19
|
+
.text {
|
20
|
+
font-size: 1rem;
|
21
|
+
line-height: $line-height;
|
22
|
+
}
|
23
|
+
|
24
|
+
.text--small {
|
25
|
+
font-size: 0.8rem;
|
26
|
+
}
|
27
|
+
|
28
|
+
.text--large {
|
29
|
+
font-size: 1.2rem;
|
30
|
+
}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
module Workarea
|
2
|
+
module Storefront
|
3
|
+
module OneThemeHelper
|
4
|
+
def navigation_menu_item_parent?(menu)
|
5
|
+
return true unless menu.content.blank? ||
|
6
|
+
ContentViewModel.new(menu.content).content_blocks.blank?
|
7
|
+
end
|
8
|
+
|
9
|
+
# Overriding functionality from Workarea::Storefront::CreditCardsHelper
|
10
|
+
# Adds issuer class modifier to payment icons
|
11
|
+
def credit_card_issuer_icon(issuer)
|
12
|
+
icon_path = if card_icon_available?(issuer.optionize)
|
13
|
+
"workarea/storefront/payment_icons/#{issuer.systemize}.svg"
|
14
|
+
else
|
15
|
+
"workarea/storefront/default_card.svg"
|
16
|
+
end
|
17
|
+
|
18
|
+
inline_svg(icon_path, class: "payment-icon payment-icon--#{issuer.dasherize}", title: issuer.humanize)
|
19
|
+
end
|
20
|
+
|
21
|
+
def media_alt_image_slider_options(product_id)
|
22
|
+
{
|
23
|
+
waitForImages: true,
|
24
|
+
options: {
|
25
|
+
asNavFor: "##{product_id}_primary_media_carousel",
|
26
|
+
slidesToShow: 3,
|
27
|
+
slidesToScroll: 1,
|
28
|
+
autoplay: false,
|
29
|
+
mobileFirst: true,
|
30
|
+
dots: false,
|
31
|
+
arrows: true,
|
32
|
+
focusOnSelect: true,
|
33
|
+
responsive: [
|
34
|
+
{
|
35
|
+
breakpoint: Workarea.config.storefront_break_points[:wide] - 1,
|
36
|
+
settings: {
|
37
|
+
vertical: true,
|
38
|
+
verticalSwiping: true
|
39
|
+
}
|
40
|
+
}
|
41
|
+
]
|
42
|
+
}
|
43
|
+
}.to_json
|
44
|
+
end
|
45
|
+
|
46
|
+
def media_primary_image_slider_options(product_id)
|
47
|
+
{
|
48
|
+
waitForImages: true,
|
49
|
+
options: {
|
50
|
+
asNavFor: "##{product_id}_alt_media_carousel",
|
51
|
+
slidesToShow: 1,
|
52
|
+
slidesToScroll: 1,
|
53
|
+
autoplay: false,
|
54
|
+
mobileFirst: true,
|
55
|
+
dots: false,
|
56
|
+
arrows: false
|
57
|
+
},
|
58
|
+
forceSetPosition: true
|
59
|
+
}.to_json
|
60
|
+
end
|
61
|
+
|
62
|
+
def select_tag(name, option_tags = nil, options = {})
|
63
|
+
content_tag :div, super, class: "select-menu"
|
64
|
+
end
|
65
|
+
|
66
|
+
def no_breadcrumbs?
|
67
|
+
!content_for?(:breadcrumbs) && @breadcrumbs.nil? && request.original_url != root_url
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Workarea
|
2
|
+
class BrowseNavigationSeeds
|
3
|
+
def perform
|
4
|
+
puts "Adding Primary Navigation content..."
|
5
|
+
|
6
|
+
if new = Catalog::Category.find_by(name: 'New') rescue nil
|
7
|
+
taxon = Navigation::Taxon.root.children.create!(navigable: new)
|
8
|
+
menu = Navigation::Menu.create!(taxon: taxon)
|
9
|
+
end
|
10
|
+
|
11
|
+
Workarea.config.default_seeds_taxonomy.each do |top_level, children|
|
12
|
+
page = Content::Page.find_by(name: top_level)
|
13
|
+
categories = Catalog::Category.any_in(name: children)
|
14
|
+
taxon = Navigation::Taxon.root.children.create!(navigable: page)
|
15
|
+
menu = Navigation::Menu.create!(taxon: taxon)
|
16
|
+
|
17
|
+
next if categories.blank?
|
18
|
+
|
19
|
+
content = Content.for(menu)
|
20
|
+
content.blocks.create!(
|
21
|
+
type: "taxonomy_with_category_summary",
|
22
|
+
data: {
|
23
|
+
start: taxon.id,
|
24
|
+
show_starting_taxon: false,
|
25
|
+
category: Workarea::Catalog::Category.sample.try(:id).try(:to_s)
|
26
|
+
}
|
27
|
+
)
|
28
|
+
|
29
|
+
categories.each do |category|
|
30
|
+
taxon.children.create!(navigable: category)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Workarea
|
2
|
+
class ContentBlockPageSeeds
|
3
|
+
def perform
|
4
|
+
puts "Adding content blocks page..."
|
5
|
+
page = Content::Page.create!(
|
6
|
+
name: "Content Blocks"
|
7
|
+
)
|
8
|
+
content = Content.for(page)
|
9
|
+
|
10
|
+
Workarea.config.content_block_types.each do |block_type|
|
11
|
+
unless block_type.tags.include?("taxonomy")
|
12
|
+
content.blocks.build(
|
13
|
+
type: block_type,
|
14
|
+
data: block_type.defaults
|
15
|
+
)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
content.save!
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
module Workarea
|
2
|
+
class ThemeHomePageSeeds
|
3
|
+
include Workarea::Content::AssetLookup
|
4
|
+
|
5
|
+
def perform
|
6
|
+
puts "Adding theme home page content..."
|
7
|
+
|
8
|
+
content = Content.for("Home Page")
|
9
|
+
|
10
|
+
content.blocks.clear
|
11
|
+
|
12
|
+
content.blocks.build(
|
13
|
+
type: "hero_slider",
|
14
|
+
data: {
|
15
|
+
image_1: find_asset_id_by_file_name("960x470_light.png").call,
|
16
|
+
alt_text_1: "Image Alt",
|
17
|
+
heading_1: "First slide heading",
|
18
|
+
sub_heading_1: "Call to action!",
|
19
|
+
url_1: "http://example.com",
|
20
|
+
image_2: find_asset_id_by_file_name("960x470_light.png").call,
|
21
|
+
alt_text_2: "Image Alt 2",
|
22
|
+
heading_2: "Second slide heading",
|
23
|
+
sub_heading_2: "Some more text here...",
|
24
|
+
url_2: "http://example2.com",
|
25
|
+
show_dots: false,
|
26
|
+
show_arrows: true,
|
27
|
+
partial_slide_preview: false,
|
28
|
+
auto_rotate: true,
|
29
|
+
auto_rotate_speed: 3,
|
30
|
+
pause_on_hover: true,
|
31
|
+
stop_on_interaction: true
|
32
|
+
}
|
33
|
+
)
|
34
|
+
|
35
|
+
content.blocks.build(
|
36
|
+
type: "category_summary",
|
37
|
+
data: {
|
38
|
+
image: find_asset_id_by_file_name("100x100.png").call,
|
39
|
+
image_alt: "Description of the image",
|
40
|
+
category: Workarea::Catalog::Category.sample.try(:id).try(:to_s)
|
41
|
+
}
|
42
|
+
)
|
43
|
+
|
44
|
+
product_ids = Array.new(5) { Workarea::Catalog::Product.sample.try(:id) }
|
45
|
+
content.blocks.build(
|
46
|
+
type: "product_list",
|
47
|
+
data: {
|
48
|
+
title: "Featured Products",
|
49
|
+
products: product_ids.compact,
|
50
|
+
auto_rotate: false,
|
51
|
+
auto_rotate_speed: 10,
|
52
|
+
show_dots: false
|
53
|
+
}
|
54
|
+
)
|
55
|
+
content.save!
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|