{% extends 'default_frame.twig' %}{% set body_class = 'news_list_page' %}{% block stylesheet %} <link rel="stylesheet" href="{{ asset('assets/css/news-list.css') }}">{% endblock %}{% block main %} <!-- breadcrumb section --> <div class="breadcrumb-section"> <div class="container-1360 border-box px-40"> <nav class="breadcrumb"> <a href="{{ url('homepage') }}" class="breadcrumb__item text-black">ホーム</a> <img src="{{ asset('assets/img/default/icons/icon-breadcrumb-arrow.svg') }}" alt=">" class="breadcrumb__separator"> <a href="{{ url('news_list') }}" class="breadcrumb__item text-black">お知らせ</a> </nav> </div> </div> <!-- news-list section --> <div class="container-1200"> <div class="news-list-wrapper"> <!-- News-list Title Section --> <div class="top-header-title-section"> <div class="top-header-icon-text"> <div class="top-header-icon-text"> <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7.08203 12.5H7.08301V17.5H5.41602V13.335H2.91504C2.45495 13.3348 2.08203 12.9611 2.08203 12.501V7.50098C2.08221 7.041 2.45506 6.66814 2.91504 6.66797H7.08203V12.5ZM17.083 8.33203H17.916V11.665H17.083V17.5H15.416V17.499L8.75293 13.335H8.75V6.66797H17.083V8.33203ZM17.083 6.66699H8.75L15.416 2.5H17.083V6.66699Z" fill="#00A854"/> </svg> <span class="top-header-text">お知らせ</span> </div> </div> <h1 class="top-header-title">NEWS</h1> </div> </div> </div> <div class="container-1200 container-1200-desktop"> <div class="news-list-content-section-wrapper"> <!-- news-list content section --> <div> <div class="news-list-content-section"> <!-- News List --> <div id="news-list-id" class="news-list"> {% if pagination|length > 0 %} {% for News in pagination %} <a href="{{ url('news_detail', {id: News.id}) }}" class="news-item"> <div class="news-date container-desktop">{{ News.publishDate|date('Y.m.d') }}</div> <div class="news-title container-desktop text-black"> <span class="text-black">{{ News.title }}</span> </div> <div class="news-wrapper-mobile container-mobile"> <div class="news-date news-date-mobile">{{ News.publishDate|date('Y.m.d') }}</div> <div class="news-title news-title-mobile text-black"> <span class="text-black">{{ News.title }}</span> </div> </div> <div class="news-arrow"> <img src="{{ asset('assets/img/default/icons/icon-arrow-gray.svg') }}" alt="Arrow"> </div> </a> {% endfor %} {% else %} <p class="no-news">お知らせはありません。</p> {% endif %} </div> </div> <!-- Pagination --> {% if pagination.paginationData.pageCount > 1 %} {% set pages = pagination.paginationData %} <div class="pagination-news-list mt-50"> <div class="pagination-product-list" style="margin: 0 auto;"> <!-- Previous Button --> <div class="pagination-btn-group"> {# First page button (double arrow) #} {% if pages.current > 1 %} <a class="pagination-btn pagination-btn--prev" href="{{ path('news_list') }}" aria-label="First"> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M5.74659 8.0006L11.4034 13.6575L13.2891 11.7718L9.51783 8.0006L13.2891 4.22937L11.4034 2.34375L5.74659 8.0006Z" fill="#00A854"/> <rect width="1.91077" height="11.043" transform="matrix(-1 0 0 1 4.89648 2.47656)" fill="#00A854"/> </svg> </a> {% else %} <span class="pagination-btn pagination-btn--prev is-disabled" aria-hidden="true"> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M5.74659 8.0006L11.4034 13.6575L13.2891 11.7718L9.51783 8.0006L13.2891 4.22937L11.4034 2.34375L5.74659 8.0006Z" fill="#00A854"/> <rect width="1.91077" height="11.043" transform="matrix(-1 0 0 1 4.89648 2.47656)" fill="#00A854"/> </svg> </span> {% endif %} {# Previous page button (single arrow) #} {% if pages.previous is defined %} {% set prevUrl = pages.previous == 1 ? path('news_list') : path('news_list_page', {'pageno': pages.previous}) %} <a class="pagination-btn pagination-btn--prev" href="{{ prevUrl }}" aria-label="Previous"> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M3.44581 8.0006L9.10266 13.6575L10.9883 11.7718L7.21705 8.0006L10.9883 4.22937L9.10266 2.34375L3.44581 8.0006Z" fill="#00A854"/> </svg> </a> {% else %} <span class="pagination-btn pagination-btn--prev is-disabled" aria-hidden="true"> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M3.44581 8.0006L9.10266 13.6575L10.9883 11.7718L7.21705 8.0006L10.9883 4.22937L9.10266 2.34375L3.44581 8.0006Z" fill="#00A854"/> </svg> </span> {% endif %} </div> <!-- Page Numbers --> <div class="pagination-numbers container-desktop-flex"> {% for page in pages.pagesInRange %} {% if page == pages.current %} <span class="pagination-number pagination-number--active">{{ page }}</span> {% else %} {% set pageUrl = page == 1 ? path('news_list') : path('news_list_page', {'pageno': page}) %} <a class="pagination-number" href="{{ pageUrl }}">{{ page }}</a> {% endif %} {% endfor %} </div> <div class="pagination-page-number container-mobile"> {{ pages.current }}/{{ pages.pageCount }} </div> <!-- Next Button --> <div class="pagination-btn-group"> {# Next page button (single arrow) #} {% if pages.next is defined %} <a class="pagination-btn pagination-btn--next" href="{{ path('news_list_page', {'pageno': pages.next}) }}" aria-label="Next"> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12.5542 8.0006L6.89734 13.6575L5.01172 11.7718L8.78295 8.0006L5.01172 4.22937L6.89734 2.34375L12.5542 8.0006Z" fill="#00A854"/> </svg> </a> {% else %} <span class="pagination-btn pagination-btn--next is-disabled" aria-hidden="true"> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12.5542 8.0006L6.89734 13.6575L5.01172 11.7718L8.78295 8.0006L5.01172 4.22937L6.89734 2.34375L12.5542 8.0006Z" fill="#00A854"/> </svg> </span> {% endif %} {# Last page button (double arrow) #} {% if pages.current < pages.pageCount %} <a class="pagination-btn pagination-btn--next" href="{{ path('news_list_page', {'pageno': pages.pageCount}) }}" aria-label="Last"> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M10.2534 8.0006L4.59656 13.6575L2.71094 11.7718L6.48217 8.0006L2.71094 4.22937L4.59656 2.34375L10.2534 8.0006Z" fill="#00A854"/> <rect x="11.1035" y="2.47656" width="1.91077" height="11.043" fill="#00A854"/> </svg> </a> {% else %} <span class="pagination-btn pagination-btn--next is-disabled" aria-hidden="true"> <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M10.2534 8.0006L4.59656 13.6575L2.71094 11.7718L6.48217 8.0006L2.71094 4.22937L4.59656 2.34375L10.2534 8.0006Z" fill="#00A854"/> <rect x="11.1035" y="2.47656" width="1.91077" height="11.043" fill="#00A854"/> </svg> </span> {% endif %} </div> </div> </div> {% endif %} </div> </div> </div>{% endblock %}