app/template/default/Block/lm_ranking.twig line 1

Open in your IDE?
  1. <!-- DailyRanking -->
  2. {% set totalDailyRanking = totalDailyRanking() %}
  3. {% if totalDailyRanking %}
  4. <script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
  5. <script>
  6.     (function ($) {
  7.         $(function () {
  8.             /*初期表示*/
  9.             $('#item-ranking .ranking-cont').hide();
  10.             $('#item-ranking .ranking-cont').eq(0).show();
  11.             $('#item-ranking .category-tab .tab').eq(0).addClass('is-active');
  12.             $('#item-ranking .category-tab .tab').each(function () {
  13.                 $(this).on('click', function () {
  14.                     var index = $('#item-ranking .category-tab .tab').index(this);
  15.                     $('#item-ranking .category-tab .tab').removeClass('is-active');
  16.                     $(this).addClass('is-active');
  17.                     $('#item-ranking .ranking-cont').hide();
  18.                     $('#item-ranking .ranking-cont').eq(index).show();
  19.                 });
  20.             });
  21.         });
  22.     })($.noConflict(true));
  23. </script>
  24. <section class="mb60">
  25.     <div class="ranking-container">
  26.         <h2 class="simple-h2 mt40">人気ランキング</h2>
  27.         <ul class="ranking-wrapper mousedragscrollable">
  28.         {% for genre, rankingDataList in totalDailyRanking %}
  29.             <li>
  30.                 <h3>{{ rankingDataList.1.goods_genre_text }}</h3>
  31.                 <div class="ranking-box">
  32.                 {% for ranking_no, rankingData in rankingDataList %}
  33.                     <div class="ranking-box-block">
  34.                         <a href="/item/{{ rankingData.item_id }}.html">
  35.                             <img width="88" height="88" alt=""
  36.                                  class="item-img "
  37.                                  src="{{ rankingData.image_url }}">
  38.                             <div class="ranking-box-block-right">
  39.                                 <p class="rank"><span>{{ ranking_no }}</span>位</p>
  40.                                 <h4 class="item-name">{{ rankingData.goods_name }}</h4>
  41.                                 <p class="price">
  42.                                     {{ ('<span class="get-price-ajax formed plain" data-item-id="' ~ rankingData.goods_id ~ '"></span><span class="yen">円(税込)</span>') | raw }}
  43.                                 </p>
  44.                             </div>
  45.                         </a>
  46.                     </div>
  47.                 {% endfor %}
  48.                 </div>
  49.             </li>
  50.         {% endfor %}
  51.         </ul>
  52.     </div>
  53. </section>
  54. {% endif %}
  55. <!-- /DailyRanking -->