templates/client/courses/category.html.twig line 1

Open in your IDE?
  1. {% extends '/client/common/base.html.twig' %}
  2. {% block title %}Home{% endblock %}
  3. {% block body %}
  4. {% if showContent %}
  5. <div class="uk-container uk-container-expand uk-margin-large">
  6.     {{ content }}
  7. </div>
  8. {% endif %}
  9. <div class="uk-container uk-container-large uk-margin-large{% if not showContent %} uk-margin-large-top{% endif %}">
  10.     <h1>{{ title }}</h1>
  11.     <div uk-grid class="uk-child-width-1-2@s">
  12.         {% for entry in entries %}
  13.         {% set entry = entry.course %}
  14.         <div>
  15.             <div class="uk-card uk-card-default">
  16.                 <div class="uk-card-media-top">
  17.                     {% if (entry.imageIntro.imageName) %}
  18.                     <picture>
  19.                         <source srcset="{{ vich_uploader_asset(entry.imageIntro, 'imageFile') | imagine_filter('course_list_webp') }}" type="image/webp">
  20.                         <source srcset="{{ vich_uploader_asset(entry.imageIntro, 'imageFile') | imagine_filter('course_list') }}" type="image/jpeg">
  21.                         <img src="{{ vich_uploader_asset(entry.imageIntro, 'imageFile') | imagine_filter('course_list') }}" alt="{{ entry.title }}">
  22.                     </picture>
  23.                     {% endif %}
  24.                 </div>
  25.                 <div class="uk-card-body">
  26.                     <h3 class="uk-card-title">{{ entry.title }}</h3>
  27.                     <div class="uk-text-meta uk-margin-small">
  28.                         {{ 'Created at'|trans }}: {{ entry.createdAt|date("d/m/Y") }},
  29.                         {{ 'Posted at'|trans }}:
  30.                         {% for category in entry.categoryOrdering %}
  31.                             <a href="{{ path('client_course_category_list', {'slug': category.category.slug }) }}">{{ category.category.title }}</a>
  32.                             {% if not (loop.last) %}, {% endif %}
  33.                         {% endfor %}
  34.                     </div>
  35.                     <div>{{ entry.intro|raw }}</div>
  36.                     <div>
  37.                         <a class="uk-button uk-button-primary" href="{{ path('client_course_view', {'slug': entry.slug}) }}">{{ 'Read more...'|trans }}</a>
  38.                     </div>
  39.                 </div>
  40.             </div>
  41.         </div>
  42.         {% endfor %}
  43.     </div>
  44.     <hr />
  45.     {{ include('/client/common/parts/pagination.html.twig') }}
  46. </div>
  47. {% endblock %}