{% extends 'siteBase.html.twig' %}
{% block dil %}{{ app.session.get('dil')['kisa'] }}{% endblock %} {# tr or en #}
{% block title %}{{ sayfa.title }}{% endblock %}
{% block keywords %}{{ sayfa.keywords }}{% endblock %}
{% block description %}{{ sayfa.description }}{% endblock %}
{% block title2 %}{{ sayfa.title }}{% endblock %}
{% block description2 %}{{ sayfa.description }}{% endblock %}
{% block image_alt %}{{ sayfa.title }}{% endblock %}
{% block title3 %}{{ sayfa.title }}{% endblock %}
{% block description3 %}{{ sayfa.description }}{% endblock %}
{% block image %}{{ sayfa.dilgrup|site_bannerGetir|raw }}{% endblock %}
{% block image2 %}{{ sayfa.dilgrup|site_bannerGetir|raw }}{% endblock %}
{% block body %}
{% include 'siteBase/breadcrumbs.html.twig' %}
{#
-- Sayfa Verileri : "icerikler" adında bir dizi döndürülüyor. Dizi elemanları : seourl, sayfabaşlığı, anahtarkelimeler, sayfaaçıklaması, adı, metin, resim, link
-- Kategori Verileri : "kategoriler" adında bir dizi döndürülüyor. Dizi elemanları : adi, resim, link
** Eğer kategoriler dizisi boş değilse icerikler boş gelecektir. Eğer boş ise içerikler dönecektir.
** Resimleri çekerken sadece "ornek.jpg|imgOlustur(100,10,'cover')" filtresini kullanmalısın. Bu filtre şu özelliğe sahitir; "ornek.jpg|imgOlustur(yükseklik,radius,'cover/contain')"
----------------------------------------------------
#}
<!-- blog-post-area -->
<section class="blog__post-area section-py-140">
<div class="container">
{% if sayfa.dilgrup==4 %}
<style>
/* Hex grid item */
.hex-item{
position: relative;
display: block;
text-decoration: none;
width: 100%;
margin: 0 auto;
}
/* Outer hex shape */
.hex-thumb{
position: relative;
width: 100%;
aspect-ratio: 1 / 0.92; /* altıgen oranı gibi */
overflow: hidden;
border-radius: 18px; /* köşeleri yumuşatır (clip-path varken çok etkisi yok ama hover'da güzel) */
-webkit-clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0% 50%);
clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0% 50%);
box-shadow: 0 18px 40px rgba(0,0,0,.12);
transform: translateZ(0);
}
/* Image inside hex */
.hex-thumb img{
width: 100%;
height: 100%;
object-fit: cover;
display: block;
transform: scale(1.03);
transition: transform .35s ease;
}
/* soft overlay for readability */
.hex-thumb::after{
content:"";
position:absolute;
inset:0;
pointer-events:none;
}
/* Center white hex label */
.hex-label{
position: absolute;
inset: 0;
display: grid;
place-items: center;
pointer-events: none;
}
.hex-label-inner{
width: 40%;
aspect-ratio: 1 / 0.92;
background: rgba(255,255,255,.96);
-webkit-clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0% 50%);
clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0% 50%);
display: grid;
place-items: center;
box-shadow: 0 12px 26px rgba(0,0,0,.10);
padding: 14px;
}
.hex-title{
margin: 0;
text-align: center;
font-weight: 700;
font-size: 16px;
line-height: 1.15;
color: #a57437;
padding: 0 6px;
}
/* Hover */
.hex-item:hover .hex-thumb img{
transform: scale(1.12);
}
.hex-item:hover .hex-thumb{
box-shadow: 0 24px 60px rgba(0,0,0,.18);
}
/* Tight responsive spacing */
.hex-col{
display:flex;
justify-content:center;
}
</style>
<div class="row gutter-y-30 justify-content-center">
{% for k in icerikler %}
<div class="col-lg-4 col-md-4 col-sm-6 hex-col">
<a class="hex-item" href="{{ k.link|default('#') }}">
<div class="hex-thumb">
{# Resmi yine senin kuralına uygun çekiyorum: sadece imgOlustur #}
{% if k.resim is defined and k.resim is not empty %}
{{ k.resim|imgOlustur(420,18,'cover')|raw }}
{% endif %}
<div class="hex-label">
<div class="hex-label-inner">
<h3 class="hex-title">
{{ k.adi|html_entity_decode|raw }}
</h3>
</div>
</div>
</div>
</a>
</div>
{% endfor %}
</div>
{% else %}
<div class="row gutter-y-30 justify-content-center">
{% for k in icerikler %}
<div class="col-lg-4 col-md-6">
<div class="blog__post-item shine__animate-item">
{% if k.resim is defined and k.resim is not empty %}
<div class="blog__post-thumb blog__post-thumb-two">
<a href="{{ k.link|default('#') }}" class="shine__animate-link">
{{ k.resim|imgOlustur(300,10,'cover')|raw }}
</a>
</div>
{% endif %}
<div class="blog__post-content blog__post-content-two blog__post-content-four">
<h2 class="post-title">
<a href="{{ k.link|default('#') }}">{{ k.adi|html_entity_decode|raw }}</a>
</h2>
<p>{{ k.metin|html_entity_decode|striptags|slice(0,100)|raw }}...</p>
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
</div>
</section>
{% endblock %}
{% block javascripts %}{% endblock %}