templates/blog/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Blog - Fitness Tips & Health Advice | Fatness for Service{% endblock %}
  3. {% block meta_description %}Discover fitness tips, health advice, and success stories to help you on your fitness journey.{% endblock %}
  4. {% block body %}
  5.     <section class="bg-primary bg-gradient py-5">
  6.         <div class="container">
  7.             <div class="row align-items-center">
  8.                 <div class="col-md-8 mx-auto text-center">
  9.                     <h1 class="display-4 fw-bold text-white mb-3">
  10.                         Fitness Tips & Health Advice
  11.                     </h1>
  12.                     <p class="fs-5 text-white-50 mb-0">
  13.                         Discover expert advice, success stories, and motivation for your fitness journey
  14.                     </p>
  15.                 </div>
  16.             </div>
  17.         </div>
  18.     </section>
  19.     <section class="py-5">
  20.         <div class="container">
  21.             <div class="row g-4">
  22.                 <div class="col-lg-8">
  23.                     {% if posts|length > 0 %}
  24.                         <div class="row row-cols-1 g-4 mb-4">
  25.                             {% for post in posts %}
  26.                                 <div class="col">
  27.                                     {% include 'blog/_post_card.html.twig' with {'post': post} %}
  28.                                 </div>
  29.                             {% endfor %}
  30.                         </div>
  31.                         
  32.                         {% include 'blog/_pagination.html.twig' with {
  33.                             'currentPage': currentPage,
  34.                             'totalPages': totalPages,
  35.                             'route': 'app_blog_index',
  36.                             'routeParams': {}
  37.                         } %}
  38.                         
  39.                         <div class="text-center text-secondary mt-3">
  40.                             Showing {{ posts|length }} of {{ totalPosts }} posts
  41.                         </div>
  42.                     {% else %}
  43.                         <div class="alert alert-info">
  44.                             No blog posts found. Check back soon for new content!
  45.                         </div>
  46.                     {% endif %}
  47.                 </div>
  48.                 
  49.                 <div class="col-lg-4">
  50.                     {% include 'blog/_sidebar.html.twig' with {'tags': tags} %}
  51.                 </div>
  52.             </div>
  53.         </div>
  54.     </section>
  55. {% endblock %}