- add_css(layout_content.css) - add_javascript(layout_content.javascript) - add_head_content(layout_content.head_content) !!! / Platform: Workarea Ecommerce Web: http://workarea.com Email: sales@workarea.com Phone: 215-925-1800 %html{ lang: 'en' } %head %meta{ charset: 'utf-8' } %title= page_title %meta{ name: 'robots', content: 'noodp' } = csrf_meta_tags %meta{ name: 'viewport', content: 'width=device-width, initial-scale=1.0' } %meta{ property: 'locale', content: I18n.locale } %meta{ property: 'environment', content: Rails.env } = alternate_locales_tags = render 'workarea/storefront/favicons/tags' %link{ rel: 'manifest', href: web_manifest_path } %meta{ name: 'theme-color', content: Workarea.config.web_manifest.theme_color } :css @-ms-viewport { width: device-width; } @viewport { width: device-width; } = yield :head = stylesheet_link_tag Workarea.config.asset_manifests.storefront_stylesheet, media: 'all' = yield :css = append_partials('storefront.document_head') = javascript_include_tag Workarea.config.asset_manifests.storefront_javascript_head = render_schema_org(web_site_schema) = render_schema_org(web_page_schema) = yield :head_content = yield :javascript_head %body = append_partials('storefront.body_top') %nav.accessibility-nav.visually-hidden = link_to t('workarea.storefront.layouts.accessibility_info'), accessibility_path = link_to t('workarea.storefront.layouts.main_content'), '#main_content', accesskey: 'S' = link_to t('workarea.storefront.layouts.primary_navigation'), '#navigation', accesskey: 'M' .page-messages{ role: 'complementary' } = flash_messages if flash.present? #top.page-container .page-header{ role: 'banner' } .page-header__main .content-wrapper .grid.grid--middle .grid__cell.grid__cell--80.grid__cell--50-at-medium = link_to menus_path, id: 'mobile_nav_button', class: 'page-header__mobile-nav-button hamburger', role: 'button', aria: { label: t('workarea.storefront.layouts.mobile_navigation') } do .visually-hidden %span.hamburger__text= t('workarea.storefront.layouts.mobile_navigation') .hamburger__box .hamburger__inner .page-header__logo-container = link_to image_tag('workarea/storefront/logo.png', alt: t('workarea.storefront.layouts.logo'), class: 'page-header__logo', width: 256), root_path, rel: 'home' .grid__cell.grid__cell--20.grid__cell--50-at-medium .grid.grid--auto.grid--right.grid--middle.grid--flush .grid__cell .page-header__search{ data: { header_search_ui: '' } } = form_tag search_path, method: 'get', class: 'page-header__search-form', role: 'search' do .page-header__search-value .value= search_field_tag :q, params[:q], id: 'storefront_search', class: 'text-box text-box--secondary', title: t('workarea.storefront.searches.search'), placeholder: t('workarea.storefront.searches.search'), tabindex: 1, required: true = append_partials('storefront.page_header_search_value') = button_tag value: 'search', class: 'page-header__search-button', tabindex: 2 do = inline_svg('workarea/storefront/icons/search.svg', class: 'page-header__search-icon svg-icon svg-icon--theme-header', title: t('workarea.storefront.forms.go')) .grid__cell %button.button.button--transparent.page-header__user-link{ data: { utility_nav_dropdown: '' } } = inline_svg('workarea/storefront/icons/account.svg', class: 'page-header__account-icon svg-icon svg-icon--theme-header', title: t('workarea.storefront.layouts.account_menu')) .grid__cell = link_to cart_path, accesskey: 'Y', class: 'page-header__cart-link', id: 'cart_link', data: { cart_indicator: '' } do = inline_svg('workarea/storefront/icons/cart.svg', class: 'page-header__cart-icon svg-icon svg-icon--theme-header', title: t('workarea.storefront.carts.title')) .page-header__cart-indicator .utility-nav .grid .grid__cell = link_to t('workarea.storefront.users.account'), users_account_path, class: 'utility-nav__link' = append_partials('storefront.utility_nav') - if locale_options.many? .grid__cell .page-header__locale = form_tag url_for(locale: nil), method: 'get' do = switch_locale_fields .value= select_tag :locale, options_for_select(locale_options, I18n.locale), required: true, data: { form_submitting_control: '' } %p.hidden-if-js-enabled= button_tag t('workarea.storefront.forms.go'), value: 'switch', class: 'button' .grid__cell %span{ data: { log_out_link_placeholder: '' } } = append_partials('storefront.page_header') %nav#navigation.primary-nav %ul.primary-nav__menu - navigation_menus.each do |menu| %li.primary-nav__item{ data: navigation_menu_item_data_attribute(menu), class: ('primary-nav__item--parent' if navigation_menu_item_parent?(menu)) } = link_to storefront_path_for(menu.taxon), class: (link_selected?(menu.taxon) ? 'primary-nav__link primary-nav__link--selected' : 'primary-nav__link'), data: { analytics: primary_navigation_analytics_data(menu.taxon).to_json } do %span.primary-nav__link-text= menu.name - if navigation_menu_item_parent?(menu) = inline_svg('workarea/storefront/icons/chevron_down.svg', class: 'primary-nav__link-icon svg-icon svg-icon--tiny', title: t('workarea.storefront.layouts.drop_down_menu')) - if layout_content.content_blocks_for('header_promo').present? .page-header__promo = render_content_blocks(layout_content.content_blocks_for('header_promo')) .page-content{ class: ('page-content--no-breadcrumbs' if no_breadcrumbs?) } .content-wrapper - if content_for?(:breadcrumbs) .breadcrumbs{ role: 'navigation' } = yield :breadcrumbs - elsif @breadcrumbs.present? = render_schema_org(breadcrumb_list_schema(@breadcrumbs.map { |t| [t.name, storefront_url_for(t)] })) .breadcrumbs{ role: 'navigation' } %p.breadcrumbs__node-group - @breadcrumbs.each do |taxon| %span.breadcrumbs__node - if taxon.navigable.present? - if @breadcrumbs.last == taxon %span.breadcrumbs__text= taxon.name - else = link_to taxon.name, storefront_path_for(taxon), class: 'breadcrumbs__link' - elsif !current_page?(taxon.url) = link_to taxon.name, storefront_path_for(taxon), class: 'breadcrumbs__link' - else %span.breadcrumbs__text= taxon.name - content_for_page_aside = yield :page_aside .grid.grid--rev .grid__cell{ class: ('grid__cell--80-at-medium' if content_for_page_aside.present?)} #main_content.page-content__main{ role: 'main' } = yield %p.visually-hidden= link_to t('workarea.storefront.layouts.top_of_page'), '#top' - if content_for_page_aside.present? .grid__cell.grid__cell--20-at-medium #aside-content.page-content__aside{ role: 'complementary' } = content_for_page_aside = append_partials('storefront.page_aside') %p.visually-hidden= link_to t('workarea.storefront.layouts.top_of_page'), '#top' .page-footer{ role: 'contentinfo' } .content-wrapper .grid - footer_col_1_content = layout_content.content_blocks_for('footer_column_1') - if footer_col_1_content.present? .grid__cell.grid__cell--25-at-medium .page-footer__nav= render_content_blocks(footer_col_1_content) - footer_col_2_content = layout_content.content_blocks_for('footer_column_2') - if footer_col_2_content.present? .grid__cell.grid__cell--25-at-medium .page-footer__nav= render_content_blocks(footer_col_2_content) - footer_col_3_content = layout_content.content_blocks_for('footer_column_3') - if footer_col_3_content.present? .grid__cell.grid__cell--25-at-medium .page-footer__nav= render_content_blocks(footer_col_3_content) %ul.page-footer__help %li.page-footer__help-item= link_to t('workarea.storefront.contacts.contact_us'), contact_path, class: 'page-footer__help-link' %li.page-footer__help-item= link_to t('workarea.storefront.sitemaps.heading'), sitemap_path, class: 'page-footer__help-link' = append_partials('storefront.footer_help') .grid__cell.grid__cell--25-at-medium .page-footer__email-signup %h3.page-footer__heading= t('workarea.storefront.email_signup.heading') = form_tag email_signup_path, method: :post, id: 'footer_email_signup_form', class: 'page-footer__email-signup-form', data: { analytics: email_signup_analytics_data.to_json } do = label_tag 'footer_email_signup_field', t('workarea.storefront.email_signup.message'), class: 'page-footer__email-signup-label' .page-footer__email-container .page-footer__email-value .value= email_field_tag :email, nil, id: 'footer_email_signup_field', class: 'text-box text-box--secondary', placeholder: t('workarea.storefront.forms.email_placeholder'), title: t('workarea.storefront.users.email'), required: true, type: 'email', autocapitalize: 'off', autocomplete: 'email' .page-footer__email-action = button_tag value: 'sign_up', class: 'button button--small button--full-height' do = inline_svg('workarea/storefront/icons/chevron_right.svg', class: 'svg-icon svg-icon--small svg-icon--white', title: t('workarea.storefront.users.join')) %span.visually-hidden= t('workarea.storefront.users.join') .page-sub-footer .content-wrapper .grid.grid--middle .grid__cell.grid__cell--50-at-medium %p.page-sub-footer__copyright © #{Time.now.year} One Theme. Powered by Workarea. .grid__cell.grid__cell--50-at-medium .page-sub-footer__payment-icons = all_payment_icons %p.visually-hidden= link_to t('workarea.storefront.layouts.top_of_page'), '#top' = yield :drawer = javascript_include_tag Workarea.config.asset_manifests.storefront_javascript = yield :javascript = append_partials('storefront.javascript')