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.     .ec-role {
  142.         display: flex;
  143.         justify-content: flex-start
  144.     }
  145.     .mt-65 {
  146.         margin-top: 65px!important;
  147.     }
  148. }
  149. </style>
  150. {% endblock %}
  151. {% block main %}
  152. <div class="ec-role blog_detail pluginCMBblog">
  153.     <div class="w-100">
  154.         <div class="ec-pageHeader">
  155.             <h1 class="blog_Title">{{ blog.title }}</h1>
  156.         </div>
  157.         <ul class="post_meta ">
  158.             <li class="post_meta_list time"><i class="fas fa-calendar-alt"></i>&nbsp;{{blog.release_date|date('Y-m-d')}}</li>
  159.             <li class="post_meta_list">
  160.                 <dl class="tag_dl">
  161.                     <dt><i class="fas fa-tags"></i></dt>
  162.                     <dd>
  163.                         <ul class="blog_category">
  164.                             {% for category in blog.getBlogCategories %}
  165.                             <li class="{{category.getCategory.class}}">
  166.                                 <a href="{{ url('cm_blog_pro_page_list', {categories: [category.getCategory().getId()]}) }}" class="list_category_link">
  167.                                 {{ category.getCategory.getName|raw }}
  168.                                 </a>
  169.                             </li>
  170.                             {% endfor %}        
  171.                         </ul> 
  172.                     </dd>
  173.                 </dl>
  174.             </li>
  175.         </ul>
  176.         <div class="ec-off1Grid">
  177.             <div class="ec-off1Grid__cell">
  178.                 <div class="cm_blog_main_image">
  179.                 
  180.                     <figure class="figure__main_image"> 
  181.                         {% if blog.getMainListImage %}
  182.                         <img src="{{ asset(blog.getMainListImage|no_image_product, 'save_image') }}" class="main_image_blog"></img>
  183.                         {% else %}
  184.                         <img class='item_blog_image'></img>
  185.                         {% endif %}
  186.                         {% if blog.getFigCaption %}
  187.                         <figcaption>{{ blog.getFigCaption }}</figcaption>
  188.                         {% endif %}
  189.                     </figure>
  190.                 </div>
  191.                     <div class="ec-grid2__cell">
  192.                     <div class="ec-productRole__profile">
  193.                         <div class="ec-productRole__description">{{ blog.body|raw }}
  194.                         </div>
  195.                     </div>
  196.                 </div>
  197.             </div>
  198.         </div>
  199.         {% if tags|length > 0 %}
  200.             <h3 class="tag-header">{{ 'plg.CMBlogPro.blog.tag'|trans }}</h3>
  201.             <ul class="tag-ul">
  202.                 {% for tag in tags %}
  203.                     <li>
  204.                         <a href="{{ url('cm_blog_pro_page_list', {tag: tag|trim }) }}">{{ tag |trim }}</a>
  205.                     </li>
  206.                 {% endfor %}
  207.             </ul>
  208.         {% endif %}
  209.         <h3 class="tag-header">{{ 'plg.CMBlogPro.blog.related_product'|trans }}</h3>
  210.         <div class="ec-shelfRole">
  211.             <ul class="ec-shelfGrid">
  212.                 {% for product in blog.getBlogProduct %}
  213.                     <li class="ec-shelfGrid__item">
  214.                         <a href="{{ url('product_detail', {'id': product.getProduct.id}) }}">
  215.                             <p class="ec-shelfGrid__item-image">
  216.                                 <img src="{{ asset(product.getProduct.main_list_image|no_image_product, 'save_image') }}">
  217.                             </p>
  218.                             <p>{{ product.getProduct.name }}</p>
  219.                             <p class="price02-default">
  220.                                 {% if product.getProduct.hasProductClass %}
  221.                                     {% if product.getProduct.getPrice02Min == product.getProduct.getPrice02Max %}
  222.                                         {{ product.getProduct.getPrice02IncTaxMin|price }}
  223.                                     {% else %}
  224.                                         {{ product.getProduct.getPrice02IncTaxMin|price }} ~ {{ product.getProduct.getPrice02IncTaxMax|price }}
  225.                                     {% endif %}
  226.                                 {% else %}
  227.                                     {{ product.getProduct.getPrice02IncTaxMin|price }}
  228.                                 {% endif %}
  229.                             </p>
  230.                         </a>
  231.                     </li>
  232.                 {% endfor %}
  233.             </ul>
  234.         </div>
  235.     </div>
  236.     <div class="side-bar">
  237.         <div class="mt-65 month-archive">
  238.             <h5 class="tag-header">{{ 'plg.CMBlogPro.blog.month_archive'|trans }}</h5>
  239.             <div class="archive-link-div">
  240.                 {% for key, month in monthArr %}
  241.                     <a href="{{ url('cm_blog_pro_page_list', {date: key}) }}">{{ month }}</a>
  242.                 {% endfor %}
  243.             </div>
  244.         </div>
  245.     </div>
  246. </div>
  247. {% endblock %}