source: extensions/stripped_black_bloc/template/thumbnails.tpl @ 32023

Last change on this file since 32023 was 23569, checked in by flop25, 11 years ago

adding a new option for the mouseover effect

File size: 4.1 KB
RevLine 
[13920]1{combine_script id='jquery.ajaxmanager' path='themes/default/js/plugins/jquery.ajaxmanager.js' load='footer'}
2{combine_script id='ajaxloader' path='themes/stripped_black_bloc/js/ajaxloader.js' require='jquery.ajaxmanager' load='footer'}
[13894]3{define_derivative name='derivative_stripped_black_bloc' width=$stripped_black_bloc.thumbnail_width height=9999 crop=false}
4{define_derivative name='derivative_stripped_black_bloc_big' width=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width height=9999 crop=false}
[17828]5{define_derivative name='derivative_stripped_black_bloc_wide' width=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width+$stripped_black_bloc.column_width height=9999 crop=false}
6{define_derivative name='derivative_stripped_black_bloc_vert' width=$stripped_black_bloc.thumbnail_width height=$stripped_black_bloc.thumbnail_width crop=false}
7{define_derivative name='derivative_stripped_black_bloc_big_vert' width=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width height=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width crop=false}
[10851]8{if !empty($thumbnails)}
9  {foreach from=$thumbnails item=thumbnail}
[17844]10    {assign var=triplehigh value=$thumbnail.height+$thumbnail.height+$thumbnail.height}
11    {if ($thumbnail.width > $triplehigh) and ($thumbnail.width>$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width+$stripped_black_bloc.column_width)}
12      {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_wide, $thumbnail.src_image)}
13      {assign var=TN_CLASS value='threecol'}
14    {elseif ($thumbnail.width > $triplehigh) and ($thumbnail.width>$stripped_black_bloc.column_width+$stripped_black_bloc.column_width)}
15      {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $thumbnail.src_image)}
16      {assign var=TN_CLASS value='twocol'}
[17858]17    {elseif (($thumbnail.width < $thumbnail.height) and $stripped_black_bloc.orientation_option=="max_heigth")}
[17843]18      {if $thumbnail.TN_CLASS=="twocol" and $thumbnail.width>$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width}
19        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big_vert, $thumbnail.src_image)}
[17844]20        {assign var=TN_CLASS value='twocol'}
[17843]21      {else}
[17828]22        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_vert, $thumbnail.src_image)}
[17844]23        {assign var=TN_CLASS value='onecol'}
[17828]24      {/if}
[17858]25    {elseif $stripped_black_bloc.orientation_option=="big_landscape"}
26      {if ($thumbnail.TN_CLASS=="twocol" or $thumbnail.width > $thumbnail.height) and ($thumbnail.width>$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width)}
27        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $thumbnail.src_image)}
28        {assign var=TN_CLASS value='twocol'}
29      {else}
30        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $thumbnail.src_image)}
31        {assign var=TN_CLASS value='onecol'}
32      {/if}
[17828]33    {else}
[17843]34      {if $thumbnail.TN_CLASS=="twocol" and $thumbnail.width>$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width}
35        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $thumbnail.src_image)}
[17844]36        {assign var=TN_CLASS value='twocol'}
[17828]37      {else}
[17843]38        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $thumbnail.src_image)}
[17844]39        {assign var=TN_CLASS value='onecol'}
[17828]40      {/if}
[17844]41    {/if}
[17828]42     {assign var='size' value=$derivative->get_size()}
[17844]43  <div class="bloc {$TN_CLASS}">
[23569]44    <a title="{$thumbnail.TN_TITLE}" href="{$thumbnail.URL}" style="background: url({if $derivative->is_cached()}{$derivative->get_url()}{else}{$ROOT_URL}{$themeconf.img_dir}/loading.gif{/if}) no-repeat scroll center center transparent; height: {$size[1]}px; width: {$size[0]}px;" {if !$derivative->is_cached()}data-src="{$derivative->get_url()}"{/if}>
[17828]45    {if isset($thumbnail.NAME)}{$thumbnail.NAME}{else}{$thumbnail.TN_TITLE}{/if}
46    </a>
47          {if $SHOW_THUMBNAIL_CAPTION }
[17844]48    <div class="title">{if isset($thumbnail.NAME)}{$thumbnail.NAME}{/if}</div>
49    {/if}
[17828]50  </div>
[10851]51  {/foreach}
52{/if}
Note: See TracBrowser for help on using the repository browser.