templates/juki/HitsoContentBundle/Front/ArticleCategory/show.html.twig line 1

Open in your IDE?
  1. {% extends 'HitsoCommonBundle::layout.html.twig' %}
  2. {% block stylesheets %}
  3.     {{ parent() }}
  4.     <link rel="stylesheet" href="{{ asset('juki/source/css/articles-critical.css') }}">
  5.     <link rel="preload" as="style" href="{{ preload(asset('juki/source/css/articles-critical.css')) }}">
  6.     <link rel="preload" href="{{ preload(asset('juki/source/css/articles.css')) }}" as="style" onload="this.onload=null;this.rel='stylesheet'">
  7.     {# Previous / Next #}
  8.     {% if articles.hasPreviousPage|default(false) %}<link rel="prev" href="{{ path('article_category_page', {'slug': currentCategory.slug, 'page': articles.currentPage-1 }) }}" />{% endif %}
  9.     {% if articles.hasNextPage|default(false) %}<link rel="next" href="{{ path('article_category_page', {'slug': currentCategory.slug, 'page': articles.currentPage+1 }) }}" />{% endif %}
  10. {% endblock %}
  11. {% block body_class %}{{ parent() }} page--articles{% endblock %}
  12. {% block content %}
  13.     <main class="main">
  14.         <section class="articles">
  15.             <div class="articles__header">
  16.                 <h2 class="articles__header-title section-title section-title--h2">
  17.                     Articles
  18.                 </h2>
  19.                 <div class="articles__categories">
  20.                     <div class="articles__categories-inner">
  21.                         <a href="{{ path('article_category_index') }}" rel="category" class="articles__categories-item">All</a>
  22.                         {% for tmpCategory in article_categories() %}
  23.                             {% set tmpArticles = category_articles(tmpCategory) %}
  24.                             <a href="{{ dynamic_url(tmpCategory.route.id) }}" rel="category" class="articles__categories-item {% if tmpCategory.id == currentCategory.id %}articles__categories-item--active{% endif %}">{{ tmpCategory.name }} ({{ tmpArticles.count }})</a>
  25.                         {% endfor %}
  26.                     </div>
  27.                 </div>
  28.             </div>
  29.             <div class="articles__content">
  30.                 <div class="entries" itemscope itemtype="http://schema.org/ItemList">
  31.                     {% include 'HitsoContentBundle:Front/ArticleCategory:entry_loop.html.twig' %}
  32.                     {% if articles.haveToPaginate|default(false) %}
  33.                         <noscript>
  34.                         {% include 'HitsoContentBundle:Front/Article/Partials:pagination.html.twig' with { 'paginator': articles, 'route': 'article_category_page', 'routeParams': {'slug': currentCategory.slug}} %}
  35.                         </noscript>
  36.                         <div class="entries__loading">
  37.                             Loading next 6 of 12 articles
  38.                         </div>
  39.                     {% endif %}
  40.                 </div>
  41.             </div>
  42.         </section>
  43.     </main>
  44. {% endblock %}
  45. {% block footer_javascripts %}
  46.     <script src="{{ asset('juki/source/js/articles.js') }}" defer></script>
  47. {% endblock %}