spree_storefront 5.0.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.md +13 -0
- data/Rakefile +15 -0
- data/app/assets/config/spree_storefront_manifest.js +6 -0
- data/app/assets/stylesheets/storefront_page_builder.css +51 -0
- data/app/controllers/concerns/spree/cart_methods.rb +40 -0
- data/app/controllers/concerns/spree/locale_urls.rb +23 -0
- data/app/controllers/concerns/spree/password_protected.rb +17 -0
- data/app/controllers/concerns/spree/theme_concern.rb +29 -0
- data/app/controllers/spree/account/addresses_controller.rb +16 -0
- data/app/controllers/spree/account/base_controller.rb +20 -0
- data/app/controllers/spree/account/newsletter_controller.rb +34 -0
- data/app/controllers/spree/account/orders_controller.rb +34 -0
- data/app/controllers/spree/account/profile_controller.rb +23 -0
- data/app/controllers/spree/account/store_credits_controller.rb +23 -0
- data/app/controllers/spree/account/wished_items_controller.rb +45 -0
- data/app/controllers/spree/addresses_controller.rb +101 -0
- data/app/controllers/spree/checkout_controller.rb +365 -0
- data/app/controllers/spree/contacts_controller.rb +46 -0
- data/app/controllers/spree/digital_links_controller.rb +48 -0
- data/app/controllers/spree/home_controller.rb +5 -0
- data/app/controllers/spree/line_items_controller.rb +96 -0
- data/app/controllers/spree/newsletter_subscribers_controller.rb +43 -0
- data/app/controllers/spree/order_status_controller.rb +32 -0
- data/app/controllers/spree/orders_controller.rb +104 -0
- data/app/controllers/spree/page_sections_controller.rb +17 -0
- data/app/controllers/spree/pages_controller.rb +13 -0
- data/app/controllers/spree/password_controller.rb +21 -0
- data/app/controllers/spree/policies_controller.rb +17 -0
- data/app/controllers/spree/posts_controller.rb +76 -0
- data/app/controllers/spree/products_controller.rb +99 -0
- data/app/controllers/spree/search_controller.rb +39 -0
- data/app/controllers/spree/seo_controller.rb +25 -0
- data/app/controllers/spree/settings_controller.rb +68 -0
- data/app/controllers/spree/store_controller.rb +247 -0
- data/app/controllers/spree/taxonomies_controller.rb +30 -0
- data/app/controllers/spree/taxons_controller.rb +46 -0
- data/app/controllers/spree/wishlists_controller.rb +19 -0
- data/app/finders/spree/storefront/variant_finder.rb +80 -0
- data/app/helpers/spree/analytics_helper.rb +28 -0
- data/app/helpers/spree/cart_helper.rb +48 -0
- data/app/helpers/spree/checkout_analytics_helper.rb +77 -0
- data/app/helpers/spree/checkout_helper.rb +58 -0
- data/app/helpers/spree/filters_helper.rb +180 -0
- data/app/helpers/spree/fonts_helper.rb +58 -0
- data/app/helpers/spree/orders_helper.rb +7 -0
- data/app/helpers/spree/page_helper.rb +67 -0
- data/app/helpers/spree/posts_helper.rb +42 -0
- data/app/helpers/spree/products_helper.rb +205 -0
- data/app/helpers/spree/storefront_helper.rb +86 -0
- data/app/helpers/spree/storefront_locale_helper.rb +42 -0
- data/app/helpers/spree/theme_helper.rb +244 -0
- data/app/helpers/spree/turbo_helper.rb +13 -0
- data/app/helpers/spree/turbo_stream_actions_helper.rb +13 -0
- data/app/helpers/spree/wishlist_helper.rb +7 -0
- data/app/javascript/spree/storefront/application.js +156 -0
- data/app/javascript/spree/storefront/controllers/accordion_controller.js +25 -0
- data/app/javascript/spree/storefront/controllers/account_nav_controller.js +10 -0
- data/app/javascript/spree/storefront/controllers/card_validation_controller.js +103 -0
- data/app/javascript/spree/storefront/controllers/carousel_controller.js +44 -0
- data/app/javascript/spree/storefront/controllers/cart_controller.js +10 -0
- data/app/javascript/spree/storefront/controllers/checkout_address_book_controller.js +28 -0
- data/app/javascript/spree/storefront/controllers/checkout_delivery_controller.js +39 -0
- data/app/javascript/spree/storefront/controllers/checkout_promotions_controller.js +28 -0
- data/app/javascript/spree/storefront/controllers/checkout_summary_controller.js +46 -0
- data/app/javascript/spree/storefront/controllers/clear_input_controller.js +23 -0
- data/app/javascript/spree/storefront/controllers/copy_input_controller.js +19 -0
- data/app/javascript/spree/storefront/controllers/dropdown_controller.js +14 -0
- data/app/javascript/spree/storefront/controllers/header_controller.js +33 -0
- data/app/javascript/spree/storefront/controllers/infinite_scroll_controller.js +31 -0
- data/app/javascript/spree/storefront/controllers/lightbox_controller.js +138 -0
- data/app/javascript/spree/storefront/controllers/mobile_nav_controller.js +17 -0
- data/app/javascript/spree/storefront/controllers/modal_controller.js +15 -0
- data/app/javascript/spree/storefront/controllers/no_ui_slider_controller.js +55 -0
- data/app/javascript/spree/storefront/controllers/pdp_desktop_gallery_controller.js +28 -0
- data/app/javascript/spree/storefront/controllers/plp_variant_picker_controller.js +151 -0
- data/app/javascript/spree/storefront/controllers/product_form_controller.js +136 -0
- data/app/javascript/spree/storefront/controllers/quantity_picker_controller.js +43 -0
- data/app/javascript/spree/storefront/controllers/search_suggestions_controller.js +61 -0
- data/app/javascript/spree/storefront/controllers/searchable_list_controller.js +25 -0
- data/app/javascript/spree/storefront/controllers/slideover_controller.js +40 -0
- data/app/javascript/spree/storefront/controllers/sticky_button_controller.js +32 -0
- data/app/javascript/spree/storefront/controllers/toggle_menu_controller.js +32 -0
- data/app/javascript/spree/storefront/controllers/turbo_stream_form_controller.js +51 -0
- data/app/javascript/spree/storefront/controllers/wished_item_controller.js +69 -0
- data/app/javascript/spree/storefront/helpers/lazy_load_controllers_with_manifest.js +78 -0
- data/app/javascript/spree/storefront/helpers/show_flash_message.js +25 -0
- data/app/models/spree/color_names.rb +35 -0
- data/app/models/spree/contact.rb +24 -0
- data/app/presenters/spree/colors_preview_styles_presenter.rb +84 -0
- data/app/presenters/spree/featured_product_presenter.rb +42 -0
- data/app/presenters/spree/mega_nav_presenter.rb +55 -0
- data/app/views/devise/passwords/edit.html.erb +22 -0
- data/app/views/devise/passwords/new.html.erb +16 -0
- data/app/views/devise/registrations/_form.html.erb +21 -0
- data/app/views/devise/registrations/edit.html.erb +24 -0
- data/app/views/devise/registrations/new.html.erb +27 -0
- data/app/views/devise/sessions/new.html.erb +25 -0
- data/app/views/devise/shared/_links.html.erb +22 -0
- data/app/views/layouts/spree/checkout.html.erb +58 -0
- data/app/views/layouts/spree/password.html.erb +34 -0
- data/app/views/layouts/spree/storefront.html.erb +38 -0
- data/app/views/spree/account/wished_items/create.turbo_stream.erb +8 -0
- data/app/views/spree/account/wished_items/destroy.turbo_stream.erb +20 -0
- data/app/views/spree/addresses/destroy.turbo_stream.erb +1 -0
- data/app/views/spree/addresses/edit.html.erb +57 -0
- data/app/views/spree/addresses/new.html.erb +71 -0
- data/app/views/spree/checkout/_address.html.erb +153 -0
- data/app/views/spree/checkout/_button_processing.html.erb +7 -0
- data/app/views/spree/checkout/_coupon_code.html.erb +55 -0
- data/app/views/spree/checkout/_credit_card.html.erb +12 -0
- data/app/views/spree/checkout/_delivery.html.erb +70 -0
- data/app/views/spree/checkout/_line_item.html.erb +26 -0
- data/app/views/spree/checkout/_line_items.html.erb +7 -0
- data/app/views/spree/checkout/_missing_all_line_items.html.erb +17 -0
- data/app/views/spree/checkout/_missing_line_items.html.erb +28 -0
- data/app/views/spree/checkout/_payment.html.erb +35 -0
- data/app/views/spree/checkout/_payment_methods.html.erb +72 -0
- data/app/views/spree/checkout/_payment_sources.html.erb +24 -0
- data/app/views/spree/checkout/_quick_checkout.html.erb +1 -0
- data/app/views/spree/checkout/_sidebar.html.erb +34 -0
- data/app/views/spree/checkout/_store_credit.html.erb +21 -0
- data/app/views/spree/checkout/_summary.html.erb +116 -0
- data/app/views/spree/checkout/_user_account.html.erb +9 -0
- data/app/views/spree/checkout/apply_coupon_code.turbo_stream.erb +45 -0
- data/app/views/spree/checkout/apply_store_credit.turbo_stream.erb +19 -0
- data/app/views/spree/checkout/edit.html.erb +98 -0
- data/app/views/spree/checkout/payment/_check.html.erb +0 -0
- data/app/views/spree/checkout/payment/_gateway.html.erb +74 -0
- data/app/views/spree/checkout/payment/_store_credit.html.erb +13 -0
- data/app/views/spree/checkout/remove_coupon_code.turbo_stream.erb +34 -0
- data/app/views/spree/checkout/remove_store_credit.turbo_stream.erb +19 -0
- data/app/views/spree/checkout/update.turbo_stream.erb +25 -0
- data/app/views/spree/home/index.html.erb +1 -0
- data/app/views/spree/line_items/create.turbo_stream.erb +13 -0
- data/app/views/spree/line_items/destroy.turbo_stream.erb +11 -0
- data/app/views/spree/line_items/update.turbo_stream.erb +10 -0
- data/app/views/spree/newsletter_subscribers/create.turbo_stream.erb +7 -0
- data/app/views/spree/order_status/new.html.erb +16 -0
- data/app/views/spree/page_sections/show.html.erb +3 -0
- data/app/views/spree/pages/show.html.erb +1 -0
- data/app/views/spree/password/show.html.erb +1 -0
- data/app/views/spree/posts/index.html.erb +1 -0
- data/app/views/spree/posts/related_products.html.erb +7 -0
- data/app/views/spree/posts/show.html.erb +1 -0
- data/app/views/spree/products/index.html.erb +1 -0
- data/app/views/spree/products/index.turbo_stream.erb +1 -0
- data/app/views/spree/products/related.html.erb +3 -0
- data/app/views/spree/products/show.html.erb +1 -0
- data/app/views/spree/search/show.html.erb +6 -0
- data/app/views/spree/search/show.turbo_stream.erb +1 -0
- data/app/views/spree/search/suggestions.turbo_stream.erb +8 -0
- data/app/views/spree/seo/robots.text.erb +31 -0
- data/app/views/spree/seo/sitemap.xml.erb +25 -0
- data/app/views/spree/shared/_fonts.html.erb +14 -0
- data/app/views/spree/shared/_head.html.erb +36 -0
- data/app/views/spree/shared/_load_more_products.turbo_stream.erb +7 -0
- data/app/views/spree/shared/_product_listing_page.html.erb +11 -0
- data/app/views/spree/shared/_products.html.erb +1 -0
- data/app/views/spree/taxonomies/show.html.erb +1 -0
- data/app/views/spree/taxons/show.html.erb +1 -0
- data/app/views/spree/taxons/show.turbo_stream.erb +1 -0
- data/app/views/spree/waitlists/create.turbo_stream.erb +9 -0
- data/app/views/themes/default/kaminari/storefront/_first_page.html.erb +8 -0
- data/app/views/themes/default/kaminari/storefront/_gap.html.erb +8 -0
- data/app/views/themes/default/kaminari/storefront/_last_page.html.erb +8 -0
- data/app/views/themes/default/kaminari/storefront/_next_page.html.erb +13 -0
- data/app/views/themes/default/kaminari/storefront/_page.html.erb +10 -0
- data/app/views/themes/default/kaminari/storefront/_paginator.html.erb +27 -0
- data/app/views/themes/default/kaminari/storefront/_prev_page.html.erb +13 -0
- data/app/views/themes/default/spree/account/_account_nav.html.erb +46 -0
- data/app/views/themes/default/spree/account/_order.html.erb +39 -0
- data/app/views/themes/default/spree/account/_orders.html.erb +16 -0
- data/app/views/themes/default/spree/account/addresses/_address.html.erb +42 -0
- data/app/views/themes/default/spree/account/addresses/index.html.erb +28 -0
- data/app/views/themes/default/spree/account/newsletter/_newsletter_settings.html.erb +13 -0
- data/app/views/themes/default/spree/account/newsletter/edit.html.erb +16 -0
- data/app/views/themes/default/spree/account/newsletter/update.html.erb +1 -0
- data/app/views/themes/default/spree/account/orders/index.html.erb +24 -0
- data/app/views/themes/default/spree/account/orders/show.html.erb +22 -0
- data/app/views/themes/default/spree/account/profile/edit.html.erb +36 -0
- data/app/views/themes/default/spree/account/store_credits/_store_credit_event.html.erb +29 -0
- data/app/views/themes/default/spree/account/store_credits/index.html.erb +31 -0
- data/app/views/themes/default/spree/checkout/_footer.html.erb +10 -0
- data/app/views/themes/default/spree/checkout/complete.html.erb +84 -0
- data/app/views/themes/default/spree/contacts/new.html.erb +23 -0
- data/app/views/themes/default/spree/orders/_cart.html.erb +14 -0
- data/app/views/themes/default/spree/orders/_empty.html.erb +11 -0
- data/app/views/themes/default/spree/orders/_line_item.html.erb +47 -0
- data/app/views/themes/default/spree/orders/_line_item_quantity.html.erb +11 -0
- data/app/views/themes/default/spree/orders/_summary.html.erb +41 -0
- data/app/views/themes/default/spree/orders/edit.html.erb +18 -0
- data/app/views/themes/default/spree/orders/show.html.erb +6 -0
- data/app/views/themes/default/spree/page_sections/_announcement_bar.html.erb +10 -0
- data/app/views/themes/default/spree/page_sections/_custom_code.html.erb +5 -0
- data/app/views/themes/default/spree/page_sections/_featured_product.html.erb +136 -0
- data/app/views/themes/default/spree/page_sections/_featured_taxon.html.erb +116 -0
- data/app/views/themes/default/spree/page_sections/_featured_taxons.html.erb +71 -0
- data/app/views/themes/default/spree/page_sections/_footer.html.erb +62 -0
- data/app/views/themes/default/spree/page_sections/_header.html.erb +166 -0
- data/app/views/themes/default/spree/page_sections/_image_banner.html.erb +57 -0
- data/app/views/themes/default/spree/page_sections/_image_with_text.html.erb +66 -0
- data/app/views/themes/default/spree/page_sections/_main_password_footer.html.erb +64 -0
- data/app/views/themes/default/spree/page_sections/_main_password_header.html.erb +54 -0
- data/app/views/themes/default/spree/page_sections/_newsletter.html.erb +47 -0
- data/app/views/themes/default/spree/page_sections/_page_title.html.erb +7 -0
- data/app/views/themes/default/spree/page_sections/_post_details.html.erb +19 -0
- data/app/views/themes/default/spree/page_sections/_post_grid.html.erb +11 -0
- data/app/views/themes/default/spree/page_sections/_product_details.html.erb +102 -0
- data/app/views/themes/default/spree/page_sections/_product_grid.html.erb +52 -0
- data/app/views/themes/default/spree/page_sections/_related_products.html.erb +15 -0
- data/app/views/themes/default/spree/page_sections/_rich_text.html.erb +18 -0
- data/app/views/themes/default/spree/page_sections/_taxon_banner.html.erb +37 -0
- data/app/views/themes/default/spree/page_sections/_taxon_grid.html.erb +103 -0
- data/app/views/themes/default/spree/page_sections/_video.html.erb +27 -0
- data/app/views/themes/default/spree/page_sections/nav/_desktop.html.erb +49 -0
- data/app/views/themes/default/spree/page_sections/nav/_mobile.html.erb +136 -0
- data/app/views/themes/default/spree/policies/show.html.erb +11 -0
- data/app/views/themes/default/spree/posts/_json_ld.html.erb +20 -0
- data/app/views/themes/default/spree/posts/_pagination.html.erb +1 -0
- data/app/views/themes/default/spree/posts/_post.html.erb +13 -0
- data/app/views/themes/default/spree/products/_add_to_cart_button.html.erb +58 -0
- data/app/views/themes/default/spree/products/_add_to_waitlist.html.erb +36 -0
- data/app/views/themes/default/spree/products/_add_to_wishlist.html.erb +33 -0
- data/app/views/themes/default/spree/products/_breadcrumbs.html.erb +23 -0
- data/app/views/themes/default/spree/products/_color_picker.html.erb +19 -0
- data/app/views/themes/default/spree/products/_color_swatches.html.erb +61 -0
- data/app/views/themes/default/spree/products/_details.html.erb +55 -0
- data/app/views/themes/default/spree/products/_featured_image.html.erb +37 -0
- data/app/views/themes/default/spree/products/_filters.html.erb +45 -0
- data/app/views/themes/default/spree/products/_json_ld.html.erb +38 -0
- data/app/views/themes/default/spree/products/_json_ld_list.html.erb +9 -0
- data/app/views/themes/default/spree/products/_json_ld_variant.html.erb +10 -0
- data/app/views/themes/default/spree/products/_label.html.erb +26 -0
- data/app/views/themes/default/spree/products/_media_gallery.html.erb +94 -0
- data/app/views/themes/default/spree/products/_price.html.erb +59 -0
- data/app/views/themes/default/spree/products/_product.html.erb +62 -0
- data/app/views/themes/default/spree/products/_quantity_selector.html.erb +32 -0
- data/app/views/themes/default/spree/products/_returns_policy_modal.html.erb +22 -0
- data/app/views/themes/default/spree/products/_show_more_button.html.erb +8 -0
- data/app/views/themes/default/spree/products/_sort.html.erb +45 -0
- data/app/views/themes/default/spree/products/_swiper.html.erb +85 -0
- data/app/views/themes/default/spree/products/_tags.html.erb +0 -0
- data/app/views/themes/default/spree/products/_variant_options.html.erb +71 -0
- data/app/views/themes/default/spree/products/_variant_picker.html.erb +50 -0
- data/app/views/themes/default/spree/products/filters/_availability.html.erb +32 -0
- data/app/views/themes/default/spree/products/filters/_colors.html.erb +23 -0
- data/app/views/themes/default/spree/products/filters/_generic.html.erb +75 -0
- data/app/views/themes/default/spree/products/filters/_price.html.erb +35 -0
- data/app/views/themes/default/spree/products/filters/_taxons.erb +78 -0
- data/app/views/themes/default/spree/search/_suggestions.html.erb +92 -0
- data/app/views/themes/default/spree/settings/show.html.erb +32 -0
- data/app/views/themes/default/spree/shared/_account_pane.html.erb +28 -0
- data/app/views/themes/default/spree/shared/_address.html.erb +35 -0
- data/app/views/themes/default/spree/shared/_cart_icon.html.erb +13 -0
- data/app/views/themes/default/spree/shared/_cart_pane.html.erb +38 -0
- data/app/views/themes/default/spree/shared/_css_variables.html.erb +54 -0
- data/app/views/themes/default/spree/shared/_custom_head.html.erb +0 -0
- data/app/views/themes/default/spree/shared/_error_messages.html.erb +9 -0
- data/app/views/themes/default/spree/shared/_error_messages_without_base_attribute.html.erb +15 -0
- data/app/views/themes/default/spree/shared/_flash.html.erb +16 -0
- data/app/views/themes/default/spree/shared/_flashes.html.erb +10 -0
- data/app/views/themes/default/spree/shared/_json_ld.html.erb +32 -0
- data/app/views/themes/default/spree/shared/_line_item_options.html.erb +18 -0
- data/app/views/themes/default/spree/shared/_logo.html.erb +42 -0
- data/app/views/themes/default/spree/shared/_meta_tags.html.erb +45 -0
- data/app/views/themes/default/spree/shared/_order_details.html.erb +106 -0
- data/app/views/themes/default/spree/shared/_order_line_item.html.erb +65 -0
- data/app/views/themes/default/spree/shared/_order_shipment.html.erb +71 -0
- data/app/views/themes/default/spree/shared/_search.html.erb +32 -0
- data/app/views/themes/default/spree/shared/_title.html.erb +3 -0
- data/app/views/themes/default/spree/shared/_wishlist_icon.html.erb +13 -0
- data/app/views/themes/default/spree/shared/icons/_account.html.erb +17 -0
- data/app/views/themes/default/spree/shared/icons/_arrow-left.html.erb +8 -0
- data/app/views/themes/default/spree/shared/icons/_arrow-right.html.erb +3 -0
- data/app/views/themes/default/spree/shared/icons/_bell.html.erb +9 -0
- data/app/views/themes/default/spree/shared/icons/_cart.html.erb +10 -0
- data/app/views/themes/default/spree/shared/icons/_cart_48.html.erb +6 -0
- data/app/views/themes/default/spree/shared/icons/_check.html.erb +4 -0
- data/app/views/themes/default/spree/shared/icons/_chevron.html.erb +15 -0
- data/app/views/themes/default/spree/shared/icons/_chevron_down.html.erb +5 -0
- data/app/views/themes/default/spree/shared/icons/_chevron_right.html.erb +15 -0
- data/app/views/themes/default/spree/shared/icons/_chevron_up.html.erb +3 -0
- data/app/views/themes/default/spree/shared/icons/_close.html.erb +9 -0
- data/app/views/themes/default/spree/shared/icons/_cross.html.erb +16 -0
- data/app/views/themes/default/spree/shared/icons/_delete.html.erb +3 -0
- data/app/views/themes/default/spree/shared/icons/_delivery.html.erb +5 -0
- data/app/views/themes/default/spree/shared/icons/_disabled.html.erb +13 -0
- data/app/views/themes/default/spree/shared/icons/_edit.html.erb +3 -0
- data/app/views/themes/default/spree/shared/icons/_facebook.html.erb +16 -0
- data/app/views/themes/default/spree/shared/icons/_filter.html.erb +8 -0
- data/app/views/themes/default/spree/shared/icons/_heart.html.erb +12 -0
- data/app/views/themes/default/spree/shared/icons/_info.html.erb +7 -0
- data/app/views/themes/default/spree/shared/icons/_instagram.html.erb +18 -0
- data/app/views/themes/default/spree/shared/icons/_lock.html.erb +13 -0
- data/app/views/themes/default/spree/shared/icons/_menu.html.erb +10 -0
- data/app/views/themes/default/spree/shared/icons/_minus.html.erb +5 -0
- data/app/views/themes/default/spree/shared/icons/_pinch.html.erb +6 -0
- data/app/views/themes/default/spree/shared/icons/_pinterest.html.erb +8 -0
- data/app/views/themes/default/spree/shared/icons/_plus.html.erb +17 -0
- data/app/views/themes/default/spree/shared/icons/_return.html.erb +11 -0
- data/app/views/themes/default/spree/shared/icons/_search.html.erb +17 -0
- data/app/views/themes/default/spree/shared/icons/_spinner.html.erb +1 -0
- data/app/views/themes/default/spree/shared/icons/_spotify.html.erb +8 -0
- data/app/views/themes/default/spree/shared/icons/_tiktok.html.erb +9 -0
- data/app/views/themes/default/spree/shared/icons/_twitter.html.erb +16 -0
- data/app/views/themes/default/spree/shared/icons/_youtube.html.erb +9 -0
- data/app/views/themes/default/spree/shared/icons/_zoom.html.erb +10 -0
- data/app/views/themes/default/spree/wishlists/_no_wished_items.html.erb +10 -0
- data/app/views/themes/default/spree/wishlists/_wished_item.html.erb +38 -0
- data/app/views/themes/default/spree/wishlists/show.html.erb +17 -0
- data/config/i18n-tasks.yml +176 -0
- data/config/importmap.rb +22 -0
- data/config/initializers/assets.rb +1 -0
- data/config/initializers/heroicon.rb +10 -0
- data/config/locales/en.yml +76 -0
- data/config/routes.rb +88 -0
- data/lib/generators/spree/storefront/install/install_generator.rb +45 -0
- data/lib/generators/spree/storefront/install/templates/application.tailwind.css +1760 -0
- data/lib/generators/spree/storefront/install/templates/dev +16 -0
- data/lib/generators/spree/storefront/install/templates/tailwind.config.js +128 -0
- data/lib/generators/spree/storefront/theme/templates/model.rb.tt +12 -0
- data/lib/generators/spree/storefront/theme/theme_generator.rb +41 -0
- data/lib/spree/storefront/configuration.rb +11 -0
- data/lib/spree/storefront/engine.rb +51 -0
- data/lib/spree/storefront/testing_support/capybara_utils.rb +13 -0
- data/lib/spree/storefront.rb +16 -0
- data/lib/spree_storefront.rb +1 -0
- data/vendor/colornames.json +1 -0
- data/vendor/javascript/@kanety--stimulus-accordion.js +4 -0
- data/vendor/javascript/@stimulus-components--carousel.js +4 -0
- data/vendor/javascript/card-validator.js +4 -0
- data/vendor/javascript/credit-card-type.js +4 -0
- data/vendor/javascript/headroom.js.js +19 -0
- data/vendor/javascript/nouislider.js +4 -0
- data/vendor/javascript/photoswipe--dist--photoswipe-lightbox.esm.js.js +667 -0
- data/vendor/javascript/photoswipe.js +1675 -0
- data/vendor/javascript/stimulus-read-more.js +4 -0
- data/vendor/javascript/stimulus-scroll-to.js +4 -0
- data/vendor/javascript/swiper--bundle.js +4 -0
- metadata +567 -0
@@ -0,0 +1,92 @@
|
|
1
|
+
<% loaded ||= false %>
|
2
|
+
<% taxons ||= [] %>
|
3
|
+
<% product_limit ||= 20 %>
|
4
|
+
<% products ||= [] %>
|
5
|
+
<% has_more ||= products.any? && products.count > product_limit %>
|
6
|
+
|
7
|
+
<div class="bg-background w-full h-full flex flex-col">
|
8
|
+
<div class="uppercase block py-4 lg:py-6 border-b border-default w-full font-semibold text-sm tracking-widest">
|
9
|
+
<h3 class="page-container"><%= Spree.t(:top_suggestions) %></h3>
|
10
|
+
</div>
|
11
|
+
<div class="flex flex-col md:grid md:grid-cols-4 grid-rows-[1fr_min-content] w-full page-container h-full">
|
12
|
+
<% if loaded %>
|
13
|
+
<div class="flex flex-col justify-between md:!border-r border-default md:h-full md:w-full animate-fadeIn relative border-b md:!border-b-0 w-auto -mx-4">
|
14
|
+
<div class="flex flex-col md:pr-6 mb-4">
|
15
|
+
<h3 class="text-sm uppercase px-4 py-6"><%= Spree.t(:categories) %></h3>
|
16
|
+
<% if taxons.any? %>
|
17
|
+
<% taxons.limit(5).each do |taxon| %>
|
18
|
+
<%= link_to spree.nested_taxons_path(taxon), class: "leading-snug flex justify-between w-full p-4 hover:bg-accent" do %>
|
19
|
+
<%= taxon.name %>
|
20
|
+
<%= render 'spree/shared/icons/chevron_right' %>
|
21
|
+
<% end %>
|
22
|
+
<% end %>
|
23
|
+
<% end %>
|
24
|
+
</div>
|
25
|
+
<% if has_more %>
|
26
|
+
<div class="fixed md:sticky py-6 px-4 bottom-0 left-0 bg-accent w-full z-[60]">
|
27
|
+
<%= link_to spree.search_path(q: query), class: "btn-primary text-center uppercase flex items-baseline justify-center" do %>
|
28
|
+
<span class="whitespace-nowrap"><%= Spree.t(:search_all) %> "</span>
|
29
|
+
<span class="whitespace-nowrap overflow-ellipsis w-min max-w-[12ch] overflow-hidden inline"><%= query %></span>
|
30
|
+
<span>"</span>
|
31
|
+
<% end %>
|
32
|
+
</div>
|
33
|
+
<% end %>
|
34
|
+
</div>
|
35
|
+
<div class="md:pl-[3.75rem] py-6 w-full h-full md:col-span-3 animate-fadeIn">
|
36
|
+
<% if products.present? %>
|
37
|
+
<div>
|
38
|
+
<%= render 'spree/products/swiper',
|
39
|
+
section: theme_layout_sections['header'],
|
40
|
+
products: products.limit(product_limit),
|
41
|
+
desktop_slides: 3,
|
42
|
+
heading: Spree.t(:products),
|
43
|
+
pagination: 'top',
|
44
|
+
heading_class: "text-sm uppercase !leading-4 -mb-4 lg:mb-0 tracking-widest" %>
|
45
|
+
</div>
|
46
|
+
<% else %>
|
47
|
+
<p class="text-center text-sm text-neutral font-bold">
|
48
|
+
<%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::Product)) %>.
|
49
|
+
</p>
|
50
|
+
<% end %>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<% if has_more && taxons.none? %>
|
54
|
+
<div class="fixed md:relative md:col-span-2 lg:col-span-1 py-6 px-10 bottom-0 left-0 bg-accent w-full z-[60]">
|
55
|
+
<%= link_to spree.search_path(q: query), class: "btn-primary text-center uppercase flex items-baseline justify-center" do %>
|
56
|
+
<span class="whitespace-nowrap"><%= Spree.t(:search_all) %> "</span>
|
57
|
+
<span class="whitespace-nowrap overflow-ellipsis w-min max-w-[12ch] overflow-hidden inline"><%= query %></span>
|
58
|
+
<span>"</span>
|
59
|
+
<% end %>
|
60
|
+
</div>
|
61
|
+
<% end %>
|
62
|
+
|
63
|
+
<% else %>
|
64
|
+
<div class="flex flex-col p-4 md:border-r1 border-default pl-4 gap-2 md:h-full w-full">
|
65
|
+
<% 5.times do %>
|
66
|
+
<div class="block w-full animate-pulse bg-accent h-6"></div>
|
67
|
+
<% end %>
|
68
|
+
</div>
|
69
|
+
<div class='grid grid-cols-1 lg:grid-cols-12 gap-4 lg:gap-6 px-4 md:px-[3.75rem] py-6 w-full h-full md:col-span-3 animate-pulse'>
|
70
|
+
<div class='lg:col-span-12 flex justify-between flex-col overflow-hidden'>
|
71
|
+
<div class='grid gap-4 lg:gap-6 grid-cols-8 lg:grid-cols-12'>
|
72
|
+
<div class='col-span-6 lg:col-span-4'>
|
73
|
+
<div class='aspect-1 bg-accent w-full'></div>
|
74
|
+
<div class='h-6 mt-2 w-32 bg-accent rounded'></div>
|
75
|
+
<div class='h-8 mt-2 w-16 bg-accent rounded'></div>
|
76
|
+
</div>
|
77
|
+
<div class='col-span-2 lg:col-span-4 flex flex-col h-full overflow-hidden'>
|
78
|
+
<div class='h-full lg:aspect-1 bg-accent w-full'></div>
|
79
|
+
<div class='h-6 mt-2 w-32 bg-accent rounded shrink-0'></div>
|
80
|
+
<div class='h-8 mt-2 w-16 bg-accent rounded shrink-0'></div>
|
81
|
+
</div>
|
82
|
+
<div class='hidden col-span-2 lg:col-span-4 lg:flex flex-col h-full overflow-hidden'>
|
83
|
+
<div class='h-full lg:aspect-1 bg-accent w-full'></div>
|
84
|
+
<div class='h-6 mt-2 w-32 bg-accent rounded shrink-0'></div>
|
85
|
+
<div class='h-8 mt-2 w-16 bg-accent rounded shrink-0'></div>
|
86
|
+
</div>
|
87
|
+
</div>
|
88
|
+
</div>
|
89
|
+
</div>
|
90
|
+
<% end %>
|
91
|
+
</div>
|
92
|
+
</div>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<%= turbo_frame_tag :settings_modal do %>
|
2
|
+
<div
|
3
|
+
data-modal-target="container"
|
4
|
+
data-action="click->modal#closeBackground keyup@window->modal#closeWithKeyboard"
|
5
|
+
class="currency-and-locale-modal hidden animate-fadeIn fixed inset-0 overflow-y-auto flex items-end md:items-center justify-center z-[9999] h-dvh w-full"
|
6
|
+
style="animation-duration: 150ms;">
|
7
|
+
<div class="w-full lg:w-[600px] relative h-auto lg:max-h-screen flex justify-center flex-col gap-4 bg-background p-5 ">
|
8
|
+
<button
|
9
|
+
type="button"
|
10
|
+
data-action="modal#close"
|
11
|
+
class="absolute top-5 right-5">
|
12
|
+
<%= render 'spree/shared/icons/close' %>
|
13
|
+
</button>
|
14
|
+
<h3 class="text-lg font-bold"><%= Spree.t("i18n.localization_settings") %></h3>
|
15
|
+
<%= form_with url: spree.settings_path, method: :put, class: 'flex flex-col gap-4', data: {turbo: false} do |f| %>
|
16
|
+
<% if should_render_currency_dropdown? %>
|
17
|
+
<div class="flex flex-col gap-2">
|
18
|
+
<%= f.label :switch_to_currency, Spree.t(:currency), class: 'text-xs text-neutral-600' %>
|
19
|
+
<%= f.select :switch_to_currency, options_for_select(supported_currency_options, current_currency) %>
|
20
|
+
</div>
|
21
|
+
<% end %>
|
22
|
+
<% if should_render_locale_dropdown? %>
|
23
|
+
<div class="flex flex-col gap-2">
|
24
|
+
<%= f.label :switch_to_locale, Spree.t("i18n.language"), class: 'text-xs text-neutral-600' %>
|
25
|
+
<%= f.select :switch_to_locale, options_for_select(supported_locales_options, current_locale) %>
|
26
|
+
</div>
|
27
|
+
<% end %>
|
28
|
+
<%= f.submit Spree.t("actions.save"), class: 'btn-primary' %>
|
29
|
+
<% end %>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
<% end %>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<div
|
2
|
+
id='account-pane'
|
3
|
+
data-turbo-permanent
|
4
|
+
data-slideover-account-target='overlay'
|
5
|
+
class='fixed inset-0 flex flex-row-reverse z-50 transition-opacity hidden'
|
6
|
+
>
|
7
|
+
<div class='fixed inset-0'>
|
8
|
+
<div data-action='click->slideover-account#toggle' class='absolute inset-0 bg-background opacity-75'></div>
|
9
|
+
</div>
|
10
|
+
<div
|
11
|
+
id='slideover-account'
|
12
|
+
data-slideover-account-target='menu'
|
13
|
+
class='relative sidebar-pane flex-1 !flex flex-col w-full bg-background text-text md:border-l border-default transition ease-in-out duration-300 translate-x-full'
|
14
|
+
>
|
15
|
+
<div class='p-4 gap-4 flex-shrink-0 flex items-center justify-between border-b border-default z-50'>
|
16
|
+
<button
|
17
|
+
data-action='slideover-account#toggle'
|
18
|
+
class='flex items-center justify-center rounded-full focus:outline-none focus:bg-background'
|
19
|
+
aria-label='Close account sidebar'
|
20
|
+
>
|
21
|
+
<%= render 'spree/shared/icons/cross' %>
|
22
|
+
</button>
|
23
|
+
<span class='text-xl font-medium uppercase leading-loose'><%= Spree.t(:account) %></span>
|
24
|
+
<span></span>
|
25
|
+
</div>
|
26
|
+
<%= turbo_frame_tag "login", src: spree_login_path, loading: "lazy" %>
|
27
|
+
</div>
|
28
|
+
</div>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<% cache [*spree_base_cache_scope.call(address), address.user] do %>
|
2
|
+
<div class="text-sm">
|
3
|
+
<div class="mb-1"><%= address.full_name %></div>
|
4
|
+
<% unless address.company.blank? %>
|
5
|
+
<div class="org">
|
6
|
+
<%= address.company %>
|
7
|
+
</div>
|
8
|
+
<% end %>
|
9
|
+
<div class="adr">
|
10
|
+
<div class="street-address-line">
|
11
|
+
<%= address.street %>
|
12
|
+
</div>
|
13
|
+
<div class="local">
|
14
|
+
<span class="locality"><%= address.city %></span>,
|
15
|
+
<span class="region"><%= address.state_text %></span>
|
16
|
+
<span class="postal-code"><%= address.zipcode %></span>
|
17
|
+
<span class="country-name"><%= address.country.try(:iso3) %></span>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
<% if address.user %>
|
21
|
+
<div class="flex flex-wrap gap-2 mt-3">
|
22
|
+
<% if address.id == address.user.ship_address_id %>
|
23
|
+
<div class="bg-accent border border-default rounded-full px-3 py-2 text-xs">
|
24
|
+
<%= Spree.t(:default_shipping_address) %>
|
25
|
+
</div>
|
26
|
+
<% end %>
|
27
|
+
<% if address.id == address.user.bill_address_id %>
|
28
|
+
<div class="bg-accent border border-default rounded-full px-3 py-2 text-xs">
|
29
|
+
<%= Spree.t(:default_billing_address) %>
|
30
|
+
</div>
|
31
|
+
<% end %>
|
32
|
+
</div>
|
33
|
+
<% end %>
|
34
|
+
</div>
|
35
|
+
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%= turbo_frame_tag "cart-icon-#{current_order&.item_count}", target: '_top' do %>
|
2
|
+
<%= link_to spree.cart_path,
|
3
|
+
class: 'relative block w-6',
|
4
|
+
id: "cart-pane-link",
|
5
|
+
data: { action: 'click->slideover#toggle click@window->slideover#hide' },
|
6
|
+
onclick: 'event.preventDefault()' do %>
|
7
|
+
<%= render 'spree/shared/icons/cart' %>
|
8
|
+
<span class='cart-counter w-full text-[8px] font-extrabold absolute top-[10px] text-center'>
|
9
|
+
<%= current_order.item_count if current_order&.item_count&.positive? %>
|
10
|
+
</span>
|
11
|
+
<span class='sr-only'><%= Spree.t('storefront.cart.items_in_cart') %>, <%= Spree.t('storefront.cart.view_bag') %></span>
|
12
|
+
<% end %>
|
13
|
+
<% end %>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<!-- begin sidebar/slideover -->
|
2
|
+
<div
|
3
|
+
id="cart-pane"
|
4
|
+
data-slideover-target='overlay'
|
5
|
+
class='fixed inset-0 flex flex-row-reverse z-50 transition-opacity hidden'
|
6
|
+
>
|
7
|
+
<div class='fixed inset-0'>
|
8
|
+
<div data-action='click->slideover#toggle' class='absolute inset-0 bg-background opacity-75'></div>
|
9
|
+
</div>
|
10
|
+
<div
|
11
|
+
id='slideover-cart'
|
12
|
+
data-slideover-target='menu'
|
13
|
+
class='relative sidebar-pane flex-1 !flex flex-col w-full bg-background text-text md:border-l border-default transition ease-in-out duration-300 translate-x-full'
|
14
|
+
>
|
15
|
+
<div class='p-4 gap-4 flex-shrink-0 flex items-center justify-between border-b border-default z-50'>
|
16
|
+
<%= button_tag(
|
17
|
+
type: 'button',
|
18
|
+
data: { action: 'slideover#toggle' },
|
19
|
+
class: 'flex items-center justify-center rounded-full focus:outline-none focus:bg-background',
|
20
|
+
aria: { label: 'Close sidebar' }
|
21
|
+
) do %>
|
22
|
+
<%= render 'spree/shared/icons/close' %>
|
23
|
+
<% end %>
|
24
|
+
<span class='text-xl font-medium uppercase leading-loose'><%= Spree.t(:cart) %></span>
|
25
|
+
<span class='relative block w-6'>
|
26
|
+
<%= render 'spree/shared/icons/cart' %>
|
27
|
+
<span class='cart-counter w-full text-[8px] font-extrabold absolute top-[10px] text-center'>
|
28
|
+
<%= current_order.item_count if current_order.present? && current_order.item_count.to_i > 0 %>
|
29
|
+
</span>
|
30
|
+
<span class='sr-only'><%= Spree.t('storefront.cart.items_in_cart') %>, <%= Spree.t('storefront.cart.view_bag') %></span>
|
31
|
+
</span>
|
32
|
+
</div>
|
33
|
+
<div class='flex-1 h-0 overflow-y-auto'>
|
34
|
+
<%= turbo_frame_tag :cart_contents, class: 'cart-contents', src: spree.cart_path, loading: :lazy %>
|
35
|
+
</div>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
<!-- end sidebar/slideover -->
|
@@ -0,0 +1,54 @@
|
|
1
|
+
<% cache_unless page_builder_enabled?, spree_base_cache_scope.call(current_theme) do %>
|
2
|
+
<style data-turbo-track="reload">
|
3
|
+
<%= theme_setting(:custom_font_css_import) if theme_setting(:custom_font_css_import).present? %>
|
4
|
+
|
5
|
+
:root {
|
6
|
+
--primary: <%= theme_setting(:primary_color) %>;
|
7
|
+
--accent: <%= theme_setting(:accent_color) %>;
|
8
|
+
--danger: <%= theme_setting(:danger_color) %>;
|
9
|
+
--success: <%= theme_setting(:success_color) %>;
|
10
|
+
--neutral: <%= theme_setting(:neutral_color) %>;
|
11
|
+
|
12
|
+
--background: <%= theme_setting(:background_color) %>;
|
13
|
+
--text: <%= theme_setting(:text_color) %>;
|
14
|
+
|
15
|
+
--border-default-color: <%= theme_setting(:border_color) %>;
|
16
|
+
--border-default-width: <%= theme_setting(:border_width) %>px;
|
17
|
+
--border-default-radius: <%= theme_setting(:border_radius) %>px;
|
18
|
+
|
19
|
+
/* --border-default-shadow: <%= "#{theme_setting(:border_shadow_horizontal_offset)}px #{theme_setting(:border_shadow_vertical_offset)}px #{theme_setting(:border_shadow_blur)}px rgba(0, 0, 0, #{theme_setting(:border_shadow_opacity)})" %>; */
|
20
|
+
--button: <%= theme_setting(:button_background_color) || theme_setting(:primary_color) %>;
|
21
|
+
--button-rgb: <%= theme_setting_rgb_components(:button_background_color) || theme_setting_rgb_components(:primary_color) %>;
|
22
|
+
--button-text: <%= theme_setting(:button_text_color) %>;
|
23
|
+
--button-border-radius: <%= theme_setting(:button_border_radius) %>px;
|
24
|
+
--button-border-width: <%= theme_setting(:button_border_thickness) %>px;
|
25
|
+
--button-border-color: <%= theme_setting(:button_border_color).presence %>;
|
26
|
+
|
27
|
+
--button-hover: <%= theme_setting(:button_hover_background_color) || theme_setting(:button_background_color) || theme_setting(:primary_color)%>;
|
28
|
+
--button-hover-text: <%= theme_setting(:button_hover_text_color) || theme_setting(:button_text_color) || theme_setting(:background_color)%>;
|
29
|
+
|
30
|
+
--secondary-button: <%= theme_setting(:secondary_button_background_color) || theme_setting(:background_color) %>;
|
31
|
+
--secondary-button-text: <%= theme_setting(:secondary_button_text_color) || theme_setting(:button_background_color) || theme_setting(:primary_color) %>;
|
32
|
+
--secondary-button-hover: <%= theme_setting(:secondary_button_hover_background_color) || theme_setting(:button_background_color) || theme_setting(:primary_color) %>;
|
33
|
+
--secondary-button-hover-text: <%= theme_setting(:secondary_button_hover_text_color) || theme_setting(:background_color) %>;
|
34
|
+
|
35
|
+
--input: <%= theme_setting(:input_border_color) || theme_setting(:border_color) %>;
|
36
|
+
--input-bg: <%= theme_setting(:input_background_color) %>;
|
37
|
+
--input-text: <%= theme_setting(:input_text_color) %>;
|
38
|
+
--input-focus-bg: <%= theme_setting(:input_focus_background_color) || theme_setting(:input_background_color) %>;
|
39
|
+
--input-border-radius: <%= theme_setting(:input_border_radius) %>px;
|
40
|
+
|
41
|
+
--neutral-50: #F3F3F3;
|
42
|
+
--neutral-100: #EAEAEA;
|
43
|
+
--neutral-200: #D4D4D4;
|
44
|
+
--neutral-300: #B3B3B3;
|
45
|
+
--neutral-400: #999999;
|
46
|
+
--neutral-500: #808080;
|
47
|
+
--neutral-600: #666666;
|
48
|
+
--neutral-700: #4D4D4D;
|
49
|
+
--neutral-800: #333333;
|
50
|
+
--neutral-900: #1A1A1A;
|
51
|
+
--accent-100: #FBFAF8;
|
52
|
+
}
|
53
|
+
</style>
|
54
|
+
<% end %>
|
File without changes
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<% if target && target.errors.any? %>
|
2
|
+
<div id="errorExplanation" class="alert-error text-center mb-4 p-2">
|
3
|
+
<ul>
|
4
|
+
<% target.errors.messages.each do |msg| %>
|
5
|
+
<li>
|
6
|
+
<% if msg[0] != :base && !msg[0].to_s.ends_with?(".base") %>
|
7
|
+
<%= target.errors.full_messages_for(msg[0]).to_sentence %>
|
8
|
+
<% else %>
|
9
|
+
<%= msg[1].flatten.to_sentence %>
|
10
|
+
<% end %>
|
11
|
+
</li>
|
12
|
+
<% end %>
|
13
|
+
</ul>
|
14
|
+
</div>
|
15
|
+
<% end %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<% if for_template || (key.present? && value.present?) %>
|
2
|
+
<div class="pointer-events-none w-full">
|
3
|
+
<div data-controller="alert" data-alert-hide-class="translate-x-[500px] opacity-0" class="ease-in-out duration-500 w-full relative pointer-events-auto <%= tailwind_classes_for(key) %>">
|
4
|
+
<div class="p-2">
|
5
|
+
<p class="text-sm lg:text-base font-medium text-center uppercase text-text flash-message">
|
6
|
+
<%= value %>
|
7
|
+
</p>
|
8
|
+
<button data-action="alert#close" class="absolute top-2 right-2 h-[22px] lg:h-6">
|
9
|
+
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
|
10
|
+
<path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"/>
|
11
|
+
</svg>
|
12
|
+
</button>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<% end %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<template id="flashMessage">
|
2
|
+
<%= render partial: 'spree/shared/flash', locals: { key: nil, value: nil, for_template: true } %>
|
3
|
+
</template>
|
4
|
+
<div id="flashes" class="fixed z-[9999] w-full top-0">
|
5
|
+
<% if flash.any? %>
|
6
|
+
<% flash.each do |key, value| %>
|
7
|
+
<%= render partial: 'spree/shared/flash', locals: { key: key, value: value, for_template: false } %>
|
8
|
+
<% end %>
|
9
|
+
<% end %>
|
10
|
+
</div>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<% cache spree_base_cache_scope.call(current_store) do %>
|
2
|
+
<script type="application/ld+json">
|
3
|
+
{
|
4
|
+
"@context": "https://schema.org",
|
5
|
+
"@type": "Organization",
|
6
|
+
"url": <%= current_store.formatted_url_or_custom_domain.to_json.html_safe %>,
|
7
|
+
"sameAs": <%= current_store.social_links.to_json.html_safe %>,
|
8
|
+
<% if current_store.logo && current_store.logo&.attached? && current_store.logo&.variable? %>
|
9
|
+
"logo": <%= main_app.cdn_image_url(current_store.logo.variant(spree_image_variant_options(resize_to_fill: [500, 500]))).to_json.html_safe %>,
|
10
|
+
<% end %>
|
11
|
+
"name": <%= current_store.name.to_json.html_safe %>,
|
12
|
+
"email": <%= current_store.customer_support_email.to_json.html_safe %>
|
13
|
+
}
|
14
|
+
</script>
|
15
|
+
<% end %>
|
16
|
+
|
17
|
+
<% if canonical_path.include?('search') %>
|
18
|
+
<% potential_action_target = "#{canonical_href(current_store.url_or_custom_domain)}?q={search_term_string}" %>
|
19
|
+
<script type="application/ld+json">
|
20
|
+
{
|
21
|
+
"@context": "https://schema.org",
|
22
|
+
"@type": "WebSite",
|
23
|
+
"name": <%= current_store.name.to_json.html_safe %>,
|
24
|
+
"potentialAction": {
|
25
|
+
"@type": "SearchAction",
|
26
|
+
"target": <%= potential_action_target.to_json.html_safe %>,
|
27
|
+
"query-input": "required name=search_term_string"
|
28
|
+
},
|
29
|
+
"url": <%= current_store.formatted_url_or_custom_domain.to_json.html_safe %>
|
30
|
+
}
|
31
|
+
</script>
|
32
|
+
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<% line_item.variant.option_values.select { |ov| ov.option_type.color? }.each do |option| %>
|
2
|
+
<div>
|
3
|
+
<input class="hidden color-input" value="<%= option.name %>" >
|
4
|
+
<div class="label-container h-[30px] border border-default p-0.5 inline-flex items-center hover:border-dashed hover:border-primary">
|
5
|
+
<div class="color-preview w-[24px] h-[24px]"></div>
|
6
|
+
<div class="text-sm px-2">
|
7
|
+
<%= option.presentation %>
|
8
|
+
</div>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
<% end %>
|
12
|
+
<% line_item.variant.option_values.reject { |ov| ov.option_type.color? }.each do |option| %>
|
13
|
+
<div>
|
14
|
+
<div class="h-[30px] border border-default px-2 inline-flex items-center hover:border-dashed hover:border-primary text-sm">
|
15
|
+
<%= option.presentation %>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
<% end %>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<% logo ||= current_store.logo %>
|
2
|
+
<% height ||= 64 %>
|
3
|
+
<% logo_css ||= '' %>
|
4
|
+
|
5
|
+
<%= link_to spree.root_path, id: 'site-logo' do %>
|
6
|
+
<span class='sr-only'><%= current_store.name %></span>
|
7
|
+
<% if logo.present? && logo.attached? && logo.variable? %>
|
8
|
+
<% aspect_ratio = as_aspect_ratio(logo) %>
|
9
|
+
<% logo_style = "aspect-ratio: #{aspect_ratio};" %>
|
10
|
+
|
11
|
+
<% if aspect_ratio.to_f > 10 %>
|
12
|
+
<% mobile_class = "h-[16px]" %>
|
13
|
+
<% desktop_class = "md:h-[32px]" %>
|
14
|
+
<% elsif aspect_ratio.to_f > 5 %>
|
15
|
+
<% mobile_class = "h-[25px]" %>
|
16
|
+
<% desktop_class = "md:h-[32px]" %>
|
17
|
+
<% elsif aspect_ratio.to_f < 3 %>
|
18
|
+
<% mobile_class = "h-[32px]" %>
|
19
|
+
<% desktop_class = "md:h-[64px]" %>
|
20
|
+
<% else %>
|
21
|
+
<% mobile_class = "h-[32px]" %>
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
<% if defined?(height) && height > 0 %>
|
25
|
+
<% logo_style += "--desktop-height: #{height}px;" %>
|
26
|
+
<% cdn_height = height %>
|
27
|
+
<% desktop_class = "custom-desktop-height" %>
|
28
|
+
<% elsif aspect_ratio.to_f < 3 %>
|
29
|
+
<% cdn_height = 64 %>
|
30
|
+
<% else %>
|
31
|
+
<% cdn_height = 32 %>
|
32
|
+
<% end %>
|
33
|
+
|
34
|
+
<% img_class = "w-auto #{mobile_class} #{desktop_class} #{logo_css}" %>
|
35
|
+
|
36
|
+
<% variant_options = spree_image_variant_options(resize_to_fit: [nil, cdn_height * 3]) %>
|
37
|
+
|
38
|
+
<%= image_tag main_app.cdn_image_url(logo.variant(variant_options)), class: img_class, alt: current_store.name, style: logo_style, height: cdn_height %>
|
39
|
+
<% else %>
|
40
|
+
<h1 class='text-lg uppercase text-center'><%= current_store.name %></h1>
|
41
|
+
<% end %>
|
42
|
+
<% end %>
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<% unless current_store.prefers_index_in_search_engines? %>
|
2
|
+
<meta name="robots" content="noindex, nofollow">
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% og_title = title.presence || current_store.name %>
|
6
|
+
<% og_url = canonical_href(current_store.url_or_custom_domain) %>
|
7
|
+
<% og_type = 'website' %>
|
8
|
+
<% og_description = page_description.presence || current_store.description.presence || current_store.name %>
|
9
|
+
|
10
|
+
<% if @product %>
|
11
|
+
<% og_type = 'product' %>
|
12
|
+
<% elsif @article %>
|
13
|
+
<% og_type = 'article' %>
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
<meta name="description" content="<%= h(og_description) %>">
|
17
|
+
|
18
|
+
<meta property="og:site_name" content="<%= current_store.name %>">
|
19
|
+
<meta property="og:url" content="<%= og_url %>">
|
20
|
+
<meta property="og:title" content="<%= h(og_title) %>">
|
21
|
+
<meta property="og:type" content="<%= og_type %>">
|
22
|
+
<meta property="og:description" content="<%= h(og_description) %>">
|
23
|
+
|
24
|
+
<% if page_image.present? && page_image.attached? && page_image.variable? %>
|
25
|
+
<% image_url = main_app.cdn_image_url(page_image.variant(spree_image_variant_options(resize_to_fill: [1200, 630]))) %>
|
26
|
+
|
27
|
+
<meta property="og:image" content="<%= image_url %>">
|
28
|
+
<meta property="og:image:secure_url" content="<%= image_url %>">
|
29
|
+
<meta property="og:image:width" content="1200">
|
30
|
+
<meta property="og:image:height" content="630">
|
31
|
+
<meta property="og:image:alt" content="<%= title.gsub(current_store.name, '') %>">
|
32
|
+
<meta property="twitter:image" content="<%= image_url %>" />
|
33
|
+
<% end %>
|
34
|
+
|
35
|
+
<% if @product && @product.price_in(current_currency).present? %>
|
36
|
+
<meta property="og:price:amount" content="<%= @product.price_in(current_currency).amount.to_s %>">
|
37
|
+
<meta property="og:price:currency" content="<%= current_order&.currency || current_store.default_currency %>">
|
38
|
+
<% end %>
|
39
|
+
|
40
|
+
<% if current_store.twitter.present? %>
|
41
|
+
<meta name="twitter:site" content="<%= '@' + current_store.twitter.split('twitter.com/').last %>">
|
42
|
+
<% end %>
|
43
|
+
<meta name="twitter:card" content="summary_large_image">
|
44
|
+
<meta name="twitter:title" content="<%= h(og_title) %>">
|
45
|
+
<meta name="twitter:description" content="<%= h(og_description) %>">
|
@@ -0,0 +1,106 @@
|
|
1
|
+
<% shipments ||= order.shipments %>
|
2
|
+
|
3
|
+
<% if order.order_refunded? || order.partially_refunded? %>
|
4
|
+
<div class="alert-warning mb-5 py-2 px-3">
|
5
|
+
<% i18n_key_suffix = "#{shipments.shipped_but_canceled.any? ? 'refunded' : 'canceled'}.#{order.partially_refunded? ? 'partially' : 'fully'}" %>
|
6
|
+
|
7
|
+
<% if order.respond_to?(:gift_card) && order.gift_card.present? %>
|
8
|
+
<% key = "storefront.refund_action_required_message.order_#{i18n_key_suffix}" %>
|
9
|
+
<%= Spree.t(key, customer_support_email: order.store.customer_support_email ) %>
|
10
|
+
<% else %>
|
11
|
+
<% key = "storefront.refund_action_not_required_message.order_#{i18n_key_suffix}" %>
|
12
|
+
<%= Spree.t(key) %>
|
13
|
+
<% end %>
|
14
|
+
</div>
|
15
|
+
<% end %>
|
16
|
+
|
17
|
+
<p class="mb-6">
|
18
|
+
<%= I18n.t('activerecord.attributes.spree/order.completed_at') %> <%= local_time(order.completed_at) %>
|
19
|
+
</p>
|
20
|
+
|
21
|
+
<%== color_options_style_for_line_items(shipments.flat_map(&:line_items)) %>
|
22
|
+
|
23
|
+
<ul>
|
24
|
+
<%= render partial: 'spree/shared/order_shipment', collection: shipments, as: :shipment, cached: spree_base_cache_scope %>
|
25
|
+
</ul>
|
26
|
+
|
27
|
+
<div class="mt-6 bg-accent mb-24">
|
28
|
+
<div class="grid grid-cols-1 lg:grid-cols-2 gap-4 lg:gap-6 p-4 lg:p-6 text-sm bg-border bg-accent-100">
|
29
|
+
<!-- billing address -->
|
30
|
+
<div>
|
31
|
+
<div class="uppercase tracking-widest">
|
32
|
+
<%= Spree.t(:billing_address) %>
|
33
|
+
</div>
|
34
|
+
<div class="!leading-[1.375rem] text-neutral-800">
|
35
|
+
<%= render 'spree/shared/address', address: order.billing_address %>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
<!-- payment into -->
|
39
|
+
<div class="mb-5 lg:mb-0">
|
40
|
+
<div class="uppercase tracking-widest">
|
41
|
+
<%= Spree.t(:payment_information) %>
|
42
|
+
</div>
|
43
|
+
<div class="!leading-[1.375rem] text-neutral-800">
|
44
|
+
<%= render collection: order.payments.valid, partial: 'spree/shared/payment', cached: spree_base_cache_scope %>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
<!-- totals/summary -->
|
49
|
+
<div class="p-4 lg:p-6 text-sm">
|
50
|
+
<div class="flex items-center justify-between py-2">
|
51
|
+
<div>
|
52
|
+
<%= Spree.t(:subtotal) %>
|
53
|
+
</div>
|
54
|
+
<div>
|
55
|
+
<%= order.display_item_total.to_html %>
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
<div class="flex items-center justify-between py-2">
|
59
|
+
<div>
|
60
|
+
<%= Spree.t(:shipping) %>
|
61
|
+
</div>
|
62
|
+
<div>
|
63
|
+
<%= order.display_ship_total.to_html %>
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
<% if order.promo_total != 0 %>
|
67
|
+
<div class="flex items-center justify-between py-2">
|
68
|
+
<div>
|
69
|
+
<%= Spree.t(:discount) %>
|
70
|
+
</div>
|
71
|
+
<div>
|
72
|
+
<%= order.display_promo_total.to_html %>
|
73
|
+
</div>
|
74
|
+
</div>
|
75
|
+
<% end %>
|
76
|
+
<div class="flex items-center justify-between py-2">
|
77
|
+
<div>
|
78
|
+
<%= Spree.t(:tax) %>
|
79
|
+
</div>
|
80
|
+
<div>
|
81
|
+
<%= order.display_tax_total.to_html %>
|
82
|
+
</div>
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<% if order.respond_to?(:gift_card) && order.gift_card.present? %>
|
86
|
+
<div class="flex items-center justify-between py-2">
|
87
|
+
<div><%= Spree.t(:gift_card) %></div>
|
88
|
+
<div>-<%= order.display_gift_card_total.to_html %></div>
|
89
|
+
</div>
|
90
|
+
<% elsif order.using_store_credit? %>
|
91
|
+
<div class="flex items-center justify-between py-2">
|
92
|
+
<div><%= Spree.t(:store_credits) %></div>
|
93
|
+
<div><%= order.display_total_applied_store_credit %></div>
|
94
|
+
</div>
|
95
|
+
<% end %>
|
96
|
+
|
97
|
+
<div class="flex items-center justify-between text-lg pt-4 font-medium border-default border-t">
|
98
|
+
<div>
|
99
|
+
<%= Spree.t(:total) %>
|
100
|
+
</div>
|
101
|
+
<div>
|
102
|
+
<%= order.display_total_minus_store_credits.to_html %>
|
103
|
+
</div>
|
104
|
+
</div>
|
105
|
+
</div>
|
106
|
+
</div>
|