source: extensions/stripped_black_bloc/template/mainpage_categories.tpl @ 23569

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

adding a new option for the mouseover effect

File size: 3.9 KB
Line 
1{define_derivative name='derivative_stripped_black_bloc' width=$stripped_black_bloc.thumbnail_width height=9999 crop=false}
2{define_derivative name='derivative_stripped_black_bloc_big' width=$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width height=9999 crop=false}
3{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}
4{define_derivative name='derivative_stripped_black_bloc_vert' width=$stripped_black_bloc.thumbnail_width height=$stripped_black_bloc.thumbnail_width crop=false}
5{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}
6
7{foreach from=$category_thumbnails item=cat}
8{assign var=triplehigh value= $cat.representative.height+$cat.representative.height+$cat.representative.height}
9  {if ($cat.representative.width > $triplehigh) and ($cat.representative.width>$stripped_black_bloc.column_width+$stripped_black_bloc.column_width+$stripped_black_bloc.column_width)}
10    {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_wide, $cat.representative.src_image)}
11    {assign var=TN_CLASS value="twocol"}
12  {elseif ($cat.representative.width > $triplehigh) and ($cat.representative.width>$stripped_black_bloc.column_width+$stripped_black_bloc.column_width)}
13    {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_wide, $cat.representative.src_image)}
14    {assign var=TN_CLASS value="twocol"}
15  {elseif $stripped_black_bloc.catthumb=="all"}
16    {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $cat.representative.src_image)}
17    {assign var=TN_CLASS value="twocol"}
18  {elseif $cat.representative.width < $cat.representative.height and $stripped_black_bloc.orientation_option=="max_heigth"}
19      {if $cat.TN_CLASS=="twocol" and $stripped_black_bloc.catthumb=="same"}
20        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big_vert, $cat.representative.src_image)}
21        {assign var=TN_CLASS value="twocol"}
22      {else}
23        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_vert, $cat.representative.src_image)}
24        {assign var=TN_CLASS value="onecol"}
25      {/if}
26  {elseif $stripped_black_bloc.orientation_option=="big_landscape"}
27    {if (($cat.representative.TN_CLASS=="twocol" and $stripped_black_bloc.catthumb=="same") or $cat.representative.width > $cat.representative.height) and ($cat.representative.width>$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width) and $stripped_black_bloc.catthumb!="none"}
28      {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $cat.representative.src_image)}
29      {assign var=TN_CLASS value='twocol'}
30    {else}
31      {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $cat.representative.src_image)}
32      {assign var=TN_CLASS value='onecol'}
33    {/if}
34  {else}
35    {if $cat.TN_CLASS=="twocol" and $stripped_black_bloc.catthumb=="same"}
36      {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $cat.representative.src_image)}
37      {assign var=TN_CLASS value="twocol"}
38    {else}
39      {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $cat.representative.src_image)}
40      {assign var=TN_CLASS value="onecol"}
41    {/if}
42  {/if}
43    {assign var='size' value=$derivative->get_size()}
44        <div class="bloc {$TN_CLASS} album">
45                        <a href="{$cat.URL}" style="background: url({$derivative->get_url()}) no-repeat scroll center center transparent; height: {$size[1]}px; width: {$size[0]}px;" >
46                                {$cat.NAME}
47                        </a>
48                                <div class="title">{$cat.NAME}</div>
49        </div>
50  {/foreach}
Note: See TracBrowser for help on using the repository browser.