Ignore:
Timestamp:
Sep 9, 2012, 4:36:02 PM (8 years ago)
Author:
flop25
Message:

adding a new option : restrict heigth by using the 'thumbnail width' parameter
auto managment of pano photos : set pano on three columns
Thx to JJF and his work on White S&C
ToDo : medium pano on 2 columns

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/stripped_black_bloc/template/mainpage_categories.tpl

    r13894 r17828  
    11{define_derivative name='derivative_stripped_black_bloc' width=$stripped_black_bloc.thumbnail_width height=9999 crop=false}
    22{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
    37{foreach from=$category_thumbnails item=cat}
    4   {if $cat.TN_CLASS=="bloc_big" and $stripped_black_bloc.catthumb=="same"}
    5     {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $cat.representative.src_image)}
    6   {elseif $stripped_black_bloc.catthumb=="all"}
    7     {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $cat.representative.src_image)}
     8{assign var=triplehigh value= $cat.representative.height+$cat.representative.height+$cat.representative.height}
     9  {if $cat.representative.width gt $triplehigh}
     10    {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_wide, $cat.representative.src_image)}
     11    {assign var='size' value=$derivative->get_size()}
     12        <div class="bloc_big album">
     13                        <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;" >
     14                                {$cat.NAME}
     15                        </a>
     16                                <div class="title">{$cat.NAME}</div>
     17        </div>
    818  {else}
    9     {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $cat.representative.src_image)}
    10   {/if}
    11   {assign var='size' value=$derivative->get_size()}
     19    {if $cat.representative.width < $cat.representative.height and $stripped_black_bloc.catthumb=="yes"}
     20      {if $cat.TN_CLASS=="bloc_big" and $stripped_black_bloc.catthumb=="same"}
     21        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big_vert, $cat.representative.src_image)}
     22      {elseif $stripped_black_bloc.catthumb=="all"}
     23        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big_vert, $cat.representative.src_image)}
     24      {else}
     25        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_vert, $cat.representative.src_image)}
     26      {/if}
     27    {else}
     28      {if $cat.TN_CLASS=="bloc_big" and $stripped_black_bloc.catthumb=="same"}
     29        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $cat.representative.src_image)}
     30      {elseif $stripped_black_bloc.catthumb=="all"}
     31        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc_big, $cat.representative.src_image)}
     32      {else}
     33        {assign var=derivative value=$pwg->derivative($derivative_stripped_black_bloc, $cat.representative.src_image)}
     34        {/if}
     35    {/if}
     36    {assign var='size' value=$derivative->get_size()}
    1237        <div class="{if $stripped_black_bloc.catthumb=="all"}bloc_big{else}{$cat.TN_CLASS}{/if} album">
    1338                        <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;" >
     
    1641                                <div class="title">{$cat.NAME}</div>
    1742        </div>
     43  {/if}
    1844  {/foreach}
Note: See TracChangeset for help on using the changeset viewer.