source: trunk/themes/default/template/thumbnails.tpl @ 12920

Last change on this file since 12920 was 12920, checked in by rvelices, 12 years ago

feature 2548 multisize - code cleanup + better usage in category_cats + i.php logs memory usage peak

  • Property svn:eol-style set to LF
File size: 1.5 KB
Line 
1{if !empty($thumbnails)}{strip}
2{html_style}
3{*Set some sizes according to maximum thumbnail width and height*}
4.thumbnails SPAN,
5.thumbnails .wrap2 A,
6.thumbnails LABEL{ldelim}
7        width: {$derivative_params->max_width()}px;
8}
9
10.thumbnails .wrap2{ldelim}
11        height: {$derivative_params->max_height()+2}px;
12}
13{if $derivative_params->max_width() > 600}
14.thumbLegend {ldelim}font-size: 130%}
15{else}
16{if $derivative_params->max_width() > 400}
17.thumbLegend {ldelim}font-size: 110%}
18{else}
19.thumbLegend {ldelim}font-size: 90%}
20{/if}
21{/if}
22{/html_style}
23{foreach from=$thumbnails item=thumbnail}
24        <li>
25        <span class="wrap1">
26                <span class="wrap2">
27                <a href="{$thumbnail.URL}">
28                        <img class="thumbnail" src="{$pwg->derivative_url($derivative_params, $thumbnail.src_image)}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}">
29                </a>
30                </span>
31                {if $SHOW_THUMBNAIL_CAPTION }
32                <span class="thumbLegend">
33                {$thumbnail.NAME}
34                {if !empty($thumbnail.icon_ts)}
35                <img title="{$thumbnail.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent.png" alt="(!)">
36                {/if}
37                {if isset($thumbnail.NB_COMMENTS)}
38                <span class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments">
39                <br>
40                {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)}
41                </span>
42                {/if}
43
44                {if isset($thumbnail.NB_HITS)}
45                <span class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits">
46                <br>
47                {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)}
48                </span>
49                {/if}
50                </span>
51                {/if}
52        </span>
53        </li>
54{/foreach}{/strip}
55{/if}
Note: See TracBrowser for help on using the repository browser.