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

Open in your IDE?
  1. {% extends "front/base.html.twig" %}
  2. {% block title %}
  3.     {% if article.titleSeo %}
  4.         {{ article.titleSeo }}
  5.     {% else %}
  6.         {{ article.title }}
  7.     {% endif %}
  8. {% endblock %}
  9. {% block seo %}
  10.     <meta name="description" content="{{ article.descriptionSeo }}">
  11. {% endblock %}
  12. {% block og %}
  13.     <meta property="og:type" content="website" />
  14.     <meta property="og:title" content="{{ article.titleSeo }}" />
  15.     <meta property="og:image" content="{{ url('homepage_no_locale') }}images/blog/{{ article.cover }}"/>
  16.     <meta property="og:description" content="{{ article.descriptionSeo }}"/>
  17.     <meta property="og:site_name" content="Racket Trip"/>
  18. {% endblock %}
  19. {% block body %}
  20.     <section class="first-section single-article">
  21.         <div class="cover" style="background-image : url('/images/blog/{{ article.cover }}')" title="{{ article.altCover }}">
  22.             <div class="title-wrap">
  23.                 <h1 class="title">{{ article.title | raw }}</h1>
  24.             </div>
  25.         </div>
  26.         <div class="container">
  27.             <div class="row">
  28.                 <div class="content-col">
  29.                     <div class="blog-content">
  30.                         <div class="categories">
  31.                             {% for category in article.categories %}
  32.                                 <a href="{{ path('article_category', {'slug': category.slug}) }}" class="category-link">{{ category.title }}</a>
  33.                             {% endfor %}
  34.                             {% if article.author %}
  35.                             <span class="category-link">{{ article.author.firstname ~ ' ' ~ article.author.lastname }}</span>
  36.                             {% endif %}
  37.                             <span class="category-link">{{ 'article.published_ad' | trans }} {{ article.publishedAt | date('d/m/Y') }}</span>
  38.                         </div>
  39.                         {{ article.description | raw }}
  40.                     </div>
  41.                     {% if preview == false %}
  42.                     <div class="comments">
  43.                         <div class="main-title">
  44.                             <h1 class="title-text">{{ "backoffice.comments" | trans }}</h1>
  45.                         </div>
  46.                         {% for comment in article.comments %}
  47.                         {% if comment.activated %}
  48.                         <div class="comment-item">
  49.                             <h4 class="author">{{ comment.name }}</h4>
  50.                             <span class="date">{{ comment.createdAt | date('d/m/Y') }}</span>
  51.                             <p class="comment-text">{{ comment.message | raw }}</p>
  52.                         </div>
  53.                         {% endif %}
  54.                         {% endfor %}
  55.                         <div class="actions mt-3">
  56.                             <button class="btn main-btn btn-sm mx-auto" data-toggle="modal" data-target="#comment-modal">{{ 'article.comment' | trans }}</button>
  57.                         </div>
  58.                         
  59.                     </div>
  60.                     {% endif %}
  61.                     
  62.                 </div>
  63.                 <div class="blog-sidebar">
  64.                     <div class="sidebar-content">
  65.                         <div class="share-card">
  66.                             <h5 class="title">{{ 'article.share' | trans }}</h5>
  67.                             <div class="share-buttons">
  68.                                 <a class="sharer" target="_blank" href="http://www.facebook.com/share.php?u={{ url('show_article', {'slug': article.slug}) }}&title={{ article.title }}">
  69.                                     <i class="fab fa-facebook-f"></i>
  70.                                 </a>
  71.                                 <a class="sharer" target="_blank" href="https://twitter.com/intent/tweet?text={{ url('show_article', {'slug': article.slug}) }}">
  72.                                     <i class="fab fa-x-twitter"></i>
  73.                                 </a>
  74.                                 <a class="sharer" target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&url={{ url('show_article', {'slug': article.slug}) }}&title={{ article.title }}">
  75.                                     <i class="fab fa-linkedin-in"></i>
  76.                                 </a>
  77.                             </div>
  78.                         </div>
  79.                         <div class="more-articles">
  80.                             {% if preview == false %}
  81.                                 <h5 class="title" >{{ 'article.more_articles' | trans }}</h5>
  82.                                 <div class="row">
  83.                                     {% for article in moreArticles %}
  84.                                         <div class="col-12 blog-col">
  85.                                             {% include "front/blog/_blog-card.html.twig" %}
  86.                                         </div>
  87.                                     {% endfor %}
  88.                                 </div>
  89.                             {% endif %}
  90.                         </div>
  91.                     </div>
  92.                 </div>
  93.             </div>
  94.         </div>
  95.     </section>
  96.     {% if form is defined %}
  97.         <!-- Comment Modal -->
  98.         <div class="modal fade bd-example-modal-lg" id="comment-modal" tabindex="-1" role="dialog" aria-labelledby="commentModalTitle" aria-hidden="true">
  99.             <div class="modal-dialog modal-dialog-centered" role="document">
  100.                 <div class="modal-content">
  101.                     {{ form_start(form) }}
  102.                     <div class="modal-body">
  103.                         <div class="modal-title-wrap">
  104.                             <h5 class="modal-title">{{ 'article.comment' | trans }}</h5>
  105.                             <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  106.                                 <i class="fal fa-times"></i>
  107.                             </button>
  108.                         </div>
  109.                         <div class="row">
  110.                             <div class="col-12">
  111.                                 {{ form_row(form.name) }}
  112.                                 {{ form_row(form.email) }}
  113.                                 {{ form_widget(form.website) }}
  114.                                 {{ form_row(form.message) }}
  115.                             </div>
  116.                         </div>
  117.                         <div class="row mt-3">
  118.                             <div class="col-md-12">
  119.                                 <button type="submit" class="btn main-btn m-auto">{{ 'article.send_button' | trans }}</button>
  120.                             </div>
  121.                         </div>
  122.                     </div>
  123.                     {{ form_end(form) }}
  124.                 </div>
  125.             </div>
  126.         </div>
  127.     {% endif %}
  128.     {% include "front/blog/_blog-cta.html.twig" %}
  129. {% endblock %}