app/Plugin/TabaCMS2/Resource/template/default/post_gallery.twig line 1

Open in your IDE?
  1. {#
  2. Copyright (C) SPREAD WORKS Inc. All Rights Reserved.
  3. For the full copyright and license information, please view the LICENSE
  4. file that was distributed with this source code.
  5. #}
  6. {% extends 'default_frame.twig' %}
  7. {% set body_class = 'tabacms_post_page' %}
  8. {# 投稿データの取得 #}
  9. {% set post = TabaCMSPost() %}
  10. {% block javascript %}
  11. {{ TabaCMSAsset('script.js','script')|raw }}
  12. {{ post.getScript|raw }}
  13. {% endblock javascript %}
  14. {% block stylesheet %}
  15. {{ TabaCMSAsset('style.css','style')|raw }}
  16. <style>
  17. .attention{
  18.     background-color: #F5F9FE;
  19.     border-radius: 4px;
  20.     padding: 8px 16px;
  21.     font-size: 12px;
  22. }
  23. .item-info dt{
  24.     font-weight: normal;
  25.     color: #C5A600;
  26.     min-width: 120px;
  27. }
  28. .post-body{
  29.     margin-bottom: 30px;
  30. }
  31. .tag-list{
  32.     list-style: none;
  33.     padding: 0;
  34.     margin: 0;
  35.     display: flex;
  36.     flex-wrap: wrap;
  37.     gap: 10px;
  38. }
  39. .tag-list-item-tag{
  40.     display: block;
  41.     color: #3686E4;
  42.     border: 1px solid;
  43.     border-radius: 3px;
  44.     padding: 2px 10px;
  45.     white-space: nowrap;
  46. }
  47. .post-tags > dl > dt{
  48.     margin-bottom: 10px;
  49. }
  50. /* @media only screen and (min-width: 768px) {
  51.     .ec-grid2 .ec-grid2__cell.item-image{
  52.         width: 320px;
  53.     }
  54.     .ec-grid2 .ec-grid2__cell.item-info{
  55.         width: calc(100% - 320px);
  56.         padding-left: 30px;
  57.     }
  58. } */
  59. </style>
  60. {% endblock stylesheet %}
  61. {% block main %}
  62.     <div class="ec-role">
  63.         <div class="ec-pageHeader">
  64.             <h1>{{ type.getTypeName }}</h1>
  65.         </div>
  66.         <div class="ec-pageBody">
  67.             <div class="item-body">
  68.                 {# <div class="item-image">                    
  69.                     <div class="item-thumbnail">
  70.                         {% if post.getThumbnail is not empty %}
  71.                         <img src="{{ asset(post.getThumbnail,'save_image') }}" class="w-100">
  72.                         {% else %}
  73.                         <img src="/plugin/tabacms2/assets/no_image.jpg" class="w-100">
  74.                         {% endif %}
  75.                     </div>                    
  76.                     <div class="attention mt-2">
  77.                         <p>※お客様の承諾を得て掲載しています。作品・写真の著作権はお客様に帰属します。</p>
  78.                     </div>
  79.                 </div> #}
  80.                 <div class="item-info">
  81.                     <div class="post-body">{{ post.getBody|raw }}</div>
  82.                     {% if post.postTags|length > 0 %}
  83.                     <div class="post-tags">
  84.                         <dl class="tabacms_widget">
  85.                             <dt><svg width="12" height="13" viewBox="0 0 12 13" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 1.57357C12 0.838234 11.402 0.240234 10.6667 0.240234H1.33333C0.598 0.240234 0 0.838234 0 1.57357V10.9069C0 11.6422 0.598 12.2402 1.33333 12.2402H10.6667C11.402 12.2402 12 11.6422 12 10.9069V1.57357ZM1.33333 10.9069V1.57357H10.6667L10.668 10.9069H1.33333Z" fill="#C5A600"/><path d="M2.66675 2.90625H3.99875V4.23958H2.66675V2.90625ZM5.33341 2.90625H9.33341V4.23958H5.33341V2.90625ZM2.66675 5.57292H3.99875V6.90625H2.66675V5.57292ZM5.33341 5.57292H9.33341V6.90625H5.33341V5.57292ZM2.66675 8.23958H3.99875V9.57292H2.66675V8.23958ZM5.33341 8.23958H9.33341V9.57292H5.33341V8.23958Z" fill="#C5A600"/></svg> 
  86.                             商品タグ</dt>
  87.                             <dd>
  88.                                 <ul class="tag-list">
  89.                                 {% for postTag in post.postTags %}{# {{ dump(postTag) }} #}
  90.                                     <li class="tag-list-item"><a href="{{ type.getListURI }}?tag_id={{ postTag.tag.tagId }}" class="tag-list-item-tag tabacms_tagcloud tabacms_tagcloud_{{ postTag.tag.tagCloudLevel }}"> {{ postTag.tag.tagName }}</a></li>
  91.                                 {% endfor %}
  92.                                 </ul>
  93.                             </dd>
  94.                         </dl>
  95.                     </div>
  96.                     {% endif %}
  97.                 </div>
  98.             </div>
  99.         </div>
  100.     </div>
  101. {# <div class="container-lg">
  102.     <div class="row">
  103.         <article class="col-12 col-md-9 tabacms_post">
  104.             <header class="row tabacms_header">
  105.                 {% if post.getCategory is not empty %}
  106.                     <div class="col-12">
  107.                         <label class="text-nowrap tabacms_category_{{ post.getType.getDataKey }}_{{ post.getCategory.getDataKey }}" {{ post.getCategory.getTagAttributes|raw }}>{{ post.getCategory.getCategoryName }}</label>
  108.                     </div>
  109.                 {% endif %}
  110.                 <div class="col-12 ec-pageHeader"><h1>{{ post.getTitle|raw }}</h1></div>
  111.                 <time class="col-12 text-end">
  112.                     {{ post.getPublicDate|date('Y/m/d') }}
  113.                 </time>
  114.             </header>
  115.             <section class="row tabacms_body">
  116.                 {% if post.getThumbnail is not empty %}
  117.                     <div class="col-12 offset-sm-1 col-sm-10 mb-2">
  118.                         <img src="{{ asset(post.getThumbnail,'save_image') }}" class="w-100">
  119.                     </div>
  120.                 {% endif %}
  121.                 <div class="col-12">
  122.                     {{ post.getBody|raw }}
  123.                 </div>
  124.             </section>
  125.         </article>
  126.     </div>
  127. </div> #}
  128. {% endblock %}