{#
Copyright (C) SPREAD WORKS Inc. All Rights Reserved.
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends 'lower_frame.twig' %}
{% set body_class = 'tabacms_post_page' %}
{# 投稿データの取得 #}
{% set post = TabaCMSPost() %}
{% block javascript %}
{{ TabaCMSAsset('script.js','script')|raw }}
{{ post.getScript|raw }}
{% endblock javascript %}
{% block stylesheet %}
{{ TabaCMSAsset('style.css','style')|raw }}
{% endblock stylesheet %}
{% block main %}
<div class="container-lg">
<div class="row">
<article class="col-12 col-md-9 tabacms_post">
<header class="row tabacms_header">
{% if post.getCategory is not empty %}
<div class="col-12">
<label class="text-nowrap tabacms_category_{{ post.getType.getDataKey }}_{{ post.getCategory.getDataKey }}" {{ post.getCategory.getTagAttributes|raw }}>{{ post.getCategory.getCategoryName }}</label>
</div>
{% endif %}
<div class="col-12 ec-pageHeader"><h1>{{ post.getTitle|raw }}</h1></div>
<time class="col-12 text-end">
{{ post.getPublicDate|date('Y/m/d') }}
</time>
</header>
<section class="row tabacms_body">
{% if post.getThumbnail is not empty %}
<div class="col-12 offset-sm-1 col-sm-10 mb-2">
<img src="{{ asset(post.getThumbnail,'save_image') }}" class="w-100">
</div>
{% endif %}
<div class="col-12">
{{ post.getBody|raw }}
</div>
</section>
</article>
<div class="col-12 col-md-3">
{{ TabaCMSWidget('search')|raw }}
{{ TabaCMSWidget('category')|raw }}
{{ TabaCMSWidget('tag')|raw }}
</div>
</div>
</div>
{% endblock %}