templates/front/blog/index.html.twig line 1

Open in your IDE?
  1. {% extends "front/base.html.twig" %}
  2. {% block title %}
  3.     {{ 'seo.blog_title' | trans }}
  4. {% endblock %}
  5. {% block seo %}
  6.     <meta name="description" content="{{ 'seo.blog_description' | trans }}">
  7. {% endblock %}
  8. {% block body %}
  9.     <section class="mt-0 first-section" id="blog-search">
  10.         <div class="container">
  11.             <div class="row justify-content-center">
  12.                 <div class="col-lg-8">
  13.                     {{ form_start(form, {'attr': {'class': 'blog-main-search'}}) }}
  14.                         <div class="form-inline">
  15.                             {{ form_widget(form.title, {'attr': {'class': 'input-main-search'}}) }}
  16.                             <button class="btn btn-main-search" type="submit">
  17.                                 <span class="hide-mobile">{{ 'global.search' | trans | capitalize }}</span>
  18.                                 <i class="far fa-search hide-desktop"></i>
  19.                             </button>
  20.                         </div>
  21.                     {{ form_end(form) }}
  22.                 </div>
  23.             </div>
  24.         </div>
  25.     </section>
  26.     {# Categories #}
  27.     <section id="categories">
  28.         {% if categories | length > 0 %}
  29.             <div class="container">
  30.                 <h2 class="section-title-underline">{{ 'blog.categories' | trans }}</h2>
  31.                 <div class="categories-grid">
  32.                     {% for category in categories %}
  33.                         <a class="card-category" href="{{ path('article_category', {'slug': category.slug}) }}">
  34.                             <img loading="lazy" src="{{asset('/images/categories/' ~ category.image) }}" alt="{{ category.title }}"/>
  35.                             <h3 class="title">{{ category.title }}</h3>
  36.                         </a>
  37.                     {% endfor %}
  38.                 </div>
  39.                 
  40.             </div>
  41.         {% endif %}
  42.     </section>
  43.     <section id="blog" class="pt-0">
  44.         {% if featured | length > 0 %}
  45.             <div class="container">
  46.                 <h2 class="section-title-underline">{{ 'blog.headline' | trans }}</h2>
  47.                 <div class="row">
  48.                     {% for article in featured %}
  49.                         <div class="col-xl-3 col-lg-4 col-md-6 col-sm-12 blog-col">
  50.                             {% include "front/blog/_blog-card.html.twig" %}
  51.                         </div>
  52.                     {% endfor %}
  53.                 </div>
  54.             </div>
  55.         {% endif %}
  56.         {% if latest | length > 0 %}
  57.             <div class="container" id="news">
  58.                 <h2 class="section-title-underline">{{ 'blog.latest' | trans }}</h2>
  59.                 <div class="row">
  60.                     {% for article in latest %}
  61.                         <div class="col-xl-3 col-lg-4 col-md-6 col-sm-12 blog-col">
  62.                             {% include "front/blog/_blog-card.html.twig" %}
  63.                         </div>
  64.                     {% endfor %}
  65.                 </div>
  66.                 <div class="text-center">
  67.                     <a href="{{ path('latest_news') }}" class="btn main-btn">{{ 'blog.more_latest' | trans }}</a>
  68.                 </div>
  69.             </div>
  70.         {% endif %}
  71.     </section>
  72.     {% include "front/blog/_blog-cta.html.twig" %}
  73. {% endblock %}