{% extends 'frontend/base.html.twig' %}
{% block body %}
<div class="page-bar-hero is-detail" style="margin-top:75px;">
<div class="container d-flex align-items-center">
<div class="position-relative">
<a href="{{ path('homepage') }}" class="btn btn-outline-light btn-sm fw-500 mb-3">
<i class="bi bi-arrow-left-circle"></i>
Beranda
</a>
<div class="title-infografik">Visualisasi</div>
</div>
</div>
</div>
<main>
<div class="pt-4 pb-5">
<div class="container">
<div class="position-relative mb-4" style="top: 10px;">
{# <div class="mb-5">
<div class="border rounded-lg bg-white mx-auto" style="height: 55px; max-width: 550px;">
<form action="{{ path('infografik') }}" method="get" class="h-100">
<div class="input-group h-100">
<input type="text" name="judul" value="{% if search['judul'] %} {{ search['judul'] }} {% endif %}" class="form-control input-search h-100 border-0" placeholder="Masukkan Kata Pencarian">
<button class="btn btn-danger" type="submit">
<i class="fa fa-search"></i>
</button>
</div>
</form>
</div>
</div> #}
<style></style>
<div class="row">
{% for ig in pagination %}
<div class="col-4" style="padding-top: 20px;">
<div class="showcase-item" >
<a class="showcase-item__link" href="{{ path('detail_visualisasi', {id: ig.id}) }}"></a>
<figure class="showcase-item__img m-0">
{% set hasThumbnail = ig.cover ? "uploads/" ~ ig.cover : "frontend/img/poster-placeholder.png" %}
{% set extensi = hasThumbnail|split('.') %}
{% set ext = extensi|last %}
{% if ext == 'pdf' %}
<img src="{{ asset('frontend/img/pdf.png') }}" class="w-100 h-100" style="object-fit: contain;" alt="img-grafis" width="20px"/>
{% else %}
<img src="{{ asset(hasThumbnail) }}" alt=""/>
{% endif %}
</figure>
<div class="showcase-item__content">
<h6 class="text-light">{{ ig.judul }}</h6>
{# <div class="d-flex align-items-center">
<div>
<span class="fs-14 text-light fw-300">
<i class="bi bi-briefcase-fill"></i>
{{ ig.sumber }}
</span>
</div>
<div class="ml-3">
<span class="icon fs-14 text-light fw-300">
<i class="bi bi-eye-fill"></i>
{{ ig.view }}
</span>
</div>
</div> #}
</div>
</div>
</div>
{% endfor %}
</div>
<div
class="d-flex justify-content-center">
{# <a href="{{ path('dataset', { page: pagenya + 1 }) }}" class="btn btn-success">Muat Lebih Banyak</a> #}
{{ knp_pagination_render(pagination, 'frontend/dataset/pager.html.twig') }}
</div>
</div>
</div>
</div>
</main>
{# <main>
<div class="pt-4 pb-5">
<div class="container">
<div class="position-relative mb-4" style="top: 10px;">
<div class='tableauPlaceholder' id='viz1677652123262' style='position: relative'><noscript><a href='#'><img alt='pdrb kab kediri ' src='https://public.tableau.com/static/images/WX/WX8D8QPGW/1_rss.png' style='border: none' /></a></noscript>
<object class='tableauViz' style='display:none;'><param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' />
<param name='embed_code_version' value='3' /> <param name='path' value='shared/WX8D8QPGW' />
<param name='toolbar' value='yes' /><param name='static_image' value='https://public.tableau.com/static/images/WX/WX8D8QPGW/1.png' />
<param name='animate_transition' value='yes' /><param name='display_static_image' value='yes' />
<param name='display_spinner' value='yes' /><param name='display_overlay' value='yes' />
<param name='display_count' value='yes' /><param name='language' value='en-US' />
</object>
</div>
</div>
</div>
</div>
</main> #}
<script type='text/javascript'>
var divElement = document.getElementById('viz1677652123262');
var vizElement = divElement.getElementsByTagName('object')[0];
vizElement.style.width='1169px';vizElement.style.height='4127px';
var scriptElement = document.createElement('script');
scriptElement.src = 'https://public.tableau.com/javascripts/api/viz_v1.js';
vizElement.parentNode.insertBefore(scriptElement, vizElement);
</script>
{% endblock %}