{% extends 'default_frame.twig' %}
{% block stylesheet %}
<link rel="stylesheet" href="{{ asset('Blogs42/assets/css/blogs.css', 'plugin') }}">
{% endblock %}
{% block main %}
<div
class="main-top">{# main-top #}
{# ページタイトル #}
{# 固定ページによる分岐 #}
{% if Blogs.BlogsCategories[0].Category.path[0].name == 'お客様の声' %}
<div id="pagetitle">
<h2>
VOICE
<small>{{ Blogs.title|raw|nl2br }}</small>
</h2>
<div class="image">
<img src="{{ asset('assets/assets/images/pagetitle-image-voice.jpg') }}">
</div>
</div>
{% elseif Blogs.BlogsCategories[0].Category.path[0].name == 'キャンペーン' %}
<div id="pagetitle">
<h2>
CAMPAIGN
<small>{{ Blogs.title|raw|nl2br }}</small>
</h2>
<div class="image">
<img src="{{ asset('assets/assets/images/pagetitle-image-staff.jpg') }}">
</div>
</div>
{% elseif Blogs.BlogsCategories[0].Category.path[0].name == '名入れカレンダー廃版商品リスト' %}
<div id="pagetitle">
<h2>
DISCONTINUED
<small>{{ Blogs.title|raw|nl2br }}</small>
</h2>
<div class="image">
<img src="{{ asset('assets/assets/images/pagetitle-image-contact.jpg') }}">
</div>
</div>
{% else %}
<div id="pagetitle">
<h2>
STAFF BLOG
<small>スタッフブログ</small>
</h2>
<div class="image">
<img src="{{ asset('assets/assets/images/pagetitle-image-news.jpg') }}">
</div>
</div>
{% endif %}
{# 固定ページによる分岐 ここまで #}
</div>{# /main-top #}
<div class="">
<div class="news-detail">
{# 固定ページではブログヘッダー削除 #}
{% if Blogs.BlogsCategories[0].Category.path[0].name != 'お客様の声' and Blogs.BlogsCategories[0].Category.path[0].name != 'キャンペーン' and Blogs.BlogsCategories[0].Category.path[0].name != '名入れカレンダー廃版商品リスト' %}
<div class="news-detail-head">
{# ご利用ガイドじゃない時のみ日付表示 #}
{% if Blogs.BlogsCategories is not empty %}
{% if Blogs.BlogsCategories[0].Category.path[0].name == 'ご利用ガイド'%}
{% else %}
<time>{{ Blogs.publish_date|date_format('', 'Y.m.d') }}</time>
{% endif %}
{% endif %}
{# ご利用ガイドじゃない時のみ日付表示 ここまで #}
<p class="title">{{ Blogs.title|raw|nl2br }}</p>
{% if Blogs.BlogsCategories is not empty %}
<div class="cates">
{% for BlogsCategories in Blogs.BlogsCategories %}
<p class="cate">
{% for Category in BlogsCategories.Category.path %}
{%- if loop.last == true %}
<a href="/blogs/list?blogs_category_id={{ Category.id }}">{{ Category.name }}</a>
{% endif -%}
{% endfor %}
</p>
{% endfor %}
</div>
{% endif %}
</div>
{% endif %}
{# 固定ページではブログヘッダー削除 ここまで #}
{% if Blogs.eyecatch_image is not empty %}
<div class="fullimg">
<img src="{{ asset(Blogs.eyecatch_image|no_image_blogs, 'save_image') }}" alt="{{ Blogs.title }}">
</div>
{% endif %}
<div class="text">
{{ Blogs.blog_description|raw }}
</div>
</div>
{# 固定ページでは一覧ボタン削除 #}
{% if Blogs.BlogsCategories[0].Category.path[0].name != 'お客様の声' and Blogs.BlogsCategories[0].Category.path[0].name != 'キャンペーン' and Blogs.BlogsCategories[0].Category.path[0].name != '名入れカレンダー廃版商品リスト' %}
{# カテゴリー登録されている場合にはカテゴリー一覧へ #}
{% if Blogs.BlogsCategories is not empty %}{# カテゴリー登録の有無 #}
<div class="detail-btn"><a class="" href="/blogs/list?blogs_category_id={{ Blogs.BlogsCategories[0].Category.path[0].id }}">{{'一覧へ戻る'|trans}}</a></div>
{% else %}
<div class="detail-btn"><a class="" href="{{ url('blogs42_list') }}">{{'一覧へ戻る'|trans}}</a></div>
{% endif %}
{# カテゴリー登録されている場合にはカテゴリー一覧へ ここまで #}
{% endif %}
{# 固定ページでは一覧ボタン削除 ここまで #}
</div>
{% endblock %}