source: trunk/themes/default/template/mainpage_categories.tpl @ 16522

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

only load the js for the ajax loading, if one picture needs to be generated
bug:2684

  • Property svn:eol-style set to LF
File size: 1.7 KB
Line 
1{strip}{html_style}
2.thumbnailCategory .illustration{ldelim}
3        width: {$derivative_params->max_width()+5}px;
4}
5
6.content .thumbnailCategory .description{ldelim}
7        height: {$derivative_params->max_height()+5}px;
8}
9{/html_style}{/strip}
10<ul class="thumbnailCategories">
11{foreach from=$category_thumbnails item=cat name=cat_loop}
12{assign var=derivative value=$pwg->derivative($derivative_params, $cat.representative.src_image)}
13{if !$derivative->is_cached()}
14{combine_script id='jquery.ajaxmanager' path='themes/default/js/plugins/jquery.ajaxmanager.js' load='footer'}
15{combine_script id='thumbnails.loader' path='themes/default/js/thumbnails.loader.js' require='jquery.ajaxmanager' load='footer'}
16{/if}
17        <li class="{if $smarty.foreach.comment_loop.index is odd}odd{else}even{/if}">
18                <div class="thumbnailCategory">
19                        <div class="illustration">
20                        <a href="{$cat.URL}">
21                                <img {if $derivative->is_cached()}src="{$derivative->get_url()}"{else}src="{$ROOT_URL}{$themeconf.img_dir}/ajax-loader-small.gif" data-src="{$derivative->get_url()}"{/if} alt="{$cat.TN_ALT}" title="{$cat.NAME|@replace:'"':' '|@strip_tags:false} - {'display this album'|@translate}">
22                        </a>
23                        </div>
24                        <div class="description">
25                                <h3>
26                                        <a href="{$cat.URL}">{$cat.NAME}</a>
27                                        {if !empty($cat.icon_ts)}
28                                        <img title="{$cat.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent{if $cat.icon_ts.IS_CHILD_DATE}_by_child{/if}.png" alt="(!)">
29                                        {/if}
30                                </h3>
31                <div class="text">
32                                {if isset($cat.INFO_DATES) }
33                                <p class="dates">{$cat.INFO_DATES}</p>
34                                {/if}
35                                <p class="Nb_images">{$cat.CAPTION_NB_IMAGES}</p>
36                                {if not empty($cat.DESCRIPTION)}
37                                <p>{$cat.DESCRIPTION}</p>
38                                {/if}
39                </div>
40                        </div>
41                </div>
42        </li>
43{/foreach}
44</ul>
Note: See TracBrowser for help on using the repository browser.