templates/front_v4/mca/author/single.html.twig line 1

Open in your IDE?
  1. {% extends 'front_v4/base.html.twig' %}
  2. {% block meta_title %}{{ author.metaTitle }}{% endblock meta_title %}
  3. {% block meta_description %}{{ author.metaDescription }}{% endblock meta_description %}
  4. {% block meta_custom %}{{ author.metaCustom|raw }}{% endblock meta_custom %}
  5. {% block content %}
  6.     <!-- ========== MAIN CONTENT ========== -->
  7.     <main id="content" role="main">
  8.         <!-- User Profile -->
  9.         <div class="container content-space-t-3 content-space-t-lg-4 content-space-b-1">
  10.             <div class="w-md-75 w-lg-65 mx-md-auto">
  11.                 <!-- Media -->
  12.                 <div class="d-sm-flex">
  13.                     <div class="flex-shrink-0 mb-3 mb-sm-0">
  14.                         <div class="avatar avatar-xxl avatar-circle">
  15.                             {# image size : 160x160 #}
  16.                             <img class="avatar-img" src="{% if author.filename %} {{ vich_uploader_asset(author, 'imageFile') | imagine_filter('author_image_medium') }} {% endif %}" alt="{{ author.firstname }} - Rédacteur Mon Centre Auditif">
  17.                             <img class="bg-white position-absolute bottom-0 end-0 rounded-circle p-1" src="{{asset('build/front_v4/svg/illustrations/top-vendor.svg')}}" alt="Icon" width="32" height="32" title="Top Writer">
  18.                         </div>
  19.                     </div>
  20.                     <div class="flex-grow-1 ms-sm-4">
  21.                         <!-- Media -->
  22.                         <div class="d-flex justify-content-between align-items-center mb-3">
  23.                             <h1 class="h2 mb-0">{{ author.firstname }} {{  author.lastname }}</h1>
  24.                         </div>
  25.                         <!-- End Media -->
  26.                         <div class="row mb-3">
  27.                             <div class="col-auto">
  28.                                 <span class="h6">{{ author.blogPosts|length }}</span>
  29.                                 <span>articles</span>
  30.                             </div>
  31.                             <!-- End Col -->
  32.                             {% if author.website is not null %}
  33.                             <div class="col-auto">
  34.                                 <span class="h6">Site web :</span>
  35.                                 <a href="{{ author.website|raw }}" target="_blank"><span class="ms-1">{{ author.website|replace({'http://': '', 'https://': ''}) }}</span></a>
  36.                             </div>
  37.                             <!-- End Col -->
  38.                             {% endif %}
  39. {#                            <div class="col-auto">#}
  40. {#                                <span class="h6">109</span>#}
  41. {#                                <span class="ms-1">Following</span>#}
  42. {#                            </div>#}
  43. {#                            <!-- End Col -->#}
  44.                         </div>
  45.                         <!-- End Row -->
  46.                         <p>
  47.                             {{ author.description|raw }}
  48.                         </p>
  49.                     </div>
  50.                 </div>
  51.                 <!-- End Media -->
  52.             </div>
  53.         </div>
  54.         <!-- End User Profile -->
  55.         <div class="container">
  56.             <div class="border-top w-md-75 w-lg-65 mx-md-auto"></div>
  57.         </div>
  58.         <!-- Card Grid -->
  59.         <div class="container content-space-1">
  60.             <div class="w-md-75 w-lg-65 mx-md-auto">
  61.                 {% for post in pagination %}
  62.                 <!-- Card -->
  63.                 <div class="card mb-5 mb-md-10">
  64.                     <div class="shape-container">
  65.                         {# image size : 500x280 #}
  66.                         <img class="card-img-top" src="{% if post.filename %} {{ vich_uploader_asset(post, 'imageFile') | imagine_filter('blog_post_large') }} {% endif %}" alt="{{ post.title }}">
  67.                         <!-- Shape -->
  68.                         <div class="shape shape-bottom zi-1" style="margin-bottom: -.25rem">
  69.                             <svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 1920 100.1">
  70.                                 <path fill="#fff" d="M0,0c0,0,934.4,93.4,1920,0v100.1H0L0,0z"></path>
  71.                             </svg>
  72.                         </div>
  73.                         <!-- End Shape -->
  74.                     </div>
  75.                     <!-- Card Body -->
  76.                     <div class="card-body">
  77.                         <h3 class="card-title">
  78.                             <a class="text-dark" href="{{ path('blog_post_show', {'slug': post.slug}) }}">{{ post.title }}</a>
  79.                         </h3>
  80.                         <p class="card-text">{{ post.body|striptags|slice(0, 140)|raw|nl2br }} ...</p>
  81.                     </div>
  82.                     <!-- End Card Body -->
  83.                     <!-- Card Footer -->
  84.                     <div class="card-footer">
  85.                         <div class="d-flex align-items-center">
  86.                             <div class="flex-shrink-0">
  87.                                 <a class="avatar avatar-xs avatar-circle" href="#" data-bs-toggle="tooltip" data-bs-placement="top" title="{{ author.firstname }}">
  88.                                     <img class="avatar-img" src="{% if author.filename %} {{ vich_uploader_asset(author, 'imageFile') | imagine_filter('author_image_medium') }} {% endif %}" alt="{{ author.firstname }} - Rédacteur Mon Centre Auditif">
  89.                                 </a>
  90.                             </div>
  91.                             <div class="flex-grow-1">
  92.                                 <div class="d-flex justify-content-end">
  93.                                     <p class="card-text">{{ post.createdAt|format_date('medium') }}</p>
  94.                                 </div>
  95.                             </div>
  96.                         </div>
  97.                     </div>
  98.                     <!-- End Card Footer -->
  99.                 </div>
  100.                 <!-- End Card -->
  101.                 {% endfor %}
  102.                 <!-- Pagination -->
  103.                 {% if pagination is defined and pagination is not null %}
  104.                     <div class="navigation pagination mt-5 justify-content-center">
  105.                         {% do pagination.setTemplate('@KnpPaginator/Pagination/twitter_bootstrap_v4_pagination.html.twig') %}
  106.                         {{ knp_pagination_render(pagination) }}
  107.                     </div>
  108.                 {% endif %}
  109.                 <!-- End Pagination -->
  110.             </div>
  111.         </div>
  112.         <!-- End Card Grid -->
  113.     </main>
  114.     <!-- ========== END MAIN CONTENT ========== -->
  115. {% endblock content %}