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

Last change on this file since 14166 was 13894, checked in by flop25, 9 years ago

updated for 2.4 :
-deleted timthumb
-deleted config for auto-generation

features added :
-representative thumbs can be big : always, as the "Every x thumb" config or never

bug corrected :
-big thumbs didn't have rounded corners

Translations uk_UA needed for new keys

File size: 1.2 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{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  {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()}
12        <div class="{if $stripped_black_bloc.catthumb=="all"}bloc_big{else}{$cat.TN_CLASS}{/if} 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>
18  {/foreach}
Note: See TracBrowser for help on using the repository browser.