templates/snippets/hero-slide.html.twig line 1

Open in your IDE?
  1. {% set theme = pimcore_checkbox('theme').checked ? 'dark' : 'light' %}
  2. {% set block = pimcore_block('hero-block') %}
  3. {% if editmode %}
  4.     {{ include('layout/includes/css.html.twig') }}
  5.     <div class="ms-auto">
  6.         {% embed 'includes/editmode-settings.html.twig' %}
  7.             {% block settings %}
  8.                 <div class="row">
  9.                     <div class="col">
  10.                         {{ pimcore_checkbox('textRight', {
  11.                             label: 'Text right',
  12.                             reload: true,
  13.                         }) }} <br>
  14.                         {{ pimcore_checkbox('theme', {
  15.                             label: 'Dark theme',
  16.                         }) }} <br>
  17.                         {{ pimcore_image('hero-image', {
  18.                             width: 200,
  19.                         }) }}
  20.                     </div>
  21.                     <div class="col">
  22.                         {% for i in block.iterator %}
  23.                             {{ pimcore_select('icon', {
  24.                                 'store': [
  25.                                     ['people', '<span class="icon icon-people"></span>'],
  26.                                     ['network', '<span class="icon icon-network"></span>'],
  27.                                     ['country', '<span class="icon icon-country"></span>'],
  28.                                     ['clock', '<span class="icon icon-clock"></span>'],
  29.                                 ]
  30.                             }) }}<br>
  31.                             <strong>{{ pimcore_input('hero-bold', {placeholder: 'Bold Text'}) }}</strong>
  32.                             {{ pimcore_input('hero-text', {placeholder: 'Text'}) }}
  33.                         {% endfor %}
  34.                     </div>
  35.                 </div>
  36.             {% endblock %}
  37.         {% endembed %}
  38.     </div>
  39. {% endif %}
  40. <div class="hero-portal__slide content-gradient">
  41.     <ul class="hero-portal__info-container list-unstyled list-inline">
  42.         {% if not editmode %}
  43.             {% for i in block.iterator %}
  44.                 <li class="hero-portal__info list-inline-item">
  45.                     {% if pimcore_select('icon').getData() %}
  46.                         <span class="icon icon-{{ pimcore_select('icon').getData() }}" aria-hidden="true"></span>
  47.                     {% endif %}
  48.                     <span><strong>{{ pimcore_input('hero-bold').getData() }}</strong> {{ pimcore_input('hero-text').getData() }}</span>
  49.                 </li>
  50.             {% endfor %}
  51.         {% endif %}
  52.     </ul>
  53.     <figure class="hero-portal__figure">
  54.         {% if not pimcore_image('hero-image').isEmpty() %}
  55.             {{ pimcore_image('hero-image').thumbnail('hero').getHtml({
  56.                 imgAttributes: {
  57.                     class: 'hero-portal__img',
  58.                     loading: 'eager'
  59.                 }
  60.             })|raw }}
  61.         {% endif %}
  62.         <div class="hero-portal__slide-content {{ pimcore_checkbox('textRight').checked ? 'is-right' }}">
  63.             <div class="hero-portal__text-container">
  64.                 <div class="hero-portal__text-block {{ pimcore_checkbox('theme').checked ? 'hero-portal__text-block--dark' : 'hero-portal__text-block--light' }}">
  65.                     {{ include('includes/title-blocks/title-block.html.twig', {
  66.                         className: 'title-block__title--hero',
  67.                         titleTag: 'h1',
  68.                         hideIntro: true,
  69.                         noSubtitleGradient: true,
  70.                     }) }}
  71.                     {{ pimcore_link('hero-link', {
  72.                         class: "img-teaser__btn btn btn-#{theme}",
  73.                     }) }}
  74.                 </div>
  75.             </div>
  76.         </div>
  77.     </figure>
  78. </div>