templates/modul/hizmetler.html.twig line 1

Open in your IDE?
  1. {% extends 'siteBase.html.twig' %}
  2. {% block dil %}{{ app.session.get('dil')['kisa'] }}{% endblock %} {# tr or en #}
  3. {% block title %}{{ sayfa.title }}{% endblock %}
  4. {% block keywords %}{{ sayfa.keywords }}{% endblock %}
  5. {% block description %}{{ sayfa.description }}{% endblock %}
  6. {% block title2 %}{{ sayfa.title }}{% endblock %}
  7. {% block description2 %}{{ sayfa.description }}{% endblock %}
  8. {% block image_alt %}{{ sayfa.title }}{% endblock %}
  9. {% block title3 %}{{ sayfa.title }}{% endblock %}
  10. {% block description3 %}{{ sayfa.description }}{% endblock %}
  11. {% block image %}{{ sayfa.dilgrup|site_bannerGetir|raw }}{% endblock %}
  12. {% block image2 %}{{ sayfa.dilgrup|site_bannerGetir|raw }}{% endblock %}
  13.  
  14.  
  15. {% block body %}
  16. {% include 'siteBase/breadcrumbs.html.twig' %}
  17.  
  18.   {#
  19. -- Sayfa Verileri : "icerikler" adında bir dizi döndürülüyor. Dizi elemanları : seourl, sayfabaşlığı, anahtarkelimeler, sayfaaçıklaması, adı, metin, resim, link
  20. -- Kategori Verileri : "kategoriler" adında bir dizi döndürülüyor. Dizi elemanları : adi, resim, link
  21. ** Eğer kategoriler dizisi boş değilse icerikler boş gelecektir. Eğer boş ise içerikler dönecektir.
  22. ** 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')"
  23. ----------------------------------------------------
  24. #}
  25. <!-- blog-post-area -->
  26. <section class="blog__post-area section-py-140">
  27.     <div class="container">
  28.         {% if sayfa.dilgrup==4 %}
  29.         <style>
  30.             /* Hex grid item */
  31.             .hex-item{
  32.                 position: relative;
  33.                 display: block;
  34.                 text-decoration: none;
  35.                 width: 100%;
  36.                 margin: 0 auto;
  37.             }
  38.             /* Outer hex shape */
  39.             .hex-thumb{
  40.                 position: relative;
  41.                 width: 100%;
  42.                 aspect-ratio: 1 / 0.92; /* altıgen oranı gibi */
  43.                 overflow: hidden;
  44.                 border-radius: 18px; /* köşeleri yumuşatır (clip-path varken çok etkisi yok ama hover'da güzel) */
  45.                 -webkit-clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0% 50%);
  46.                 clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0% 50%);
  47.                 box-shadow: 0 18px 40px rgba(0,0,0,.12);
  48.                 transform: translateZ(0);
  49.             }
  50.             /* Image inside hex */
  51.             .hex-thumb img{
  52.                 width: 100%;
  53.                 height: 100%;
  54.                 object-fit: cover;
  55.                 display: block;
  56.                 transform: scale(1.03);
  57.                 transition: transform .35s ease;
  58.             }
  59.             /* soft overlay for readability */
  60.             .hex-thumb::after{
  61.                 content:"";
  62.                 position:absolute;
  63.                 inset:0;
  64.                 pointer-events:none;
  65.             }
  66.             /* Center white hex label */
  67.             .hex-label{
  68.                 position: absolute;
  69.                 inset: 0;
  70.                 display: grid;
  71.                 place-items: center;
  72.                 pointer-events: none;
  73.             }
  74.             .hex-label-inner{
  75.                 width: 40%;
  76.                 aspect-ratio: 1 / 0.92;
  77.                 background: rgba(255,255,255,.96);
  78.                 -webkit-clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0% 50%);
  79.                 clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0% 50%);
  80.                 display: grid;
  81.                 place-items: center;
  82.                 box-shadow: 0 12px 26px rgba(0,0,0,.10);
  83.                 padding: 14px;
  84.             }
  85.             .hex-title{
  86.                 margin: 0;
  87.                 text-align: center;
  88.                 font-weight: 700;
  89.                 font-size: 16px;
  90.                 line-height: 1.15;
  91.                 color: #a57437;
  92.                 padding: 0 6px;
  93.             }
  94.             /* Hover */
  95.             .hex-item:hover .hex-thumb img{
  96.                 transform: scale(1.12);
  97.             }
  98.             .hex-item:hover .hex-thumb{
  99.                 box-shadow: 0 24px 60px rgba(0,0,0,.18);
  100.             }
  101.             /* Tight responsive spacing */
  102.             .hex-col{
  103.                 display:flex;
  104.                 justify-content:center;
  105.             }
  106.         </style>
  107.         <div class="row gutter-y-30 justify-content-center">
  108.             {% for k in icerikler %}
  109.                 <div class="col-lg-4 col-md-4 col-sm-6 hex-col">
  110.                     <a class="hex-item" href="{{ k.link|default('#') }}">
  111.                         <div class="hex-thumb">
  112.                             {# Resmi yine senin kuralına uygun çekiyorum: sadece imgOlustur #}
  113.                             {% if k.resim is defined and k.resim is not empty %}
  114.                                 {{ k.resim|imgOlustur(420,18,'cover')|raw }}
  115.                             {% endif %}
  116.                             <div class="hex-label">
  117.                                 <div class="hex-label-inner">
  118.                                     <h3 class="hex-title">
  119.                                         {{ k.adi|html_entity_decode|raw }}
  120.                                     </h3>
  121.                                 </div>
  122.                             </div>
  123.                         </div>
  124.                     </a>
  125.                 </div>
  126.             {% endfor %}
  127.         </div>
  128.         {% else %}
  129.         <div class="row gutter-y-30 justify-content-center">
  130.             {% for k in icerikler %}
  131.             <div class="col-lg-4 col-md-6">
  132.                 <div class="blog__post-item shine__animate-item">
  133.                     {% if k.resim is defined and k.resim is not empty %}
  134.                     <div class="blog__post-thumb blog__post-thumb-two">
  135.                         <a href="{{ k.link|default('#') }}" class="shine__animate-link">
  136.                             {{ k.resim|imgOlustur(300,10,'cover')|raw }}
  137.                         </a>
  138.                     </div>
  139.                     {% endif %}
  140.                     <div class="blog__post-content blog__post-content-two blog__post-content-four">
  141.                         <h2 class="post-title">
  142.                             <a href="{{ k.link|default('#') }}">{{ k.adi|html_entity_decode|raw }}</a>
  143.                         </h2>
  144.                         <p>{{ k.metin|html_entity_decode|striptags|slice(0,100)|raw }}...</p>
  145.                     </div>
  146.                 </div>
  147.             </div>
  148.             {% endfor %}
  149.         </div>
  150.         {% endif %}
  151.     </div>
  152. </section>
  153.                     
  154.                     {% endblock %}
  155. {% block javascripts %}{% endblock %}