app/template/kinkodo/Blogs42/detail.twig line 1

Open in your IDE?
  1. {% extends 'default_frame.twig' %}
  2. {% block stylesheet %}
  3. <link rel="stylesheet" href="{{ asset('Blogs42/assets/css/blogs.css', 'plugin') }}">
  4. {% endblock %}
  5. {% block main %}
  6. <div
  7.         class="main-top">{# main-top #}
  8.         {# ページタイトル #}
  9. {# 固定ページによる分岐 #}
  10. {% if Blogs.BlogsCategories[0].Category.path[0].name == 'お客様の声' %}
  11. <div id="pagetitle">
  12.             <h2>
  13.                 VOICE
  14.                 <small>{{ Blogs.title|raw|nl2br }}</small>
  15.             </h2>
  16.             <div class="image">
  17.                 <img src="{{ asset('assets/assets/images/pagetitle-image-voice.jpg') }}">
  18.             </div>
  19.         </div>
  20. {% elseif Blogs.BlogsCategories[0].Category.path[0].name == 'キャンペーン' %}
  21. <div id="pagetitle">
  22.             <h2>
  23.                 CAMPAIGN
  24.                 <small>{{ Blogs.title|raw|nl2br }}</small>
  25.             </h2>
  26.             <div class="image">
  27.                 <img src="{{ asset('assets/assets/images/pagetitle-image-staff.jpg') }}">
  28.             </div>
  29.         </div>
  30.         {% elseif Blogs.BlogsCategories[0].Category.path[0].name == '名入れカレンダー廃版商品リスト' %}
  31. <div id="pagetitle">
  32.             <h2>
  33.                 DISCONTINUED
  34.                 <small>{{ Blogs.title|raw|nl2br }}</small>
  35.             </h2>
  36.             <div class="image">
  37.                 <img src="{{ asset('assets/assets/images/pagetitle-image-contact.jpg') }}">
  38.             </div>
  39.         </div>
  40. {% else %}
  41.         <div id="pagetitle">
  42.             <h2>
  43.                 STAFF BLOG
  44.                 <small>スタッフブログ</small>
  45.             </h2>
  46.             <div class="image">
  47.                 <img src="{{ asset('assets/assets/images/pagetitle-image-news.jpg') }}">
  48.             </div>
  49.         </div>
  50. {% endif %}
  51. {# 固定ページによる分岐 ここまで #}
  52.         
  53.     </div>{# /main-top #}
  54.     
  55. <div class="">
  56. <div class="news-detail">
  57. {# 固定ページではブログヘッダー削除 #}
  58. {% if Blogs.BlogsCategories[0].Category.path[0].name != 'お客様の声' and Blogs.BlogsCategories[0].Category.path[0].name != 'キャンペーン' and Blogs.BlogsCategories[0].Category.path[0].name != '名入れカレンダー廃版商品リスト' %}
  59. <div class="news-detail-head">
  60. {# ご利用ガイドじゃない時のみ日付表示 #}
  61. {% if Blogs.BlogsCategories is not empty %}
  62. {% if Blogs.BlogsCategories[0].Category.path[0].name == 'ご利用ガイド'%}
  63. {% else %}
  64. <time>{{ Blogs.publish_date|date_format('', 'Y.m.d') }}</time>
  65. {% endif %}
  66. {% endif %}
  67. {# ご利用ガイドじゃない時のみ日付表示 ここまで #}
  68.                         <p class="title">{{ Blogs.title|raw|nl2br }}</p>
  69.                            {% if Blogs.BlogsCategories is not empty %}
  70.                         <div class="cates">
  71.                             {% for BlogsCategories in Blogs.BlogsCategories %}
  72.                                 <p class="cate">
  73.                                         {% for Category in BlogsCategories.Category.path %}
  74.                                             {%- if loop.last == true %}
  75.                                             <a href="/blogs/list?blogs_category_id={{ Category.id }}">{{ Category.name }}</a>
  76.                                             {% endif -%}
  77.                                         {% endfor %}
  78.                                     </p>
  79.                             {% endfor %}
  80.                     </div>
  81.                     {% endif %}
  82.     </div>
  83. {% endif %}
  84. {# 固定ページではブログヘッダー削除 ここまで #}
  85.                         {% if Blogs.eyecatch_image is not empty %}
  86.                         <div class="fullimg">
  87.                             <img src="{{ asset(Blogs.eyecatch_image|no_image_blogs, 'save_image') }}" alt="{{ Blogs.title }}">
  88.                         </div>
  89.                         {% endif %}
  90.                         <div class="text">
  91.                             {{ Blogs.blog_description|raw }}
  92.                         </div>
  93.                     </div>
  94.   
  95. {# 固定ページでは一覧ボタン削除 #}
  96. {% if Blogs.BlogsCategories[0].Category.path[0].name != 'お客様の声' and Blogs.BlogsCategories[0].Category.path[0].name != 'キャンペーン' and Blogs.BlogsCategories[0].Category.path[0].name != '名入れカレンダー廃版商品リスト' %}  
  97.    
  98. {# カテゴリー登録されている場合にはカテゴリー一覧へ #}
  99. {% if Blogs.BlogsCategories is not empty %}{# カテゴリー登録の有無 #}
  100. <div class="detail-btn"><a class="" href="/blogs/list?blogs_category_id={{ Blogs.BlogsCategories[0].Category.path[0].id }}">{{'一覧へ戻る'|trans}}</a></div>    
  101. {% else %}
  102. <div class="detail-btn"><a class="" href="{{ url('blogs42_list') }}">{{'一覧へ戻る'|trans}}</a></div>
  103. {% endif %}
  104. {# カテゴリー登録されている場合にはカテゴリー一覧へ ここまで #}
  105. {% endif %}
  106. {# 固定ページでは一覧ボタン削除 ここまで #}
  107.     
  108. </div>
  109. {% endblock %}