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,62 @@
|
|
1
|
+
<% cache_unless page_builder_enabled?, [*spree_base_cache_scope.call(section), current_store] do %>
|
2
|
+
<footer
|
3
|
+
id='footer'
|
4
|
+
<% unless current_theme_preview %>
|
5
|
+
data-turbo-permanent
|
6
|
+
<% end %>>
|
7
|
+
<div style='<%= section_styles(section) %>'>
|
8
|
+
<div class="page-container">
|
9
|
+
<div class="flex gap-0 md:gap-6 md:flex-row flex-col">
|
10
|
+
<div class="flex justify-center flex-grow py-2 md:py-0 border-b md:border-none lg:w-60">
|
11
|
+
<%= render 'spree/shared/logo', logo: section.logo.attached? ? section.logo : current_header_logo %>
|
12
|
+
</div>
|
13
|
+
<div class="grid grid-cols-1 lg:grid-cols-4 grow w-full">
|
14
|
+
<% section.blocks.includes(:links).each do |block| %>
|
15
|
+
<div class="flex-grow gap-1 flex flex-col py-6 md:py-0 border-b md:border-none border-default lg:mb-6">
|
16
|
+
<div <%= block_attributes(block) %>>
|
17
|
+
<h3 class="text-sm py-2"><%= block.preferred_label %></h3>
|
18
|
+
<ul class="uppercase text-sm tracking-wider !leading-4 flex flex-col gap-1">
|
19
|
+
<% block.links.each do |link| %>
|
20
|
+
<li class='py-2'>
|
21
|
+
<%= page_builder_link_to link, target: ('_blank' if link.open_in_new_tab), rel: ('noopener noreferrer' if link.open_in_new_tab), **link_attributes(link, as_html: false) do %>
|
22
|
+
<%= link.label %>
|
23
|
+
<% end %>
|
24
|
+
</li>
|
25
|
+
<% end %>
|
26
|
+
</ul>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
<% end %>
|
30
|
+
</div>
|
31
|
+
<div class="flex-grow gap-4 flex flex-col justify-between lg:w-60">
|
32
|
+
<div class="gap-1 flex flex-col py-6 md:py-0">
|
33
|
+
<h3 class="text-sm py-2"><%= Spree.t(:follow_us) %></h3>
|
34
|
+
<div class="flex flex-wrap gap-2 max-w-48 py-2">
|
35
|
+
<% cache spree_base_cache_scope.call(current_store) do %>
|
36
|
+
<% Spree::Store::SUPPORTED_SOCIAL_NETWORKS.each do |media| %>
|
37
|
+
<% if current_store.send(media).present? %>
|
38
|
+
<%= link_to current_store.send("#{media}_link") do %>
|
39
|
+
<%= render "spree/shared/icons/#{media.gsub('_', '-')}" %>
|
40
|
+
<span class='hidden'><%= current_store.send("#{media}_handle") %></span>
|
41
|
+
<% end %>
|
42
|
+
<% end %>
|
43
|
+
<% end %>
|
44
|
+
<% end %>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
</div>
|
49
|
+
<div class="flex justify-end w-full"></div>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
<div class="text-sm" style="color: <%= section.preferred_copyright_text_color %>; background-color: <%= section.preferred_copyright_background_color %>">
|
53
|
+
<div class='page-container py-2 flex justify-center gap-2'>
|
54
|
+
<span>© <%= Time.now.year %>
|
55
|
+
<a href='/'><%= current_store.name %></a>. <%= Spree.t(:all_rights_reserved) %>.</span>
|
56
|
+
<span>
|
57
|
+
Powered by <a href='https://spreecommerce.org' target="_blank" rel="follow" class="underline">Spree Commerce</a>
|
58
|
+
</span>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
</footer>
|
62
|
+
<% end %>
|
@@ -0,0 +1,166 @@
|
|
1
|
+
<% layout = section.preferred_layout %>
|
2
|
+
<header
|
3
|
+
class='sticky has-[.currency-and-locale-modal:not(.hidden)]:relative top-0 z-50 has-[.currency-and-locale-modal:not(.hidden)]:z-[unset] header-<%= layout %>'
|
4
|
+
data-controller='header toggle-menu slideover <%= "slideover-account" if show_account_pane? %>'
|
5
|
+
data-toggle-menu-class='hamburger-visible'
|
6
|
+
data-slideover-invisible-class='translate-x-full,opacity-0'
|
7
|
+
data-slideover-visible-class='translate-x-0,opacity-100'
|
8
|
+
data-slideover-active-target='#slideover-cart'
|
9
|
+
data-slideover-account-invisible-class='translate-x-full,opacity-0'
|
10
|
+
data-slideover-account-visible-class='translate-x-0,opacity-100'
|
11
|
+
data-slideover-account-active-target='#slideover-account'
|
12
|
+
>
|
13
|
+
<nav
|
14
|
+
aria-label='Top'
|
15
|
+
style="<%= section_styles(section) %>"
|
16
|
+
class="transition-transform duration-300 relative">
|
17
|
+
<div class='page-container'>
|
18
|
+
<div class='flex items-center<%= " lg:items-end" if layout == "logo-centered" %> <%= " lg:items-center" unless layout == "logo-centered" %> justify-between '>
|
19
|
+
<% unless layout == 'logo-centered' %>
|
20
|
+
<div class='hidden lg:flex' id='header-logo'>
|
21
|
+
<%= render 'spree/shared/logo', logo: section.logo, height: section.preferred_desktop_logo_height %>
|
22
|
+
</div>
|
23
|
+
<% end %>
|
24
|
+
|
25
|
+
<div class='flex -order-1 flex-1 <%= " lg:flex-none lg:order-1 z-10 lg:mr-8" unless layout == "logo-centered" %>'>
|
26
|
+
<!-- Mobile menu toggle, controls the 'mobileMenuOpen' state. -->
|
27
|
+
<button
|
28
|
+
type='button'
|
29
|
+
data-action='click->toggle-menu#toggle touch->toggle-menu#toggle'
|
30
|
+
class='lg:hidden relative w-6'
|
31
|
+
data-toggle-menu-target='button'
|
32
|
+
>
|
33
|
+
<span class='sr-only'><%= Spree.t(:toggle_menu) %></span>
|
34
|
+
<div
|
35
|
+
class='absolute top-0'
|
36
|
+
>
|
37
|
+
<%= render 'spree/shared/icons/menu', color: section.preferred_text_color %>
|
38
|
+
</div>
|
39
|
+
<div
|
40
|
+
class='absolute top-0 opacity-0'
|
41
|
+
>
|
42
|
+
<%= render 'spree/shared/icons/close', color: section.preferred_text_color %>
|
43
|
+
</div>
|
44
|
+
</button>
|
45
|
+
|
46
|
+
<!-- Search button -->
|
47
|
+
<div class='<%= "lg:relative" unless layout == "logo-centered" %> flex'>
|
48
|
+
<button
|
49
|
+
class='ml-4 lg:ml-0 flex items-center'
|
50
|
+
id='open-search'
|
51
|
+
data-action='click->toggle-menu#hide touch->toggle-menu#hide'
|
52
|
+
>
|
53
|
+
<%= render 'spree/shared/icons/search', color: section.preferred_text_color %>
|
54
|
+
<span class='hidden lg:block ml-2 text-sm !leading-6 uppercase'><%= Spree.t(:search) %></span>
|
55
|
+
</button>
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
|
59
|
+
<div class='flex items-center flex-col<%= " lg:flex-1" unless layout == "logo-centered" %> header-nav-container'>
|
60
|
+
<!-- Logo -->
|
61
|
+
<div class='<%= "flex lg:pb-4" if layout == "logo-centered" %><%= "lg:hidden" unless layout == "logo-centered" %>' id='header-logo'>
|
62
|
+
<%= render 'spree/shared/logo', logo: section.logo, height: section.preferred_desktop_logo_height %>
|
63
|
+
</div>
|
64
|
+
|
65
|
+
<!-- Desktop Menu -->
|
66
|
+
<% if layout == 'nav-centered' %>
|
67
|
+
<div
|
68
|
+
class='hidden lg:flex absolute top-px left-1/2 -translate-x-1/2 justify-center w-[calc(100%-29rem)] overflow-auto'
|
69
|
+
>
|
70
|
+
<% end %>
|
71
|
+
<div class='hidden lg:flex<%= " w-full px-12" if layout == "left" %>'>
|
72
|
+
<div class='flex flex-wrap justify-center h-full mx-4'>
|
73
|
+
<%= render 'spree/page_sections/nav/desktop', section: section %>
|
74
|
+
</div>
|
75
|
+
</div>
|
76
|
+
</div>
|
77
|
+
<% if layout == 'nav-centered' %></div><% end %>
|
78
|
+
<div
|
79
|
+
class='flex items-center gap-4 flex-1 justify-end<%= " lg:flex-none order-2" unless layout == "logo-centered" %>'
|
80
|
+
>
|
81
|
+
<% if should_render_currency_dropdown? || should_render_locale_dropdown? %>
|
82
|
+
<div
|
83
|
+
data-controller="modal"
|
84
|
+
data-modal-allow-background-close="true"
|
85
|
+
data-modal-
|
86
|
+
class="hidden lg:flex"
|
87
|
+
data-modal-backdrop-color-value="rgba(0,0,0,0.32)">
|
88
|
+
<%= button_tag class: 'flex gap-2 items-center', data: {action: 'modal#open'} do %>
|
89
|
+
<% if should_render_currency_dropdown? %>
|
90
|
+
<span>
|
91
|
+
<%= "#{current_currency} (#{currency_money(current_currency).symbol})" %>
|
92
|
+
</span>
|
93
|
+
<% end %>
|
94
|
+
<% if should_render_locale_dropdown? %>
|
95
|
+
<span class="uppercase <%= should_render_currency_dropdown?.presence && "border-l pl-2" %> flex items-center gap-1">
|
96
|
+
<% country_code = current_locale.to_s.split("-").last %>
|
97
|
+
<%= svg_country_icon(country_code) %>
|
98
|
+
<span ><%= country_code %></span>
|
99
|
+
</span>
|
100
|
+
<% end %>
|
101
|
+
<% end %>
|
102
|
+
<%= turbo_frame_tag :settings_modal, src: spree.settings_path, loading: :eager %>
|
103
|
+
</div>
|
104
|
+
<% end %>
|
105
|
+
|
106
|
+
<!-- Desktop Account -->
|
107
|
+
<div class='hidden lg:flex'>
|
108
|
+
<% if show_account_pane? %>
|
109
|
+
<button
|
110
|
+
data-action='click->slideover-account#toggle click@window->slideover-account#hide click->toggle-menu#hide touch->toggle-menu#hide'
|
111
|
+
>
|
112
|
+
<%= render 'spree/shared/icons/account', color: section.preferred_text_color, section: section %>
|
113
|
+
</button>
|
114
|
+
<% else %>
|
115
|
+
<%= link_to spree.account_path do %>
|
116
|
+
<%= render 'spree/shared/icons/account', color: section.preferred_text_color, section: section %>
|
117
|
+
<% end %>
|
118
|
+
<% end %>
|
119
|
+
</div>
|
120
|
+
|
121
|
+
<% if show_account_pane? %>
|
122
|
+
<%= form_with url: spree.account_wishlist_path, method: :get, data: { turbo_stream: true } do %>
|
123
|
+
<button
|
124
|
+
type="submit"
|
125
|
+
id="wishlist-icon"
|
126
|
+
class="flex items-end">
|
127
|
+
<%= render 'spree/shared/wishlist_icon', wishlist: current_wishlist, background_color: section.preferred_background_color %>
|
128
|
+
</button>
|
129
|
+
<% end %>
|
130
|
+
<% else %>
|
131
|
+
<%= link_to spree.account_wishlist_path, id: "wishlist-icon" do %>
|
132
|
+
<%= render 'spree/shared/wishlist_icon', background_color: section.preferred_background_color %>
|
133
|
+
<% end %>
|
134
|
+
<% end %>
|
135
|
+
|
136
|
+
<!-- Cart -->
|
137
|
+
<div
|
138
|
+
data-action='click->toggle-menu#hide touch->toggle-menu#hide'
|
139
|
+
>
|
140
|
+
<%= render 'spree/shared/cart_icon' %>
|
141
|
+
</div>
|
142
|
+
</div>
|
143
|
+
</div>
|
144
|
+
</div>
|
145
|
+
<div
|
146
|
+
class='hide-on-load h-0 opacity-0 pointer-events-none'
|
147
|
+
data-toggle-menu-target='toggleable'
|
148
|
+
role='dialog'
|
149
|
+
aria-modal='true'
|
150
|
+
>
|
151
|
+
<div
|
152
|
+
class='flex justify-between flex-col lg:hidden w-full transition-transform translate-x-[-50%] has-[.currency-and-locale-modal:not(.hidden)]:transform-none body header--mobile-menu'
|
153
|
+
data-toggle-menu-target='content'
|
154
|
+
style='background-color: <%= section.preferred_background_color %>; height: calc(100dvh - 38px);'
|
155
|
+
>
|
156
|
+
<%= render 'spree/page_sections/nav/mobile', section: section %>
|
157
|
+
</div>
|
158
|
+
</div>
|
159
|
+
</nav>
|
160
|
+
<%= render 'spree/shared/cart_pane', section: section %>
|
161
|
+
<% if show_account_pane? %>
|
162
|
+
<%= render 'spree/shared/account_pane', section: section %>
|
163
|
+
<% end %>
|
164
|
+
|
165
|
+
<%= render 'spree/shared/search', section: section, logo: section.logo, logo_height: section.preferred_desktop_logo_height %>
|
166
|
+
</header>
|
@@ -0,0 +1,57 @@
|
|
1
|
+
<% cache_unless page_builder_enabled?, spree_base_cache_scope.call(section) do %>
|
2
|
+
<div class="w-full relative image-banner" style="<%= section_styles(section) %>;height: <%= section.preferred_height %>px">
|
3
|
+
<div class="w-full absolute left-0 image-banner--image-wrapper" style="height: <%= section.preferred_height %>px; opacity: <%= section.preferred_overlay_transparency %>%;">
|
4
|
+
<% if section.image.attached? && section.image.variable? %>
|
5
|
+
<picture>
|
6
|
+
<source media="(max-width: 640px)" srcset="<%= main_app.cdn_image_url(section.image.variant(spree_image_variant_options(resize_to_limit: [640, nil]))) %>">
|
7
|
+
<source media="(max-width: 750px)" srcset="<%= main_app.cdn_image_url(section.image.variant(spree_image_variant_options(resize_to_limit: [750, nil]))) %>">
|
8
|
+
<source media="(max-width: 828px)" srcset="<%= main_app.cdn_image_url(section.image.variant(spree_image_variant_options(resize_to_limit: [828, nil]))) %>">
|
9
|
+
<source media="(max-width: 1080px)" srcset="<%= main_app.cdn_image_url(section.image.variant(spree_image_variant_options(resize_to_limit: [1080, nil]))) %>">
|
10
|
+
<source media="(max-width: 1200px)" srcset="<%= main_app.cdn_image_url(section.image.variant(spree_image_variant_options(resize_to_limit: [1200, nil]))) %>">
|
11
|
+
<source media="(min-width: 1201px)" srcset="<%= main_app.cdn_image_url(section.image.variant(spree_image_variant_options(resize_to_limit: [2000, nil]))) %>">
|
12
|
+
<%= image_tag main_app.cdn_image_url(section.image.variant(spree_image_variant_options(resize_to_limit: [2000, nil]))), class: "w-full h-full object-cover", loading: "lazy" %>
|
13
|
+
</picture>
|
14
|
+
<% end %>
|
15
|
+
</div>
|
16
|
+
<%
|
17
|
+
vertical_alignment_class = case section.preferred_vertical_alignment
|
18
|
+
when 'top'
|
19
|
+
'justify-start'
|
20
|
+
when 'bottom'
|
21
|
+
'justify-end'
|
22
|
+
else
|
23
|
+
'justify-center'
|
24
|
+
end
|
25
|
+
%>
|
26
|
+
<div class="flex h-full w-full items-center justify-center">
|
27
|
+
<div class="flex flex-col <%= vertical_alignment_class %> p-5 z-10 w-full gap-y-2 h-full image-banner--block-wrapper">
|
28
|
+
<% section.blocks.includes(:rich_text_text, :links).each do |block| %>
|
29
|
+
<% case block.type %>
|
30
|
+
<% when 'Spree::PageBlocks::Heading' %>
|
31
|
+
<h2 class="w-full font-medium <%= block.preferred_size == 'small' ? 'text-lg' : (block.preferred_size == 'medium' ? 'text-xl' : 'text-2xl lg:text-3xl') %> image-banner--heading" <%= block_attributes(block) %>>
|
32
|
+
<%= block.text %>
|
33
|
+
</h2>
|
34
|
+
<% when 'Spree::PageBlocks::Text' %>
|
35
|
+
<div class="w-full image-banner--text" <%= block_attributes(block) %>>
|
36
|
+
<%= block.text %>
|
37
|
+
</div>
|
38
|
+
<% when 'Spree::PageBlocks::Buttons' %>
|
39
|
+
<div <%= block_attributes(block) %> class="w-full text-center image-banner--buttons">
|
40
|
+
<div class="inline-block">
|
41
|
+
<div class="flex flex-col lg:flex-row gap-4">
|
42
|
+
<% if block.link.present? %>
|
43
|
+
<% if block.link.linkable_url.present? %>
|
44
|
+
<%= page_builder_link_to block.link, label: block.link.label, class: "btn-#{block.preferred_button_style_1}", target: (block.link.open_in_new_tab ? "_blank" : nil) %>
|
45
|
+
<% else %>
|
46
|
+
<%= button_tag block.link.label, class: "btn-#{block.preferred_button_style_1}", disabled: true %>
|
47
|
+
<% end %>
|
48
|
+
<% end %>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
<% end %>
|
53
|
+
<% end %>
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
<% end %>
|
@@ -0,0 +1,66 @@
|
|
1
|
+
<% cache_unless page_builder_enabled?, spree_base_cache_scope.call(section) do %>
|
2
|
+
<div style="<%= section_styles(section) %>" class="image-with-text <%= 'right-aligned' if section.preferred_desktop_image_alignment == 'right' %>">
|
3
|
+
<div class="page-container">
|
4
|
+
<div class="lg:grid lg:grid-cols-12 lg:gap-6 image-with-text--container">
|
5
|
+
<div class="lg:col-span-6 aspect-[6/7] <%= 'lg:col-start-7 lg:order-1' if section.preferred_desktop_image_alignment == 'right' %> image-with-text--image-wrapper">
|
6
|
+
<%= page_builder_link_to(section.link, title: section.link&.label, target: (section.link&.open_in_new_tab ? '_blank' : nil)) do %>
|
7
|
+
<% if section.image.present? %>
|
8
|
+
<%= image_tag main_app.cdn_image_url(section.image.variant(spree_image_variant_options(resize_to_fill: [2000, nil]))),
|
9
|
+
class: "w-full h-full object-cover",
|
10
|
+
loading: :lazy,
|
11
|
+
sizes: "(max-width: 1024px) 100vw, 50vw",
|
12
|
+
srcset: [640, 750, 828, 1080, 1200, 2000].map { |width|
|
13
|
+
"#{main_app.cdn_image_url(section.image.variant(spree_image_variant_options(resize_to_fill: [width, nil])))} #{width}w"
|
14
|
+
}.join(', ')
|
15
|
+
%>
|
16
|
+
<% else %>
|
17
|
+
<%= content_tag(:div, '', class: 'w-full h-full object-cover bg-gray-100') %>
|
18
|
+
<% end %>
|
19
|
+
<% end %>
|
20
|
+
</div>
|
21
|
+
<%
|
22
|
+
vertical_alignment_class = case section.preferred_vertical_alignment
|
23
|
+
when 'top'
|
24
|
+
'lg:content-start'
|
25
|
+
when 'bottom'
|
26
|
+
'lg:content-end'
|
27
|
+
else
|
28
|
+
'lg:content-center'
|
29
|
+
end
|
30
|
+
%>
|
31
|
+
<div class="lg:grid lg:col-span-5 <%= vertical_alignment_class %> <%= 'lg:col-start-8' if section.preferred_desktop_image_alignment == 'left' %> image-with-text--blocks-wrapper">
|
32
|
+
<% section.blocks.includes(:rich_text_text, :links).each do |block| %>
|
33
|
+
<% case block.type %>
|
34
|
+
<% when 'Spree::PageBlocks::Heading' %>
|
35
|
+
<h2 class="<%= block.preferred_size == 'small' ? 'text-lg' : (block.preferred_size == 'medium' ? 'text-xl' : 'text-2xl lg:text-3xl') %> font-medium" <%= block_attributes(block) %>>
|
36
|
+
<%= page_builder_link_to(section.link, target: (section.link&.open_in_new_tab ? '_blank' : nil), class: "image-with-text--heading", style: block_background_color_style(block)) do %>
|
37
|
+
<%= block.text %>
|
38
|
+
<% end %>
|
39
|
+
</h2>
|
40
|
+
<% when 'Spree::PageBlocks::Text' %>
|
41
|
+
<div <%= block_attributes(block) %>>
|
42
|
+
<%= page_builder_link_to(section.link, target: (section.link&.open_in_new_tab ? '_blank' : nil), class: "image-with-text--text", style: block_background_color_style(block)) do %>
|
43
|
+
<%= block.text %>
|
44
|
+
<% end %>
|
45
|
+
</div>
|
46
|
+
<% when 'Spree::PageBlocks::Buttons' %>
|
47
|
+
<div class="w-full image-with-text--buttons" <%= block_attributes(block) %>>
|
48
|
+
<div class="inline-block">
|
49
|
+
<div class="flex flex-col lg:flex-row gap-4">
|
50
|
+
<% if block.link %>
|
51
|
+
<%= page_builder_link_to block.link,
|
52
|
+
label: block.link.label,
|
53
|
+
class: block.preferred_button_style_1 == 'secondary' ? 'btn-secondary' : 'btn-primary',
|
54
|
+
target: (block.link.open_in_new_tab ? '_blank' : nil),
|
55
|
+
rel: (block.link.open_in_new_tab ? 'noopener noreferrer' : nil) %>
|
56
|
+
<% end %>
|
57
|
+
</div>
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
<% end %>
|
61
|
+
<% end %>
|
62
|
+
</div>
|
63
|
+
</div>
|
64
|
+
</div>
|
65
|
+
</div>
|
66
|
+
<% end %>
|
@@ -0,0 +1,64 @@
|
|
1
|
+
<% logo = section.logo || current_store.logo %>
|
2
|
+
|
3
|
+
<footer
|
4
|
+
id='password-footer'
|
5
|
+
style='<%= section_styles(section) %>'
|
6
|
+
<%= 'data-turbo-permanent' unless page_builder_enabled? %>>
|
7
|
+
<div class='page-container'>
|
8
|
+
<div class='flex flex-col lg:flex-row lg:justify-between'>
|
9
|
+
<div class='flex justify-center items-center'>
|
10
|
+
<%= render 'spree/shared/logo', logo: logo %>
|
11
|
+
</div>
|
12
|
+
<div class='flex justify-center gap-4 lg:gap-0 py-6 lg:py-0 items-end'>
|
13
|
+
<% if current_store.instagram.present? %>
|
14
|
+
<%= link_to current_store.instagram_link, class: 'p-3', target: '_blank', rel: 'nofollow' do %>
|
15
|
+
<%= render 'spree/shared/icons/instagram' %>
|
16
|
+
<span class='hidden'><%= current_store.instagram_handle %></span>
|
17
|
+
<% end %>
|
18
|
+
<% end %>
|
19
|
+
|
20
|
+
<% if current_store.tiktok.present? %>
|
21
|
+
<%= link_to current_store.tiktok_link, class: 'p-3', target: '_blank', rel: 'nofollow' do %>
|
22
|
+
<%= render 'spree/shared/icons/tiktok' %>
|
23
|
+
<span class='hidden'><%= current_store.tiktok_handle %></span>
|
24
|
+
<% end %>
|
25
|
+
<% end %>
|
26
|
+
|
27
|
+
<% if current_store.facebook.present? %>
|
28
|
+
<%= link_to current_store.facebook_link, class: 'p-3', target: '_blank', rel: 'nofollow' do %>
|
29
|
+
<%= render 'spree/shared/icons/facebook' %>
|
30
|
+
<span class='hidden'><%= current_store.facebook_handle %></span>
|
31
|
+
<% end %>
|
32
|
+
<% end %>
|
33
|
+
|
34
|
+
<% if current_store.twitter.present? %>
|
35
|
+
<%= link_to current_store.twitter_link, class: 'p-3', target: '_blank', rel: 'nofollow' do %>
|
36
|
+
<%= render 'spree/shared/icons/twitter' %>
|
37
|
+
<span class='hidden'><%= current_store.twitter_handle %></span>
|
38
|
+
<% end %>
|
39
|
+
<% end %>
|
40
|
+
|
41
|
+
<% if current_store.youtube.present? %>
|
42
|
+
<%= link_to current_store.youtube_link, class: 'p-3', target: '_blank', rel: 'nofollow' do %>
|
43
|
+
<%= render 'spree/shared/icons/youtube' %>
|
44
|
+
<span class='hidden'><%= current_store.youtube_handle %></span>
|
45
|
+
<% end %>
|
46
|
+
<% end %>
|
47
|
+
|
48
|
+
<% if current_store.spotify.present? %>
|
49
|
+
<%= link_to current_store.spotify_link, class: 'p-3', target: '_blank', rel: 'nofollow' do %>
|
50
|
+
<%= render 'spree/shared/icons/spotify' %>
|
51
|
+
<span class='hidden'><%= current_store.spotify_handle %></span>
|
52
|
+
<% end %>
|
53
|
+
<% end %>
|
54
|
+
|
55
|
+
<% if current_store.pinterest.present? %>
|
56
|
+
<%= link_to current_store.pinterest_link, class: 'p-3', target: '_blank', rel: 'nofollow' do %>
|
57
|
+
<%= render 'spree/shared/icons/pinterest' %>
|
58
|
+
<span class='hidden'><%= current_store.pinterest_handle %></span>
|
59
|
+
<% end %>
|
60
|
+
<% end %>
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
</div>
|
64
|
+
</footer>
|
@@ -0,0 +1,54 @@
|
|
1
|
+
<% logo = section.logo || current_store.logo %>
|
2
|
+
<div style='<%= section_styles(section) %>'>
|
3
|
+
<div class="page-container">
|
4
|
+
<div class="bg-background text-text flex flex-col items-center gap-2 md:flex-row justify-between">
|
5
|
+
<% if logo&.attached? && logo.variable? %>
|
6
|
+
<%= render 'spree/shared/logo', logo: section.logo, height: section.preferred_desktop_logo_height %>
|
7
|
+
<% else %>
|
8
|
+
<h1 class="text-2xl"><%= current_store.name %></h1>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<div
|
12
|
+
data-controller="modal"
|
13
|
+
data-modal-allow-background-close="true"
|
14
|
+
data-modal-backdrop-color-value="rgba(0,0,0,0.32)"
|
15
|
+
class="h-full">
|
16
|
+
<%= button_tag class: "underline flex gap-2 items-center", data: { action: "click->modal#open" } do %>
|
17
|
+
<span>
|
18
|
+
<%= render 'spree/shared/icons/lock', class: "w-5 h-5" %>
|
19
|
+
</span>
|
20
|
+
<%= Spree.t(:enter_using_password) %>
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
<div
|
24
|
+
data-modal-target="container"
|
25
|
+
data-action="click->modal#closeBackground keyup@window->modal#closeWithKeyboard"
|
26
|
+
class="hidden animated fadeIn fixed inset-0 overflow-y-auto flex items-center justify-center z-[9999]">
|
27
|
+
<div class="w-full lg:w-[800px] relative h-[100dvh] lg:h-auto lg:max-h-screen flex items-center">
|
28
|
+
<div class="lg:mx-0 w-full bg-background">
|
29
|
+
<div class="px-8 py-6">
|
30
|
+
<div class="flex justify-between uppercase mb-4">
|
31
|
+
<%= Spree.t(:enter_using_password) %>
|
32
|
+
<%= button_tag data: { action: "click->modal#close" } do %>
|
33
|
+
<%= render 'spree/shared/icons/close' %>
|
34
|
+
<span class="sr-only"><%= Spree.t(:close) %></span>
|
35
|
+
<% end %>
|
36
|
+
</div>
|
37
|
+
<div class="text-sm p-1">
|
38
|
+
<%= form_with url: spree.password_path, method: :post, class: "flex gap-2" do |f| %>
|
39
|
+
<%= f.password_field :password,
|
40
|
+
class: 'text-input w-full px-4 py-3',
|
41
|
+
placeholder: Spree.t(:password),
|
42
|
+
required: true,
|
43
|
+
autofocus: true %>
|
44
|
+
<%= f.button Spree.t(:enter), type: :submit, class: "btn w-40 btn-primary" %>
|
45
|
+
<% end %>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
</div>
|
49
|
+
</div>
|
50
|
+
</div>
|
51
|
+
</div>
|
52
|
+
</div>
|
53
|
+
</div>
|
54
|
+
</div>
|
@@ -0,0 +1,47 @@
|
|
1
|
+
<% img = section.image %>
|
2
|
+
|
3
|
+
<div class="w-full flex justify-center items-center relative" style="<%= section_styles(section) %>">
|
4
|
+
<% if img.attached? && img.variable? %>
|
5
|
+
<img
|
6
|
+
class="w-full h-full absolute top-0 object-cover z-0"
|
7
|
+
style="opacity: <%= section.preferred_overlay_transparency %>%"
|
8
|
+
src="<%= main_app.cdn_image_url(img.variant(spree_image_variant_options(resize_to_limit: [2000, nil]))) %>" />
|
9
|
+
<% end %>
|
10
|
+
<div class="w-full page-container flex flex-col text-center py-5 px-5 z-10">
|
11
|
+
<% section.blocks.includes(:rich_text_text).each do |block| %>
|
12
|
+
<% case block.type %>
|
13
|
+
<% when 'Spree::PageBlocks::Heading' %>
|
14
|
+
<h2 class='font-medium <%= block.preferred_size == 'small' ? 'text-xl lg:text-2xl' : block.preferred_size == 'medium' ? 'text-xl lg:text-3xl' : 'text-2xl lg:text-3xl' %>' <%= block_attributes(block) %>>
|
15
|
+
<%= block.text.body %>
|
16
|
+
</h2>
|
17
|
+
<% when 'Spree::PageBlocks::Text' %>
|
18
|
+
<div class='text-sm lg:text-base' <%= block_attributes(block) %>>
|
19
|
+
<%= block.text.body %>
|
20
|
+
</div>
|
21
|
+
<% when 'Spree::PageBlocks::NewsletterForm' %>
|
22
|
+
<%= form_for :newsletter, url: spree.newsletter_subscribers_path do |f| %>
|
23
|
+
<div class="flex items-center flex-col md:flex-row w-full <%= block_css_classes(block) %>" <%= block_attributes(block) %>>
|
24
|
+
<div class='relative w-full lg:w-[424px] flex'>
|
25
|
+
<%= hidden_field_tag :section_id, section.id %>
|
26
|
+
<%= f.email_field :email, placeholder: block.preferred_placeholder, required: true, class: 'focus:border-primary focus:ring-primary pr-36 text-sm bg-accent rounded-input border-accent py-2 px-4 w-full relative z-30 !leading-[46px]' %>
|
27
|
+
<div class="absolute right-2 top-1/2 transform -translate-y-1/2 z-40">
|
28
|
+
<%= f.submit block.preferred_button_text.html_safe, class: "#{block.preferred_button_style == 'secondary' ? 'btn-secondary' : 'btn-primary'} content-center" %>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
<% end %>
|
33
|
+
<% when 'Spree::PageBlocks::Subheading' %>
|
34
|
+
<h3 class='<%= block.size == 'small' ? 'text-lg' : block.size == 'medium' ? 'text-xl' : 'text-xl' %>' <%= block_attributes(block) %>>
|
35
|
+
<%= block.text.body %>
|
36
|
+
</h3>
|
37
|
+
<% when 'Spree::PageBlocks::Image' %>
|
38
|
+
<div <%= block_attributes(block) %> class="flex justify-center w-full">
|
39
|
+
<% if block.image.attached? && block.image.variable? %>
|
40
|
+
<% image_style = "aspect-ratio: #{as_aspect_ratio(block.image)}; --desktop-height: #{block.preferred_height}px; --mobile-height: #{block.preferred_mobile_height}px;" %>
|
41
|
+
<%= image_tag main_app.cdn_image_url(block.image.variant(spree_image_variant_options(resize_to_fill: [1000, 1000]))), height: block.preferred_height, width: block.preferred_width, class: "custom-desktop-height custom-mobile-height", style: image_style %>
|
42
|
+
<% end %>
|
43
|
+
</div>
|
44
|
+
<% end %>
|
45
|
+
<% end %>
|
46
|
+
</div>
|
47
|
+
</div>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<% cache_unless page_builder_enabled?, spree_base_cache_scope.call(section) do %>
|
2
|
+
<div class="page-container">
|
3
|
+
<h1 class="text-xl lg:text-2xl font-medium py-10 lg:pt-16 lg:pb-6" style="<%= section_heading_styles(section) %>">
|
4
|
+
<%= section.preferred_title.presence || title %>
|
5
|
+
</h1>
|
6
|
+
</div>
|
7
|
+
<% end %>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<div style="<%= section_styles(section) %>">
|
2
|
+
<div class="page-container">
|
3
|
+
<div class="flex flex-col max-w-3xl m-auto mt-16 first:mt-0">
|
4
|
+
<% if post.image.attached? && post.image.variable? %>
|
5
|
+
<%= image_tag main_app.cdn_image_url(post.image.variant(spree_image_variant_options(resize_to_fit: [nil, 800]))), height: 400, class: 'h-full w-full object-cover object-center', loading: :lazy, alt: post.title %>
|
6
|
+
<% end %>
|
7
|
+
|
8
|
+
<h1 class="uppercase text-2xl font-medium mt-4"><%= post.title %></h1>
|
9
|
+
|
10
|
+
<% if post.published? %>
|
11
|
+
<div class="mt-2 text-sm"><%= local_time(post.published_at, '%B %e, %Y') %></div>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<div class="mt-8 post-details-content"><%= post.content %></div>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
|
19
|
+
<%= render 'spree/posts/json_ld', post: post %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<div style="<%= section_styles(section) %>">
|
2
|
+
<% if @posts.any? %>
|
3
|
+
<div class="page-container">
|
4
|
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-8 mb-4 auto-rows-fr">
|
5
|
+
<%= render partial: 'spree/posts/post', collection: @posts, cached: true %>
|
6
|
+
</div>
|
7
|
+
|
8
|
+
<%= paginate @posts, theme: 'storefront', outer_window: 1, inner_window: 2 %>
|
9
|
+
</div>
|
10
|
+
<% end %>
|
11
|
+
</div>
|