templates/content/tmpl/post-single.html.twig line 1

Open in your IDE?
  1. {% extends "1-col-sidebar.html.twig" %}
  2. {# single post #}
  3. {% block column %}
  4.     <h1 class="post-title">{{ content.title }}</h1>
  5.     {% if content.getFeaturedImageTag() is not empty %}
  6.         <div class="post-thumbnail">
  7.     {% if content.getMediaURL() %}<a href="{{content.getMediaURL()}}">{% endif %}
  8.             {{ content.getFeaturedImageTag("", "max-height: 450px")|raw }}
  9.         {% if content.getMediaURL() %}</a>{% endif %}
  10.         </div>
  11.     {% endif %}
  12.     {#{{ content.publishedat | date("F j, Y") }}#}
  13.     {{ content.publishedat | date | rcsDateFormat }}
  14.     {% if content.getIncludeAuthorByline() and content.getAuthor() %}
  15.         {% if content.getAuthor().getByline() %}
  16.             <p>{{content.getAuthor().getByline()}}</p>
  17.         {% endif %}
  18.     {% endif %}
  19.     <div class="post--content">
  20.         {{ content.getContentFull() | wordpress | raw }}
  21.     </div>
  22.     {% if content.getIncludeCustomerCallToAction() and content.getPrimaryCustomer() %}
  23.         {% if content.getPrimaryCustomer().getCallToAction() %}
  24.             {{content.getPrimaryCustomer().getCallToAction() | wordpress | raw }}
  25.         {% endif %}
  26.     {% endif %}
  27.     {% if content.getIncludeAuthorBio() and content.getAuthor() %}
  28.         {% if content.getAuthor().getAuthorBio() %}
  29.             {{content.getAuthor().getAuthorBio() | wordpress | raw }}
  30.         {% endif %}
  31.     {% endif %}
  32.     {% if content.getIncludeCustomerBio() and content.getPrimaryCustomer() %}
  33.         {% if content.getPrimaryCustomer().getBio() %}
  34.             {{content.getPrimaryCustomer().getBio() | wordpress | raw }}
  35.         {% endif %}
  36.     {% endif %}
  37.     {% set category = content.category %}
  38.     {% if category != "Buy Online" %}
  39.         {#social share buttons#}
  40.         {% include "includes/social-share.html.twig" %}
  41.         {# AAR categories #}
  42.         {% if site_code == constant("App\\Entity\\Content::SITE_AAR") %}
  43.             {% include "includes/post-categories_aar.html.twig" %}
  44.         {% endif %}
  45.         {#count:
  46.         {{meta.recommended|length}}#}
  47.         {% if meta.recommended|length > 0 %}
  48.             <hr>
  49.             <h2>
  50.                 Recommended For You
  51.             </h2>
  52.             <div class="rec-grid">
  53.                 {% for rec in meta.recommended %}
  54.                     <a href="{{ rec.getURL() }}" class="no-track">
  55.                         <div class="card">
  56.                             {# {% if rec.hot %}
  57.                                 <div style="    text-align: center;
  58.                                             font-size: large;
  59.                                             font-weight: bolder;
  60.                                             background: #42465691;">
  61.                                     <marquee>fTRENDING</marquee>
  62.                                 </div>
  63.                             {% endif %} #}
  64.                             {{ rec.getFeaturedImageTag("card-img-top", "max-height: 450px")|raw }}
  65.                             <div class="card-body">
  66.                                 <p class="card-title" style="font-weight: bold">
  67.                                     {{rec.title}}
  68.                                 </p>
  69.                                 Read More ...
  70.                             </div>
  71.                         </div>
  72.                     </a>
  73.                 {% endfor  %}
  74.             </div>
  75.         {% endif %}
  76.         {# comments #}
  77.         {{ render(controller(
  78.             'App\\Controller\\RCS\\ContentController::comment',
  79.             { 'content': content }
  80.            ))
  81.         }}
  82.     {% endif %}
  83.     <style>
  84.         .rec-grid {
  85.             display: grid;
  86.             grid-template: 'a b c';
  87.             gap: 15px;
  88.         }
  89.         .card {
  90.             cursor: pointer;
  91.             transition: 1s cubic-bezier(0.075, 0.82, 0.165, 1);
  92.         }
  93.         .card:hover {
  94.             box-shadow: 9px 14px 20px 0 #00000012;
  95.         }
  96.         @media only screen and (max-width: 992px) {
  97.             .rec-grid {
  98.                 grid-template: 'a';
  99.             }
  100.             .card-title{
  101.                 font-size: small;
  102.             }
  103.             .rec-grid a:not(:first-child){
  104.                 display: none;
  105.             }
  106.         }
  107.     </style>
  108. {% endblock %}