app/template/default/blog/detail.twig line 1

Open in your IDE?
  1. {% extends 'default_frame.twig' %}
  2. {% block javascript %}{% endblock %}
  3. {% block stylesheet %}
  4. <style>
  5. .pluginCMBblog .post_meta {
  6.     display: flex;
  7.     list-style: none;
  8.     margin: 0;
  9.     padding: 0;
  10.     width: 95%;
  11.     margin: 0 auto;
  12. }
  13. .pluginCMBblog .blog_category{
  14.     margin: 0;
  15.     padding: 0;
  16. }
  17. .pluginCMBblog .blog_category{
  18.     display: initial;
  19. }
  20. .pluginCMBblog .blog_category li{
  21.     display: initial;
  22.     border-right: 1px solid #ddd;
  23. }
  24. .pluginCMBblog .blog_category li:last-child {
  25.     border-right: none;
  26. }
  27. .pluginCMBblog .post_meta .post_meta_list{
  28.     padding-right: 2rem;
  29. }
  30. .pluginCMBblog .list_category_link{
  31.     color: #337ab7;
  32.     padding: 0 0.5rem;
  33. }
  34. .pluginCMBblog .figure__main_image {
  35.     padding: 0;
  36.     margin: 3rem 0;
  37.     display: grid;
  38.     justify-content: stretch;
  39.     align-items: flex-end;
  40. }
  41. .pluginCMBblog .main_image_blog,
  42. .pluginCMBblog figcaption {
  43.     padding: 0;
  44.     grid-column: 1/2;
  45.     grid-row: 1/2;
  46. }
  47. .pluginCMBblog figcaption {
  48.     text-align: center;
  49.     padding: 0.4rem 2rem;
  50.     font-size: 1.3rem;
  51.     background-color: rgba(0,0,0,.7);
  52.     color: #fff;
  53.     overflow: hidden;
  54.     white-space: normal;
  55.     word-wrap: break-word;
  56. }
  57. .pluginCMBblog .post_meta_list.time{
  58.     width: 15rem;
  59.     display: inline-table;
  60. }
  61. .pluginCMBblog .tag_dl{
  62.     display: flex;
  63. }
  64. .pluginCMBblog .blog_detail .blog_Title{
  65.     word-break: break-word;
  66.     margin-bottom: 20px;
  67. }
  68. .pluginCMBblog .cm_blog_main_image img{
  69.     max-width: 100%;
  70.     width: 100%;
  71. }
  72. ul.tag-ul {
  73.     padding-left:8px;
  74.     list-style: none;
  75.     display: flex;
  76.     flex-wrap: wrap;
  77. }
  78. ul.tag-ul > li {
  79.     margin: 0.4em;
  80.     padding: 0 0.8em;
  81.     border: 1px solid #ccc;
  82.     border-radius: 5px;
  83. }
  84. ul.tag-ul > li > a:hover {
  85.     text-decoration: none;
  86. }
  87. h3.tag-header {
  88.   padding: 1rem 2rem;
  89.   border-left: 4px solid #000;
  90. }
  91. .w-100 {
  92.     width: 100%
  93. }
  94. .side-bar > div {
  95.     width: 90%;
  96.     margin:40px auto;
  97. }
  98. h5.tag-header {
  99.   padding: 1rem 2rem;
  100.   border-left: 4px solid #000;
  101. }
  102. .month-archive a {
  103.     text-decoration: underline;
  104.     display: block;
  105.     padding: 3px 27px;
  106. }
  107. .ec-productRole__description > p img {
  108.     width: calc(var(--width));
  109.     margin-bottom: 15px;
  110. }
  111. .archive-link-div {
  112.     max-height: 600px;
  113.     overflow-y: scroll;
  114. }
  115. .archive-link-div::-webkit-scrollbar {
  116.     display: none;
  117. }
  118. @media screen and (max-width: 768px){
  119.     .pluginCMBblog .post_meta {
  120.         display: block;
  121.     }
  122.     
  123.     .pluginCMBblog .post_meta_list.time{
  124.         width: 100%;
  125.     }
  126.     .side-bar > div {
  127.         width: 100%
  128.     }
  129. }
  130. @media only screen and (min-width: 768px) {
  131.     .ec-shelfGrid .ec-shelfGrid__item-image {
  132.         height: 150px;
  133.     }
  134.     h3.tag-header {
  135.         margin: 63px 16px 20px;
  136.     }
  137.     .side-bar {
  138.         width: 280px;
  139.         background-color: #f6f6f6;
  140.     }
  141. /*▼RZ 2023.09.11 EDIT ec-roleのスタイルをこのページに限定 ▼*/
  142. /*
  143.     .ec-role {
  144.         display: flex;
  145.         justify-content: flex-start
  146.     }
  147. */
  148.     .blog_box {
  149.         display: flex;
  150.         justify-content: flex-start
  151.     }
  152. /*▲RZ 2023.09.11 EDIT ec-roleのスタイルをこのページに限定 ▲*/
  153.     .mt-65 {
  154.         margin-top: 65px!important;
  155.     }
  156. }
  157. </style>
  158. {% endblock %}
  159. {% block main %}
  160. <div class="ec-role blog_detail pluginCMBblog">
  161.     <div class="blog_box">
  162.         <div class="w-100">
  163.             <div class="ec-pageHeader">
  164.                 <h1 class="blog_Title">{{ blog.title }}</h1>
  165.             </div>
  166.             <ul class="post_meta ">
  167.                 <li class="post_meta_list time"><i class="fas fa-calendar-alt"></i>&nbsp;{{blog.release_date|date('Y-m-d')}}</li>
  168.                 <li class="post_meta_list">
  169.                     <dl class="tag_dl">
  170.                         <dt><i class="fas fa-tags"></i></dt>
  171.                         <dd>
  172.                             <ul class="blog_category">
  173.                                 {% for category in blog.getBlogCategories %}
  174.                                 <li class="{{category.getCategory.class}}">
  175.                                     <a href="{{ url('cm_blog_pro_page_list', {categories: [category.getCategory().getId()]}) }}" class="list_category_link">
  176.                                     {{ category.getCategory.getName|raw }}
  177.                                     </a>
  178.                                 </li>
  179.                                 {% endfor %}        
  180.                             </ul> 
  181.                         </dd>
  182.                     </dl>
  183.                 </li>
  184.             </ul>
  185.             <div class="ec-off1Grid">
  186.                 <div class="ec-off1Grid__cell">
  187.                     <div class="cm_blog_main_image">
  188.                     
  189.                         <figure class="figure__main_image"> 
  190.                             {% if blog.getMainListImage %}
  191.                             <img src="{{ asset(blog.getMainListImage|no_image_product, 'save_image') }}" class="main_image_blog"></img>
  192.                             {% else %}
  193.                             <img class='item_blog_image'></img>
  194.                             {% endif %}
  195.                             {% if blog.getFigCaption %}
  196.                             <figcaption>{{ blog.getFigCaption }}</figcaption>
  197.                             {% endif %}
  198.                         </figure>
  199.                     </div>
  200.                         <div class="ec-grid2__cell">
  201.                         <div class="ec-productRole__profile">
  202.                             <div class="ec-productRole__description">{{ blog.body|raw }}
  203.                             </div>
  204.                         </div>
  205.                     </div>
  206.                 </div>
  207.             </div>
  208.             {% if tags|length > 0 %}
  209.                 <h3 class="tag-header">{{ 'plg.CMBlogPro.blog.tag'|trans }}</h3>
  210.                 <ul class="tag-ul">
  211.                     {% for tag in tags %}
  212.                         <li>
  213.                             <a href="{{ url('cm_blog_pro_page_list', {tag: tag|trim }) }}">{{ tag |trim }}</a>
  214.                         </li>
  215.                     {% endfor %}
  216.                 </ul>
  217.             {% endif %}
  218.             <h3 class="tag-header">{{ 'plg.CMBlogPro.blog.related_product'|trans }}</h3>
  219.             <div class="ec-shelfRole">
  220.                 <ul class="ec-shelfGrid">
  221.                     {% for product in blog.getBlogProduct %}
  222.                         <li class="ec-shelfGrid__item">
  223.                             <a href="{{ url('product_detail', {'id': product.getProduct.id}) }}">
  224.                                 <p class="ec-shelfGrid__item-image">
  225.                                     <img src="{{ asset(product.getProduct.main_list_image|no_image_product, 'save_image') }}">
  226.                                 </p>
  227.                                 <p>{{ product.getProduct.name }}</p>
  228.                                 <p class="price02-default">
  229.                                     {% if product.getProduct.hasProductClass %}
  230.                                         {% if product.getProduct.getPrice02Min == product.getProduct.getPrice02Max %}
  231.                                             {{ product.getProduct.getPrice02IncTaxMin|price }}
  232.                                         {% else %}
  233.                                             {{ product.getProduct.getPrice02IncTaxMin|price }} ~ {{ product.getProduct.getPrice02IncTaxMax|price }}
  234.                                         {% endif %}
  235.                                     {% else %}
  236.                                         {{ product.getProduct.getPrice02IncTaxMin|price }}
  237.                                     {% endif %}
  238.                                 </p>
  239.                             </a>
  240.                         </li>
  241.                     {% endfor %}
  242.                 </ul>
  243.             </div>
  244.         </div>
  245.         <div class="side-bar">
  246.             <div class="mt-65 month-archive">
  247.                 <h5 class="tag-header">{{ 'plg.CMBlogPro.blog.month_archive'|trans }}</h5>
  248.                 <div class="archive-link-div">
  249.                     {% for key, month in monthArr %}
  250.                         <a href="{{ url('cm_blog_pro_page_list', {date: key}) }}">{{ month }}</a>
  251.                     {% endfor %}
  252.                 </div>
  253.             </div>
  254.         </div>
  255.     </div>
  256. </div>
  257. {% endblock %}