templates/index/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block body %}
  3.     <!--首页内容-->
  4.     <div class="indexBigImg viewWidth" style="background-image: url('{{ cdn_url~firstImage.oUrl }}')">
  5.         <h3 class="small">
  6.             <!--            <p> item1.desc </p>-->
  7.             <p>{{ firstImage.oTitle }}</p>
  8.             <!--            <div class="bg"></div>-->
  9.             <i>New arrivals in the Pro Team summer collection.</i>
  10.         </h3>
  11.     </div>
  12.     <div class="indexTitles indexWidth">
  13.         <div class="wrapper">
  14.             <b class="taC">系列产品</b>
  15.         </div>
  16.     </div>
  17.     <div class="shopThe clearfix indexWidth" >
  18.         <div class="titleDiv fl">
  19.             <div class="leftTitle">系列产品</div>
  20.         </div>
  21.         <div class="bannerVertical clearfix fl">
  22.             <ul class="vertical-left fl" id="indexVertical">
  23.                 {% for n in highlights %}
  24.                 <li class="nav-item {% if loop.first %}activeP{% endif %}">
  25.                     <div class="item-wrapper">
  26.                         <p class="title taC">{{ n.oName }}</p>
  27.                         <span class="three"></span>
  28.                     </div>
  29.                 </li>
  30.                 {% endfor %}
  31.             </ul>
  32.             <ul class="vertical-center fl" id="indexVerticalImg">
  33.                 {% for n in highlights %}
  34.                 <li class="transition_img {% if loop.first %}activeImg{% endif %}">
  35.                     <img src="{{ cdn_url~n.oImageUrl }}?imageView2/5/w/800/h/527/q/100" alt="">
  36.                 </li>
  37.                 {% endfor %}
  38.             </ul>
  39.             <div class="vertical-right fr" id="index_vertical_right">
  40.                 {% for key,n in highlights %}
  41.                     {{ include('common/_verticalRight.html.twig',{ key: key, n: n }) }}
  42.                 {% endfor %}
  43.             </div>
  44.         </div>
  45.     </div>
  46.     {#首页商品列表#}
  47.     <div class="viewList clearfix indexWidth" id="commodityTab">
  48.         {#模拟循环次数,正式的需要外部循环一次,并将数据传入,在组件内循环商品资料,用index匹配封装的js#}
  49.         {% for key,val in indexGoods %}
  50.             {{ include('common/_productBanner.html.twig',{ index: key, goods: val }) }}
  51.         {% endfor %}
  52.     </div>
  53. {% endblock %}