{% set items = data('RecommendClassrooms',{'count': 1}) %}
{% if items|default(null) %}
{% set classroom = items[0] %}
<div class="panel panel-default">
  <div class="panel-heading">
    <a class="more" href="{{ path('classroom_explore') }}" ><i class="es-icon es-icon-morehoriz"></i></a>
    <h3 class="panel-title">推荐班级</h3>
  </div>
  <div class="panel-body recommend-class-list">
    <div class="class-item mb0">
      <div class="class-img-wrap">
        <a class="class-img" href="{{ path('classroom_show', {id:classroom.id}) }}">
          <img src="{{ filepath(classroom.largePicture, 'classroom.png') }}" alt="{{ classroom.title }}" class="img-responsive">
        </a>
        <div class="mask">
          <a href="{{ path('classroom_show', {id:classroom.id}) }}" class="btn btn-warning">查看班级</a>
        </div>
      </div>
      <h3>
        <a class="link-dark" href="{{ path('classroom_show', {id:classroom.id}) }}">{{classroom.title}}</a>
      </h3>
      <div class="metas">共有{{classroom.courseNum}}门课程</div>
    </div>
  </div>
</div>
{% endif %}