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

Last change on this file since 17883 was 17883, checked in by flop25, 12 years ago

Fr mistake
fix bug for album always big

File size: 3.9 KB
RevLine 
[13894]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}
[17828]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
[13894]7{foreach from=$category_thumbnails item=cat}
[17828]8{assign var=triplehigh value= $cat.representative.height+$cat.representative.height+$cat.representative.height}
[17845]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)}
[17828]10    {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_wide, $cat.representative.src_image)}
[17845]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"}
[17858]15  {elseif $stripped_black_bloc.catthumb=="all"}
[17883]16    {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $cat.representative.src_image)}
[17858]17    {assign var=TN_CLASS value="twocol"}
18  {elseif $cat.representative.width < $cat.representative.height and $stripped_black_bloc.orientation_option=="max_heigth"}
[17843]19      {if $cat.TN_CLASS=="twocol" and $stripped_black_bloc.catthumb=="same"}
[17828]20        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big_vert, $cat.representative.src_image)}
[17845]21        {assign var=TN_CLASS value="twocol"}
[17828]22      {else}
23        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_vert, $cat.representative.src_image)}
[17845]24        {assign var=TN_CLASS value="onecol"}
[17828]25      {/if}
[17858]26  {elseif $stripped_black_bloc.orientation_option=="big_landscape"}
[17863]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"}
[17858]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}
[17845]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"}
[17828]38    {else}
[17845]39      {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $cat.representative.src_image)}
40      {assign var=TN_CLASS value="onecol"}
[17828]41    {/if}
[17845]42  {/if}
[17828]43    {assign var='size' value=$derivative->get_size()}
[17845]44        <div class="bloc {$TN_CLASS} album">
[13894]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; opacity: 0.75;" >
[11677]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.