app/Resources/views/category.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% use 'includes/blocks/articles.blocks.html.twig' %}
  3. {% block title %}{{ category.title }}{% endblock %}
  4. {% block head %}
  5.     <meta name="description" content="{{ meta_seo_description }}">
  6.     <meta name="twitter:card" content="summary">
  7.     <meta name="twitter:title" content="{{ category.title }}">
  8.     <meta name="twitter:description" content="{{ meta_seo_description }}">
  9.     <meta name="twitter:image" content="{{ asset('avatar.png', 'img') }}?v={{ cache_busting }}">
  10.     <meta name="twitter:url" content="{{ path('category', {category: category.slug}) }}">
  11.     <meta property="og:type" content="website">
  12.     <meta property="og:title" content="{{ category.title }}">
  13.     <meta property="og:description" content="{{ meta_seo_description }}">
  14.     <meta property="og:image" content="{{ asset('avatar.png', 'img') }}?v={{ cache_busting }}">
  15.     <meta property="og:url" content="{{ path('category', {category: category.slug}) }}">
  16. {% endblock %}
  17. {% block content %}
  18.     {% if articles|length > 0 %}
  19.         <div class="bg-frLightBlue">
  20.             <section-title
  21.                 class="mid-section-pb section-pt"
  22.                 :data="{
  23.                     type: 'main',
  24.                     theme: 'light',
  25.                     title: '{{ category.title }}',
  26.                     image: '{{ asset('vue/icons/flash.svg', 'img') }}',
  27.                     imageClass: 'w-15 lg:w-20'
  28.                 }"
  29.             ></section-title>
  30.         </div>
  31.         {% set items = articles %}
  32.         {% set fixRowLayout = 2 %}
  33.         {% set cardClass = 'pb-[15px] lg:pb-[24px]' %}
  34.         {{ block('newest_pattern_homepage') }}
  35.     {% endif %}
  36.     {% if otherArticles|length > 0 %}
  37.         {% set items = otherArticles %}
  38.         {% set articleAjaxUrl = url('latestArticleApi', { 'categorySlug': category.slug }) %}
  39.         {% set initialPage = 3 %}
  40.         {{ block('infinite_scroll_small_articles') }}
  41.     {% endif %}
  42. {% endblock %}