app/template/default/Recipe/Resource/template/default/index.twig line 1

Open in your IDE?
  1. {% extends 'default_frame.twig' %}
  2. {% block stylesheet %}
  3.     <link rel="stylesheet" href="{{ asset('Recipe/assets/default/css/recipe.css' , 'plugin') }}">
  4. {% endblock stylesheet %}
  5. {% block main %}
  6. <section class="p-lower-mv">
  7.   <div class="inner">
  8.     <h2 class="p-lower-mv-title"><span>レシピ一覧</span></h2>
  9.     <div class="under bread_wrap">
  10.       <ol itemscope itemtype="https://schema.org/BreadcrumbList">
  11.         <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  12.           <a itemprop="item" href="{{ url('homepage') }}">
  13.             <span class="freight-neo-pro" itemprop="name">TOP</span>
  14.           </a>
  15.           <meta itemprop="position" content="1" />
  16.         </li>
  17.         <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  18.           <a itemprop="item" href="{{ url('recipe') }}">
  19.             <span class="freight-neo-pro" itemprop="name">レシピ一覧</span>
  20.           </a>
  21.           <meta itemprop="position" content="2" />
  22.         </li>
  23.       </ol>
  24.     </div>
  25.     <!-- /.bread_wrap -->
  26.   </div>
  27. </section>
  28. {% include "@Recipe/default/recipe_search.twig" with {'search_form': search_form} %}
  29. <section class="recipe">
  30.   <div class="inner">
  31.     <!-- <p class="preparation">ただいま準備中です。</p> -->
  32.     <article class="recipe-article">
  33.       <div class="recipe-article-head">
  34.         <h3 class="recipe-article-title">{{ subtitle }}</h3>
  35.         <div class="recipe-search-result"><span class="number">{{ pagination.totalItemCount }}</span>件</div>
  36.         <div class="recipe-switch">
  37.           {% if filterFlg %}
  38.             <a href="{{ url('recipe') }}" class="is-active">絞り込み解除</a>
  39.           {% endif %}
  40.         </div>
  41.       </div>
  42.       <div class="recipe-article-body">
  43.         <ul class="recipe-list">
  44.           {% for Recipe in pagination %}
  45.           <li class="recipe-item p-recipe-box">
  46.             <a href="{{ url('recipe_detail', {'id': Recipe.id}) }}">
  47.               <div class="recipe-head">
  48.                 {% if Recipe.RecipeBadge is defined and
  49.                       Recipe.RecipeBadge is not null and
  50.                       Recipe.RecipeBadge.name is defined and
  51.                       Recipe.RecipeBadge.name is not null and
  52.                       Recipe.RecipeBadge.filename != '' %}
  53.                   <div class="recipe-badge">
  54.                     <img
  55.                         src="{{ asset(Recipe.RecipeBadge.filename|no_image_product, 'save_image') }}"
  56.                         alt="{{ Recipe.RecipeBadge.name }}">
  57.                   </div>
  58.                 {% endif %}
  59.                 <img
  60.                     src="{{ asset(Recipe.mainListImage|no_image_product, 'save_image') }}"
  61.                     alt="{{ Recipe.name }}">
  62.               </div>
  63.               <div class="recipe-body">
  64.                 <h3 class="recipe-name">{{ Recipe.name }}</h3>
  65.                 {% if Recipe.RelatedProducts|length > 0 %}
  66.                 <p class="recipe-product">使用した商品:{{ Recipe.RelatedProducts[0].ChildProduct.name }}</p>
  67.                 {% endif %}
  68.                 <div class="recipe-wrap">
  69.                   <p class="recipe-time"><span>{{ Recipe.minute }}</span>分</p>
  70.                   <p class="recipe-calorie"><span>{{ Recipe.energy }}</span>kcal</p>
  71.                 </div>
  72.                 <ul class="recipe-tag-list">
  73.                   {% for tag in Recipe.tags %}
  74.                     <li class="recipe-tag-item">♯{{ tag.name }}</li>
  75.                   {% endfor %}
  76.                 </ul>
  77.                 <ul class="material-list">
  78.                   {% for category in Recipe.categorys %}
  79.                     <li class="material-item">{{ category.name }}</li>
  80.                   {% endfor %}
  81.                   {% for material in Recipe.materials %}
  82.                     <li class="material-item">{{ material.name }}</li>
  83.                   {% endfor %}
  84.                 </ul>
  85.               </div>
  86.             </a>
  87.           </li>
  88.           {% endfor %}
  89.         </ul>
  90.       </div>
  91.       <div class="p-pagination">
  92.         {% include "@Recipe/default/pager.twig" with {'pages': pagination.paginationData} %}
  93.       </div>
  94.     </article>
  95.   </div>
  96. </section>
  97. {% endblock %}