{extends "page.tpl"}

{block "content"}
   <div class="html-page html-page-competition">
      {$pageBlocks = $body.page.blocks}

      {$pageBlocks[0].content nofilter}

      <div id="years">
         {foreach $pageBlocks as $block}
            {if $block@first or !$block.name}{continue}{/if}
            <a href="#{$block@index}">{$block.name}</a>
         {/foreach}
      </div>

      <div id="awards">
         {foreach $pageBlocks as $block}
            {if $block@first or !$block.name}{continue}{/if}
            <div class="year" id="{$block@index}">
               <div class="yearDate">{$block.name}</div>
               <div>
                  {$block.content nofilter}
               </div>
            </div>
         {/foreach}
      </div>

      {get_photos assign="photos" type="pages" id=$body.page.id}
      {if $photos|count}
         <div class="row">
            {foreach $photos as $key => $photo}
               <div class="col-md-3">
                  <a href="{get_photo photo=$photo.img size=0}" class="thumbnail" rel="gallery">
                     <img src="{get_photo photo=$photo.img size=4}" alt="{$photo.img.descr}" class="img-responsive">
                  </a>
               </div>
            {/foreach}
         </div>
      {/if}
   </div>
{/block}

