templates/blog_category/show.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}{{ setting.siteName }} : catégorie {{ category.title }}{% endblock %}
  3. {% block body %}
  4. {# <h1>BlogCategory</h1>
  5.     <table class="table">
  6.         <tbody>
  7.             <tr>
  8.                 <th>Id</th>
  9.                 <td>{{ blog_category.id }}</td>
  10.             </tr>
  11.             <tr>
  12.                 <th>Title</th>
  13.                 <td>{{ blog_category.title }}</td>
  14.             </tr>
  15.         </tbody>
  16.     </table>
  17.     <a href="{{ path('app_blog_category_index') }}">back to list</a>
  18.     <a href="{{ path('app_blog_category_edit', {'id': blog_category.id}) }}">edit</a>
  19.     {{ include('blog_category/_delete_form.html.twig') }} #}
  20.     {# {{ dump(category) }} #}
  21. <section class="container py-5">
  22.     <div class="row">
  23.         <div class="col">
  24.             {# Breadcrumbs #}
  25.             <div class="row">
  26.                 <div class="col small">
  27.                     <nav style="--bs-breadcrumb-divider: url(&#34;data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath d='M2.5 0L1 1.5 3.5 4 1 6.5 2.5 8l4-4-4-4z' fill='%236c757d'/%3E%3C/svg%3E&#34;);"
  28.                         aria-label="breadcrumb">
  29.                         <ol class="breadcrumb small">
  30.                             <li class="breadcrumb-item"><a href="{{ path('app_home') }}" class="text-decoration-none text-dark">Accueil</a></li>
  31.                             <li class="breadcrumb-item"><a href="{{ path('app_blog_category_index') }}" class="text-decoration-none text-dark">Catégories</a></li>
  32.                             <li class="breadcrumb-item active" aria-current="page">{{ category.title }}</li>
  33.                         </ol>
  34.                     </nav>
  35.                 </div>
  36.             </div>
  37.         </div>
  38.     </div>
  39.     <h1 class="text-center mb-4 color1 fw-700 text-uppercase" data-aos="fade-down" data-aos-duration="2000">Catégorie :
  40.         {{ category.title }}</h1>
  41.     <h5 class="text-center mb-4 color1 fw-700 text-uppercase">Liste des articles de cette catégorie</h5>
  42.     <div class="row row-cols-1 row-cols-md-4 g-4 mt-5">
  43.         {% for article in category.blogArticles %}
  44.             <div class="col blog-cards">
  45.                 <div class="card h-100">
  46.                     <img src="{{ asset('assets/img/articles/' ~ article.image ) }}" class="card-img-top img-fluid" style="max-height: 150px; width: 100%; object-fit: cover;" alt="{{ article.title }}">
  47.                     <div class="card-body">
  48.                         <h5 class="card-title">
  49.                             <a href="{{ path('app_blog_article_show', {'slug': article.slug}) }}" class="text-decoration-none color1">
  50.                                 {{ article.title }}
  51.                             </a>
  52.                         </h5>
  53.                         {# <p class="card-text">This is a wider card with supporting text below as a natural lead-in to
  54.                             additional content. This content is a little bit longer.</p> #}
  55.                     </div>
  56.                     <div class="card-footer">
  57.                         <a href="{{ path('app_blog_article_show', {'slug': article.slug}) }}" class="text-decoration-none">
  58.                             <span class="button-difference text-uppercase">Lire la suite</span>
  59.                         </a>
  60.                     </div>
  61.                 </div>
  62.             </div>
  63.         {% endfor %}
  64.     </div>
  65.     <div class="row mt-5">
  66.         <div class="col text-center">
  67.             <a class="btn btn-sm btn-primary" href="{{ path('app_blog_article_index') }}">Retour à la page du Blog</a>
  68.             <a class="btn btn-sm btn-primary" href="{{ path('app_blog_category_index') }}">Retour à la page des Catégories</a>
  69.         </div>
  70.     </div>
  71. </section>
  72. {% endblock %}