{% extends 'default_frame.twig' %}
{% block javascript %}
<script>
$(function () {
const sections = [
'essay',
'document',
'report',
'guide',
'philosophy'
];
sections.forEach(section => {
const posts = $ (`.${section}_post`);
const showMoreButton = $ (`#${section}_show_more`);
let visibleCount = 2;
// 初期表示
posts.slice(0, visibleCount).removeClass('hidden');
showMoreButton.on('click', function () {
visibleCount += 6;
posts.slice(0, visibleCount).removeClass('hidden');
// すべて表示したらボタンを隠す
if (visibleCount >= posts.length) {
showMoreButton.addClass('hidden');
}
});
// 初期状態でボタンを非表示にするか確認
if (visibleCount >= posts.length) {
showMoreButton.addClass('hidden');
}
});
});
</script>
</script>{% endblock %}{% block main %}
<div class="w-full flex flex-col items-center justify-center font-extralight">
<div class="w-full pb-20 md:pb-10 flex flex-col items-center border-b border-[#DFDFDF] mt-3">
<img src="{{asset('assets/img/special/special-top01_pc@2x.webp')}}" alt="" class="w-[max(45.83vw,880px)] mb-20 md:hidden">
<img src="{{asset('assets/img/special/special-top01_sp@2x.webp')}}" alt="" class="w-[325px] h-auto mb-10 hidden md:block">
<h1 class="text-[40px] tracking-[11px] md:text-lg">祈りに親しむ</h1>
</div>
<!-- Essay Section -->
<div class="w-full h-fit bg-special-essay bg-cover object-cover bg-top bg-no-repeat">
<div class="h-fit top-[50%] left-[50%] py-16 md:py-12 m-auto sm:m-0 max-w-[1336px] xxl:px-[10px] w-full flex flex-col items-center">
<img src="{{asset('assets/img/special/essay.png')}}" alt="" class="mb-5 md:mb-2 md:w-[66px] h-auto">
<h2 class="text-[28px] mb-20 md:mb-8 md:text-xl tracking-[5.6px]">エッセイ</h2>
<div class="w-full grid grid-cols-2 md:grid-cols-1 gap-6 md:flex-col">
{% for Post in essay_posts %}
<div class="bg-white shadow-manaka md:w-full essay_post hidden hover">
<a href="{{ path('special_post', {id: Post.ID}) }}">
<img src="{{ Post.special_kv_pc.url }}" alt="{{ Post.special_kv_pc.alt }}" class="w-full bg-center sm:h-[170px] h-[310px] object-cover">
<div class="pt-6 pb-10 px-8 md:px-6 md:pb-9">
<div class="mb-4 flex items-center justify-between">
<div class="w-fit flex py-[2px] px-2 border border-[#B0B0B0] sm:text-[10px]">
<p class="after:content-['|']">
{% if Post.category is not null %}
{{ Post.category.name }}
{% endif %}
</p>
<p class="ml-1">
{% if Post.sub_category is not null %}
{{ Post.sub_category.name }}
{% endif %}
</p>
</div>
<p class="text-sm md:text-xs">{{ Post.post_date|date('Y/m/d') }}</p>
</div>
<h3 class="text-xl mb-5 tracking-[4px] leading-8 md:text-sm">{{ Post.post_title|raw }}</h3>
{% set content = Post.filter_content|striptags %}
<p class="bg-white article-read text-sm md:text-xs tracking-widest leading-loose">{{ content|length > 55 ? content|slice(0,55) ~ '...' : content }}</p>
</div>
</a>
</div>
{% endfor %}
</div>
<button id="essay_show_more" class="mt-16 md:mt-12 hover gap-8 shadow bg-white border-b-[6px] w-[250px] sm:w-[175px] py-10 md:py-4 flex items-center justify-center border-manakaGray">
<p class="text-xl md:text-sm">更に見る</p>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewbox="0 0 24 24" style="color: #7d7d7d;" stroke-width="1.5" stroke="currentColor" class="size-6">
<path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5"/>
</svg>
</button>
</div>
</div>
<!-- Document Section -->
<div class="w-full h-fit bg-special-document bg-cover object-cover bg-top bg-no-repeat">
<div class="h-fit top-[50%] left-[50%] py-16 md:py-12 m-auto sm:m-0 max-w-[1336px] xxl:px-[10px] w-full xl:px-3 flex flex-col items-center">
<img src="{{asset('assets/img/special/document.png')}}" alt="" class="mb-5 w-[42px] h-auto">
<h2 class="text-[28px] mb-20 md:mb-8 md:text-xl tracking-[5.6px]">ドキュメント</h2>
<div class="w-full grid grid-cols-2 md:grid-cols-1 gap-6 md:flex-col">
{% for Post in document_posts %}
<div class="bg-white shadow-manaka md:w-full document_post hidden hover">
<a href="{{ path('special_post', {id: Post.ID}) }}">
<img src="{{ Post.special_kv_pc.url }}" alt="{{ Post.special_kv_pc.alt }}" class="w-full bg-center sm:h-[170px] h-[310px] object-cover">
<div class="pt-6 pb-10 px-8 md:px-6">
<div class="mb-4 flex items-center justify-between">
<div class="w-fit flex py-[2px] px-2 border border-[#B0B0B0] sm:text-[10px]">
<p class="after:content-['|']">
{% if Post.category is not null %}
{{ Post.category.name }}
{% endif %}
</p>
<p class="ml-1">
{% if Post.sub_category is not null %}
{{ Post.sub_category.name }}
{% endif %}
</p>
</div>
<p class="text-sm md:text-xs">{{ Post.post_date|date('Y/m/d') }}</p>
</div>
<h3 class="text-xl mb-5 tracking-[4px] leading-8 md:text-sm">{{ Post.post_title|raw }}</h3>
{% set content = Post.filter_content|striptags %}
<p class="bg-white article-read text-sm md:text-xs tracking-widest leading-loose">{{ content|length > 55 ? content|slice(0,55) ~ '...' : content }}</p>
</div>
</a>
</div>
{% endfor %}
</div>
<button id="document_show_more" class="hover mt-16 md:mt-12 gap-8 shadow bg-white border-b-[6px] w-[250px] sm:w-[175px] py-10 md:py-4 flex items-center justify-center border-manakaGray">
<p class="text-xl md:text-sm">更に見る</p>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewbox="0 0 24 24" style="color: #7d7d7d;" stroke-width="1.5" stroke="currentColor" class="size-6">
<path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5"/>
</svg>
</button>
</div>
</div>
<!-- Report Section -->
<div class="w-full h-fit bg-special-report bg-cover object-cover bg-top bg-no-repeat">
<div class="h-fit top-[50%] left-[50%] py-16 md:py-12 m-auto sm:m-0 max-w-[1336px] xxl:px-[10px] w-full xl:px-3 flex flex-col items-center">
<img src="{{asset('assets/img/special/report.png')}}" alt="" class="mb-5 md:w-[65px] h-auto">
<h2 class="text-[28px] mb-20 md:mb-8 md:text-xl tracking-[5.6px]">レポート</h2>
<div class="w-full grid grid-cols-2 md:grid-cols-1 gap-6 md:flex-col">
{% for Post in report_posts %}
<div class="bg-white shadow-manaka md:w-full report_post hidden hover">
<a href="{{ path('special_post', {id: Post.ID}) }}">
<img src="{{ Post.special_kv_pc.url }}" alt="{{ Post.special_kv_pc.alt }}" class="w-full bg-center sm:h-[170px] h-[310px] object-cover">
<div class="pt-6 pb-10 px-8 md:px-6">
<div class="mb-4 flex items-center justify-between">
<div class="w-fit flex py-[2px] px-2 border border-[#B0B0B0] sm:text-[10px]">
<p>
{% if Post.category is not null %}
{{ Post.category.name }}
{% endif %}
</p>
<p class="{% if Post.sub_category is not null %} before::content-['|'] {% endif %}">
{% if Post.sub_category is not null %}
{{ Post.sub_category.name }}
{% endif %}
</p>
</div>
<p class="text-sm md:text-xs">{{ Post.post_date|date('Y/m/d') }}</p>
</div>
<h3 class="text-xl mb-5 tracking-[4px] leading-8 md:text-sm">{{ Post.post_title|raw }}</h3>
{% set content = Post.filter_content|striptags %}
<p class="bg-white article-read text-sm md:text-xs tracking-widest leading-loose">{{ content|length > 55 ? content|slice(0,55) ~ '...' : content }}</p>
</div>
</a>
</div>
{% endfor %}
</div>
<button id="report_show_more" class="hover mt-16 gap-8 shadow bg-white border-b-[6px] w-[250px] py-10 md:py-4 flex items-center justify-center border-manakaGray">
<p class="text-xl md:text-sm">更に見る</p>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewbox="0 0 24 24" style="color: #7d7d7d;" stroke-width="1.5" stroke="currentColor" class="size-6">
<path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5"/>
</svg>
</button>
</div>
</div>
<!-- Guide Section -->
<div class="w-full h-fit bg-special-guide bg-cover object-cover bg-top bg-no-repeat">
<div class="h-fit top-[50%] left-[50%] py-16 md:py-12 m-auto sm:m-0 max-w-[1336px] w-full xxl:px-[10px] xl:px-3 flex flex-col items-center">
<img src="{{asset('assets/img/special/guid.png')}}" alt="" class="mb-5 w-10 h-auto">
<h2 class="text-[28px] mb-20 md:mb-8 md:text-xl tracking-[5.6px]">ガイド</h2>
<div class="w-full grid grid-cols-2 md:grid-cols-1 gap-6 md:flex-col">
{% for Post in guide_posts %}
<div class="bg-white shadow-manaka md:w-full guide_post hidden hover">
<a href="{{ path('special_post', {id: Post.ID}) }}">
<img src="{{ Post.special_kv_pc.url }}" alt="{{ Post.special_kv_pc.alt }}" class="w-full bg-center sm:h-[170px] h-[310px] object-cover">
<div class="pt-6 pb-10 px-8 md:px-6">
<div class="mb-4 flex items-center justify-between">
<div class="w-fit flex py-[2px] px-2 border border-[#B0B0B0] sm:text-[10px]">
<p>
{% if Post.category is not null %}
{{ Post.category.name }}
{% endif %}
</p>
<p class="{% if Post.sub_category is not null %} before:content-['|'] {% endif %}">
{% if Post.sub_category is not null %}
{{ Post.sub_category.name }}
{% endif %}
</p>
</div>
<p class="text-sm md:text-xs">{{ Post.post_date|date('Y/m/d') }}</p>
</div>
<h3 class="text-xl mb-5 tracking-[4px] leading-8 md:text-sm">{{ Post.post_title|raw }}</h3>
{% set content = Post.filter_content|striptags %}
<p class="bg-white article-read text-sm md:text-xs tracking-widest leading-loose">{{ content|length > 55 ? content|slice(0,55) ~ '...' : content }}</p>
</div>
</a>
</div>
{% endfor %}
</div>
<button id="guide_show_more" class="hover mt-16 md:mt-12 gap-8 shadow bg-white border-b-[6px] w-[250px] sm:w-[175px] py-10 md:py-4 flex items-center justify-center border-manakaGray">
<p class="text-xl md:text-sm">更に見る</p>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewbox="0 0 24 24" style="color: #7d7d7d;" stroke-width="1.5" stroke="currentColor" class="size-6">
<path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5"/>
</svg>
</button>
</div>
</div>
<!-- Philosophy Section -->
<div class="w-full h-fit bg-special-philosophy bg-cover object-cover bg-top bg-no-repeat">
<div class="h-fit top-[50%] left-[50%] py-16 md:py-12 m-auto sm:m-0 max-w-[1336px] xxl:px-[10px] w-full xl:px-3 flex flex-col items-center">
<img src="{{asset('assets/img/special/philosophy.png')}}" alt="" class="mb-5 md:w-14 h-auto">
<h2 class="text-[28px] mb-20 md:mb-8 md:text-xl tracking-[5.6px]">フィロソフィ</h2>
<div class="w-full grid grid-cols-2 md:grid-cols-1 gap-6 md:flex-col">
{% for Post in philosophy_posts %}
<div class="bg-white shadow-manaka md:w-full philosophy_post hidden hover">
<a href="{{ path('special_post', {id: Post.ID}) }}">
<img src="{{ Post.special_kv_pc.url }}" alt="{{ Post.special_kv_pc.alt }}" class="w-full bg-center md:h-[170px] h-[310px] object-cover">
<div class="pt-6 pb-10 px-8 md:px-6">
<div class="mb-4 flex items-center justify-between">
<div class="w-fit flex py-[2px] px-2 border border-[#B0B0B0] sm:text-[10px]">
<p>
{% if Post.category is not null %}
{{ Post.category.name }}
{% endif %}
</p>
<p class="{% if Post.sub_category is not null %} before:content-['|'] {% endif %}">
{% if Post.sub_category is not null %}
{{ Post.sub_category.name }}
{% endif %}
</p>
</div>
<p class="text-sm md:text-xs">{{ Post.post_date|date('Y/m/d') }}</p>
</div>
<h3 class="text-xl mb-5 tracking-[4px] leading-8 md:text-sm">{{ Post.post_title|raw }}</h3>
{% set content = Post.filter_content|striptags %}
<p class="bg-white article-read text-sm md:text-xs tracking-widest leading-loose">{{ content|length > 55 ? content|slice(0,55) ~ '...' : content }}</p>
</div>
</a>
</div>
{% endfor %}
</div>
<button id="philosophy_show_more" class="gap-8 mt-16 md:mt-12 shadow hover bg-white border-b-[6px] w-[250px] sm:w-[175px] py-10 md:py-4 flex items-center justify-center border-manakaGray">
<p class="text-xl md:text-sm">更に見る</p>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewbox="0 0 24 24" style="color: #7d7d7d;" stroke-width="1.5" stroke="currentColor" class="size-6">
<path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5"/>
</svg>
</button>
</div>
</div>
<div class="max-w-[1120px] w-full px-6 md:px-0">
{% set breadcrumbs = [{'name': '特集'}] %}
{% include('Block/breadcrumbs.twig') %}
</div>
</div>{% endblock %}