app/template/default/Special/index.twig line 1

Open in your IDE?
  1. {% extends 'default_frame.twig' %}
  2. {% set breadcrumbs = [ {'name': 'SPECIAL'}] %}
  3. {% block main %}
  4.     <section class="px-6 pb-10 pt-[7.5rem] md:pt-20 md:pb-1 text-black">
  5.         <div class="mx-auto w-full max-w-[63rem]">
  6.             <h1 class="flex items-start gap-4 md:gap-2">
  7.                 <span class="block h-[7.5rem] w-0.5 bg-gradient-to-b from-[#ADAAA6] md:h-16 md:w-px"></span>
  8.                 <p class="text-[2rem] font-light leading-normal tracking-widest md:text-xl">
  9.                     SPECIAL</p>
  10.             </h1>
  11.         </div>
  12.     </section>
  13.     {{ include('Block/breadcrumb.twig') }}
  14.     <section class="px-6">
  15.         <div class="mx-auto w-full max-w-[63rem]">
  16.             <ul class="flex flex-wrap gap-2" role="navigation">
  17.                 <li>
  18.                     <a class="grid place-items-center rounded-3xl bg-sub-beige-pale px-4 py-1 text-sm leading-normal tracking-widest text-black hover
  19.                     {% if not category_id %}!bg-sub-beige text-white{% endif %}" href="{{ url('special_posts') }}">
  20.                         ALL
  21.                     </a>
  22.                 </li>
  23.                 {% for category in special_posts.categories %}
  24.                 <li>
  25.                     <a class="grid place-items-center rounded-3xl bg-sub-beige-pale px-4 py-1 text-sm leading-normal tracking-widest text-black hover
  26.                     {% if category_id == category.term_id %}!bg-sub-beige text-white{% endif %}" href="{{ url('special_posts', { category: category.term_id }) }}">
  27.                         {{ category.name }}
  28.                     </a>
  29.                 </li>
  30.                 {% endfor %}
  31.             </ul>
  32.         </div>
  33.     </section>
  34.     <section class="pt-20 md:pt-10 px-6 pb-[7.5rem] md:pb-20 text-black">
  35.         <div class="mx-auto w-full max-w-[46rem]">
  36.             <div class="grid grid-cols-2 gap-x-20 gap-y-28 md:grid-cols-1 md:gap-10">
  37.                 {% for post in special_posts.posts %}
  38.                     <a href="{{ url('special_post', { id: post.id }) }}" class=" border-b border-black pb-4 hover">
  39.                         <article class="grid">
  40.                             <h2 class="mt-4 line-clamp-2 text-base font-medium leading-[1.8] text-black h-[2lh]">
  41.                                 <span class="sr-only">タイトル:</span>
  42.                                 {{ post.title }}</h2>
  43.                             <div class="flex flex-wrap gap-2 row-start-2 row-end-3 mt-4 text-sm leading-normal tracking-wider text-black">
  44.                                 {% for category in post.categories %}
  45.                                 <span>{{ category.name }}</span>
  46.                                 {% endfor %}
  47.                             </div>
  48.                             <time datetime="{{ post.post_date|date('Y-m-d') }}" class="mt-7 text-right text-sm tracking-wider text-black">
  49.                                 <span class="sr-only">投稿日:</span>
  50.                                 {{ post.post_date|date('Y.m.d') }}</time>
  51.                             <div class="row-start-1 row-end-2 aspect-[4/3] "><img alt="{{ post.title }}" loading="lazy" width="327" height="245" decoding="async" data-nimg="1" class="size-full object-cover" style="color:transparent" src="{{ post.special_kv_pc.url }}"></div>
  52.                         </article>
  53.                     </a>
  54.                 {% endfor %}
  55.             </div>
  56.             <div class="ec-pagerRole">
  57.                 {% include "pager.twig" with {'pages': special_posts.paginationData} %}
  58.             </div>
  59.         </div>
  60.     </section>
  61. {% endblock %}