{% extends 'default_frame.twig' %}
{% set breadcrumbs = [{'name': 'SPECIAL', 'route': 'special'}, {'name': post.title }] %}
{% set share_url = app.request.getUri|url_encode() %}
{% set share_title = post.title|raw|nl2br %}
{% if post.special_kv_pc.url is not empty %}
{% set share_media = asset(post.special_kv_pc.url,'save_image') %}
{% else %}
{% set share_media = asset('assets/img/top-page/FV.webp') %}
{% endif %}
{% block stylesheet %}
<link rel="stylesheet" href="/html/template/default/assets/css/content.css">
<link rel="stylesheet" href="/html/template/default/assets/css/frame03.css">
{% endblock %}
{% block javascript %}
<script>
$(function () {
$('#js-button-copy').click(function () {
const url = $(this).data('url');
navigator.clipboard.writeText(url);
});
});
</script>
<script>
$(function(){
$('.slide-img:not(".slide-img-slow")').slick({
autoplay: true,
autoplaySpeed: 3000,
arrows: false,
dots: false,
infinite: true,
speed: 800,
slidesToShow: 1,
variableWidth: true,
centerMode: true,
responsive: [
{
breakpoint: 750,
settings: {
variableWidth: true,
centerMode: true,
}
}
]
});
$('.slide-img-slow').not('.slick-initialized').slick({
autoplay: true,
autoplaySpeed: 0,
arrows: false,
dots: false,
speed: 18000,
infinite: true,
cssEase: 'linear',
slidesToShow: 1,
variableWidth: true,
centerMode: true,
draggable: false,
touchMove: false,
pauseOnFocus: false,
pauseOnHover: false,
});
$('.slide-img-slow').css('opacity',1);
$('.slide-img-slow').find('img').each(function(){
var ctrl = $(this);
console.log(ctrl);
ctrl.attr('src',ctrl.data('src'));
});
});
</script>
{% endblock javascript %}
{% block main %}
<section>
<div class="w-full">
<div class="flex flex-col items-center w-full mb-6">
<img src="{{ post.special_kv_pc.url }}" class="object-cover h-[640px] w-full overflow-hidden md:h-[450px]" alt="サムネイル">
<div class="max-w-[880px] w-full lg:w-[86.6vw] md:mx-6 bg-black bg-opacity-80 text-white px-12 py-14 md:py-8 md:px-6 flex-col flex mt-[-24px] relative">
<time datetime="{{ post.post_date|date('Y-m-d') }}" class="text-end text-[#B0B0B0] text-sm md:text-xs absolute top-[4px] right-[8px] "><span>{{ post.post_date|date('Y.m.d') }}</span></time>
<div class="flex items-center border border-white w-fit mb-3 text-sm sm:text-xs px-3 py-[2px] text-white">
{% for category in post.categories %}
<a href="{{ url('special_posts', { category: category.term_id }) }}"><span class="text-white">{{ category.name }}</span></a>
{% endfor %}
</div>
<h1 class="text-3xl md:text-xl leading-loose tracking-[5px]">{{ post.title }}</h1>
</div>
</div>
<div class="col-span-2 md:col-span-1 md:row-start-2 md:row-end-3">
{{ include('Block/breadcrumb.twig') }}
</div>
</div>
</section>
<section id="page_special_detail" class="bg-essay px-6 pb-[7.5rem] md:pb-20 text-black">
<div class="section-cont text-[10px] tracking-wide leading-4">
{{ post.content|raw|nl2br }}
</div>
</section>
{# <section class="py-20 bg-sub-beige-pale text-center text-black text-sm leading-normal">
<div class="w-[20rem] mx-auto">
<h2 class="text-lg font-medium">関連商品</h2>
<div class="grid mt-6 gap-6">
<hgroup class="font-light font-notoserif">
<h3 class=" text-[2rem] tracking-[0.2em]">warm</h3>
<p class="tracking-wider">ウォーム</p>
</hgroup>
<a href="#" class="grid place-items-center w-64 border border-black rounded-[0.18rem] tracking-wider mx-auto h-11 mt-4 hover">詳しくはこちら</a>
<div class="aspect-square row-start-1 row-end-2">
<img src="{{ asset('assets/img/top/img_item01_01.jpg') }}" class="size-full object-cover">
</div>
</div>
</div>
</section> #}
<section class="px-6 py-[7.5rem] md:py-20">
<div class="">
<h2 class="font-medium leading-normal text-center text-base">記事をシェアする</h2>
<div class="flex justify-center items-center mt-6 gap-6">
<a href="https://social-plugins.line.me/lineit/share?url={{share_url}}%0a{{share_title}}" target="_blank" class="hover">
<img src="{{asset('assets/icon/LINE_LOGO.svg')}}" alt="LINEのロゴ" class="w-[2.1rem]">
</a>
<a href="https://twitter.com/intent/tweet?url={{share_url}}&text={{share_title}}" rel="nofollow noopener" target="_blank" class="hover">
<img src="{{asset('assets/icon/X_LOGO.svg')}}" alt="Xのロゴ" class="w-7">
</a>
<a href="https://www.facebook.com/sharer/sharer.php?u={{share_url}}" rel="nofollow noopener" target="_blank" class="hover">
<img src="{{asset('assets/icon/FB_LOGO.svg')}}" alt="FaceBookのロゴ" class="w-[2.1rem]">
</a>
<a href="http://pinterest.com/pin/create/button/?url={{share_url}}&media={{share_media}}&description={{share_title}}" rel="nofollow" target="_blank" class="hover">
<img src="{{asset('assets/icon/Pinterest_LOGO.svg')}}" alt="Pinterestのロゴ" class="w-[2.1rem]">
</a>
<button id="js-button-copy" data-url="{{app.request.getUri}}" class="relative hover">
<img src="{{asset('assets/icon/share.svg')}}" alt="コピー" class="w-[2.1rem]">
</button>
</div>
<a href="{{ url('special_posts') }}" class="md:w-full w-80 border grid place-items-center h-11 mx-auto mt-20 text-sm rounded-[0.18rem] hover">SPECIAL一覧に戻る</a>
</div>
</section>
{% endblock %}