material_admin_support-8.x-1.x-dev/templates/commerce-product--browser.html.twig

templates/commerce-product--browser.html.twig
{#
/**
 * @file
 * Default theme implementation for commerce product's browser view mode.
 *
 * Available variables:
 * - attributes: HTML attributes for the wrapper.
 * - product: The rendered product fields.
 *   Use 'product' to print them all, or print a subset such as
 *   'product.title'. Use the following code to exclude the
 *   printing of a given field:
 *   @code
 *   {{ product|without('title') }}
 *   @endcode
 * - product_entity: The product entity.
 * - product_url: The product URL.
 *
 * @ingroup themeable
 */
#}
<article{{ attributes.addClass('card', 'content-browser-card', 'card--product')|without('style') }} style="background: {{ type_style(product_entity, 'color', '#d3d3d3') }}">
  <div class="card-image">
    <div{{ content_attributes.addClass('card-image-inside') }}>
      {{ product|without('variation_attributes', 'title') }}
    </div>
    <i class="material-icons check-indicator">check_circle</i>
  </div>
  <div class="card-content card-content--product">
    <i class="material-icons left">{{ type_style('commerce_product_type', 'individual', 'icon', 'shopping_cart') }}</i>
    <p{{ title_attributes }}>
      {{- product.title -}}
    </p>
  </div>
</article>

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc