templates/frontend/publikasii/detail.html.twig line 1

Open in your IDE?
  1. {% extends 'frontend/base.html.twig' %}
  2. {% block body %}
  3.     <main>
  4.         <div class="pt-4 pb-5 mb-4">
  5.             <div class="container">
  6.                 <div class="pt-2 mb-5">
  7.                     <div class="row">
  8.                         <div class="col-lg-5 pt-0">
  9.                             <div class="mb-0">
  10.                                 {% for dok in dokumen %}
  11.                                     <figure class="mb-0 mt-4">
  12.                                         {% set hasPoster = dok.path ? "uploads/" ~ dok.path : "frontend/img/poster-placeholder.png" %}
  13.                                         {% set extensi = hasPoster|split('.') %}
  14.                                         {% set ext = extensi|last %}
  15.                                         {% if ext == 'pdf' %}
  16.                                             <div class="text-light">
  17.                                                 <a class="btn btn-secondary btn-sm d-flex align-items-center" href="{{ path('infografik_preview', {id: dok.id, info: infografik.id}) }}">
  18.                                                     <i class="bi-file-pdf"></i>
  19.                                                     Preview PDF
  20.                                                 </a>
  21.                                             </div>
  22.                                             <img src="{{ asset('frontend/img/pdf.png') }}" class="img-infografis" style="object-fit: contain;" alt="img-grafis" style="width:1px; height:1px;"/>
  23.                                         {% else %}
  24.                                             <img src="{{ asset(hasPoster) }}" class="img-infografis" style="object-fit: contain;" alt="img-grafis"/>
  25.                                         {% endif %}
  26.                                     </figure>
  27.                                 {% endfor %}
  28.                             </div>
  29.                         </div>
  30.                         <div class="col-lg-7 pt-0">
  31.                             <h2 class="title-detail-infografis">{{ infografik.judul }}</h2>
  32.                             <div class="info d-flex">
  33.                                 <div class="mr-3">
  34.                                     <i class="fa fa-calendar mr-1"></i>
  35.                                     {{ infografik.releaseDate | date('d F Y') }}
  36.                                 </div>
  37.                                 <div class="mr-3">
  38.                                     <i class="fa fa-eye mr-1"></i>
  39.                                     {{ infografik.view }}
  40.                                 </div>
  41.                                 <div class="d-flex align-items-center">
  42.                                     <div class="mr-2">Bagikan:</div>
  43.                                     <a href="https://www.facebook.com/sharer/sharer.php?u={{app.request.getSchemeAndHttpHost()}}{{ path('detail_publikasii', {id: infografik.id}) }}" target="_blank">
  44.                                         <i class="fa fa-facebook-square mr-2"></i>
  45.                                     </a>
  46.                                     <a href="https://twitter.com/intent/tweet?text={{ infografik.judul }}&url={{app.request.getSchemeAndHttpHost()}}{{ path('detail_publikasii', {id: infografik.id}) }}" target="_blank">
  47.                                         <i class="fa fa-twitter-square mr-2"></i>
  48.                                     </a>
  49.                                     <a href="whatsapp://send?text={{ infografik.judul }} {{app.request.getSchemeAndHttpHost()}}{{ path('detail_publikasii', {id: infografik.id}) }}" target="_blank">
  50.                                         <i class="fa fa-whatsapp"></i>
  51.                                     </a>
  52.                                 </div>
  53.                             </div>
  54.                             <div class="border-top my-3"></div>
  55.                             <p class="mt-2">
  56.                                 {{ infografik.deskripsi | raw }}
  57.                             </p>
  58.                             <table class="table table-bordered">
  59.                                 <tbody>
  60.                                     <tr>
  61.                                         <th class="bg-light">Kategori</th>
  62.                                         <td>
  63.                                             {% for kat in kategori %}
  64.                                                 {{ kat.urusan }}
  65.                                                 <br>
  66.                                             {% else %}
  67.                                                 <i class="fa fa-minus mr-1"></i>
  68.                                             {% endfor %}
  69.                                         </td>
  70.                                     </tr>
  71.                                     <tr>
  72.                                         <th class="bg-light">Sumber Data</th>
  73.                                         <td>
  74.                                             {{ infografik.sumber }}
  75.                                         </td>
  76.                                     </tr>
  77.                                 </tbody>
  78.                             </table>
  79.                             <div class="mt-2 mb-3 ml-auto">
  80.                                 <a href="{{ path('publikasii') }}" class="btn btn-outline-dark btn-sm d-flex align-items-center" style="width: 35%;">
  81.                                     <i class="bi-arrow-left mr-1"></i>
  82.                                     Kembali Daftar Publikasi
  83.                                 </a>
  84.                             </div>
  85.                             {% if dokumen_pdf is not empty %}
  86.                                 <a href="/uploads/publikasi/{{ dokumen_pdf.path }}" style="background-color: #9e0a0a;" class="btn btn-primary" target="_blank">
  87.                                     <i class="fa fa-eye mr-1" style="font-size: 13px;"></i>Lihat
  88.                                 </a>
  89.                                 <a href="/uploads/publikasi/{{ dokumen_pdf.path }}" style="background-color: #9e0a0a;" class="btn btn-primary" download>
  90.                                     <i class="fa fa-download mr-1" style="font-size: 13px;"></i>Unduh
  91.                                 </a>
  92.                             {% endif %}
  93.                             {# <button onclick="dropDown()" class="dropbtn text-light" style="background-color: #9e0a0a;">
  94.                                 <i class="fa fa-download mr-1" style="font-size: 13px;"></i>Unduh</button>
  95.                             <div id="myDropdown" class="dropdown-content">
  96.                                 <a href="{{ path('publikasi_download', {id: infografik.id}) }}">
  97.                                     <i class="fas fa-file-image mr-1" style="font-size: 13px;"></i>Gambar (Zip)</a>
  98.                                 <a href="{{ path('publikasi_pdf', {id: infografik.id}) }}">
  99.                                     <i class="fas fa-file-pdf mr-1" style="font-size: 13px;"></i>Pdf</a>
  100.                             </div> #}
  101.                             
  102.                         </div>
  103.                     </div>
  104.                 </div>
  105.             </div>
  106.         </div>
  107.     </main>
  108. {% endblock %}