templates/frontend-eforum/_partials/modules/authors.html.twig line 1

Open in your IDE?
  1. <section class="product-section product-authors" id="{{ moduleKey }}">
  2.     {% if module.title is defined %}
  3.         <div class="product-section__title-mobile-wrapper d-block d-md-none">
  4.             <div class="container">
  5.                 <span class="product-section__title d-block d-md-none">{{ module.title }}</span>
  6.             </div>
  7.         </div>
  8.     {% endif %}
  9.     <div class="container">
  10.         {% if module.title is defined %}
  11.             <h2 class="product-section__title d-none d-md-block">
  12.                 {{ module.title }}
  13.             </h2>
  14.         {% endif %}
  15.         <div id="authors-nav" class="product-authors__slider">
  16.             {% if module.list is defined %}
  17.                 {% for author in module.list %}
  18.                     <div class="author__item">
  19.                         <a href="#author-content-{{ loop.index }}" id="author-nav-{{ loop.index }}" class="author">
  20.                             <div class="author__thumbnail"
  21.                                 {% if author.photo is defined and author.photo is not empty %}
  22.                                     style="background: url('/uploads/productCmsFiles/{{ author.photo }}');"
  23.                                 {% else %}
  24.                                    style="background: url('/frontend-eforum/src/static/images/author_default.png')"
  25.                                 {% endif %}
  26.                             >
  27.                                 {# crafton solution - changed because image in this case can be only a square #}
  28.                                 {#<img src="/uploads/productCmsFiles/{{ author.photo }}"#}
  29.                                      {#alt="{{ author.title is defined ? author.title : '' }} {{ author.name is defined ? author.name : '' }}"#}
  30.                                 {#>#}
  31.                             </div>
  32.                             <div class="author__content">
  33.                                 <h4 class="author__title">
  34.                                     {% if author.title is defined and author.title is not empty %}
  35.                                         {{ author.title }}
  36.                                     {% else %}
  37.                                         &nbsp;
  38.                                     {% endif %}
  39.                                 </h4>
  40.                                 {% if author.name is defined %}
  41.                                     <h3 class="author__name">{{ author.name }}</h3>
  42.                                 {% endif %}
  43.                                 <span class="author__info">więcej</span>
  44.                             </div>
  45.                         </a>
  46.                     </div>
  47.                 {% endfor %}
  48.             {% endif %}
  49.         </div>
  50.         {% if module.list is defined %}
  51.             <div id="authors-tab" class="products-authors__info">
  52.                 {% for author in module.list %}
  53.                     <div class="product-authors__pane"
  54.                          id="author-content-{{ loop.index }}"
  55.                          role="tabpanel"
  56.                          aria-labelledby="author-nav-{{ loop.index }}"
  57.                     >
  58.                         <div class="product-authors__content">
  59.                             {% if author.details is defined %}
  60.                                 <p>
  61.                                     {{ author.details|raw }}
  62.                                 </p>
  63.                             {% endif %}
  64.                             <a href="#" class="tab-toggle">zwiń</a>
  65.                         </div>
  66.                     </div>
  67.                 {% endfor %}
  68.             </div>
  69.         {% endif %}
  70.     </div>
  71. </section>