{include file="$template_path/html/header.html"}
</head>
<body class="">
<section class="vbox">
  {include file="$template_path/html/pagenav.html"}
  <section>
    <section class="hbox stretch">
      {include file="$template_path/html/mobile-nav.html"}
      <section id="content" class="p-t-llg-xs">

        <section class="clearfix">
          <div class="container m-t-lg m-b-lg m-xs-t-none m-xs-b-md">

            <div class="row">


              <div class="col-xs-12 col-md-6">
                <div class="m-b-lg m-xs-b-md h3">
                  <span class="font-thin h3-xs text-black">{$lang.current_featured_item}</span>
                  <span class="badge bg-info lt v-middle font-thin">主推</span>
                </div>


                {if $topItem}
                <div class="row">
                  <div class="col-xs-12">
                    <section class="panel mb-col no-radius no-shadow">
                      <div class="panel-body no-padder">
                        <div class="img-container fx-img-rotate-l">
                          <img class="w-full" src="{$data_server}uploads/items/{$topItem.id}/{$topItem.thumbnail}" alt="{$topItem.name|escape}">
                          <div class="img-options">
                            <div class="img-options-content">
                              <a href="/{$languageURL}items/{$topItem.id}" class="btn btn-info btn-lg m-r-md hidden-xs" data-toggle="tooltip" data-placement="bottom" data-original-title="查看演示">
                                <i class="i i-layer2"></i>
                              </a>
                              <a href="/{$languageURL}items/{$topItem.id}" class="btn btn-danger btn-lg" data-toggle="tooltip" data-placement="bottom" data-original-title="了解详情">
                                <i class="i i-eye"></i>
                              </a>
                            </div>
                          </div>
                        </div>
                        <div class="cate-bg cates-2">
                          <span class="cate-text"><span class="fs-20 fm-sf m-r-sm">{$topItem.sales}</span>{$lang.sales}</span>
                        </div>
                      </div>
                      <div class="panel-footer pos-rlt bg-white-only panel-shadow no-radius">
                        <div class="ss-underline">
                          <a href="#">
                            {foreach from=$topItem.categories item=e}
                            {foreach from=$e item=c name=foo}
                            {if $smarty.foreach.foo.last}{$categories[$c].name}{/if}
                            {/foreach}
                            {/foreach}
                          </a>
                        </div>
                        <div class="clearfix">
                          <div class="datetime m-r-sm pull-left hidden-xs">
                            <span class="date">{$topItem.price}</span>
                            <span class="month">￥</span>
                          </div>
                          <h4 class="m-t-none m-b-none-xs"><a href="/{$languageURL}items/{$topItem.id}" class="height-h4">{$topItem.name|escape}</a></h4>
                        </div>

                        <a href="/{$languageURL}user/{$users[$topItem.user_id].username}" class="panel-thumb hidden-xs" data-toggle="tooltip" data-placement="bottom" data-original-title="{$users[$topItem.user_id].nickname}">
                          {if $users[$topItem.user_id].avatar != ''}
                          <img alt="{$users[$topItem.user_id].nickname}" class="img-circle" src="{$data_server}uploads/users/{$topItem.user_id}/A_{$users[$topItem.user_id].avatar}" />
                          {else}
                          <img alt="{$users[$topItem.user_id].nickname}" class="img-circle" src="{$data_server}home/default/img/default-user.jpg" />
                          {/if}
                        </a>

                      </div>
                    </section>
                  </div>
                </div>
                {else}
                <div class="row">
                  <div class="col-xs-12 text-center">
                    <section class="panel no-radius p-t-lg p-b-lg panel-shadow">
                      <div class="panel-body bg-white-only no-radius">
                        <h3>{$lang.no_items}</h3>
                      </div>
                    </section>
                  </div>
                </div>
                {/if}
              </div>


              <div class="col-xs-12 col-md-6">
                <div class="m-b-lg m-xs-b-md h3">
                  <span class="font-thin h3-xs text-black">推荐作品</span>
                  <span class="badge bg-warning lt v-middle font-thin">过去六个月</span>
                </div>


                {if $items}
                <div class="row">
                  {foreach from=$items item=i name=foo}
                  {assign var='position' value=$position+1}
                  <div class="col-xs-6 col-md-6">
                    <section class="panel mb-col no-radius no-shadow">
                      <div class="panel-body no-padder">
                        <div class="img-container fx-img-rotate-l">
                          <img class="img-responsive" src="{$data_server}uploads/items/{$i.id}/{$i.thumbnail}" alt="{$i.name|escape}">
                          <div class="img-options">
                            <div class="img-options-content">
                              <a href="/{$languageURL}items/{$i.id}" class="btn btn-info btn-lg m-r-md hidden-xs" data-toggle="tooltip" data-placement="bottom" data-original-title="查看演示">
                                <i class="i i-layer2"></i>
                              </a>
                              <a href="/{$languageURL}items/{$i.id}" class="btn btn-danger btn-lg" data-toggle="tooltip" data-placement="bottom" data-original-title="了解详情">
                                <i class="i i-eye"></i>
                              </a>
                            </div>
                          </div>
                        </div>
                        <div class="cate-bg cates-1">
                          <span class="cate-text">{$i.sales}{$lang.sales}</span>
                        </div>
                      </div>
                      <div class="panel-footer pos-rlt bg-white-only panel-shadow no-radius">
                        <div class="ss-underline">
                          <a href="#">
                            {foreach from=$i.categories item=e}
                            {foreach from=$e item=c name=foo}
                            {if $smarty.foreach.foo.last}{$categories[$c].name}{/if}
                            {/foreach}
                            {/foreach}
                          </a>
                        </div>
                        <div class="clearfix">
                          <div class="datetime m-r-sm pull-left hidden-xs">
                            <span class="date">{if $i.free_file == 'true'}0{else}{$i.price}{/if}</span>
                            <span class="month">￥</span>
                          </div>
                          <h4 class="m-t-none m-b-none-xs"><a href="/{$languageURL}items/{$i.id}" class="height-h4">{$i.name|escape}</a></h4>
                        </div>

                        <a href="/{$languageURL}user/{$users[$i.user_id].username}" class="panel-thumb hidden-xs" data-toggle="tooltip" data-placement="bottom" data-original-title="{$users[$i.user_id].nickname}">
                          {if $users[$i.user_id].avatar != ''}
                          <img alt="{$users[$i.user_id].nickname}" class="img-circle" src="{$data_server}uploads/users/{$i.user_id}/A_{$users[$i.user_id].avatar}" />
                          {else}
                          <img alt="{$users[$i.user_id].nickname}" class="img-circle" src="{$data_server}home/default/img/default-user.jpg" />
                          {/if}
                        </a>

                      </div>
                    </section>
                  </div>
                  {/foreach}
                </div>
                {else}
                <div class="row">
                  <div class="col-xs-12 text-center">
                    <section class="panel no-radius p-t-lg p-b-lg panel-shadow">
                      <div class="panel-body bg-white-only no-radius">
                        <h3>{$lang.no_items}</h3>
                      </div>
                    </section>
                  </div>
                </div>
                {/if}
              </div>


            </div>

          </div>
        </section>
        {include file="$template_path/html/footer.html"}

      </section>
    </section>
  </section>
</section>
</body>
</html>