[25981] | 1 | {define_derivative name='derivative_params' type='xsmall'} |
---|
[18813] | 2 | {if !empty($thumbnails)}{strip} |
---|
| 3 | |
---|
| 4 | {combine_script id='jquery.ajaxmanager' path='themes/default/js/plugins/jquery.ajaxmanager.js' load='footer'} |
---|
| 5 | {combine_script id='thumbnails.loader' path='themes/default/js/thumbnails.loader.js' require='jquery.ajaxmanager' load='footer'} |
---|
| 6 | {*define_derivative name='derivative_params' width=160 height=90 crop=true*} |
---|
| 7 | {html_style} |
---|
| 8 | {*Set some sizes according to maximum thumbnail width and height*} |
---|
| 9 | |
---|
| 10 | {if $derivative_params->max_width() >= 1008} |
---|
| 11 | .col{ldelim}width:95%} |
---|
| 12 | {elseif $derivative_params->max_width() >= 792} |
---|
| 13 | .col{ldelim}width:49%} |
---|
| 14 | {elseif $derivative_params->max_width() >= 576} |
---|
| 15 | .col{ldelim}width:40%} |
---|
| 16 | {elseif $derivative_params->max_width() >= 500} |
---|
| 17 | .col{ldelim}width:32%} |
---|
| 18 | {elseif $derivative_params->max_width() >= 480} |
---|
| 19 | .col{ldelim}width:24%} |
---|
| 20 | {elseif $derivative_params->max_width() >= 380} |
---|
| 21 | .col{ldelim}width:19%} |
---|
| 22 | {else} |
---|
| 23 | .col{ldelim}width:15%} |
---|
| 24 | {/if} |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | |
---|
| 28 | |
---|
| 29 | .thumbnails .wrap2{ldelim} |
---|
| 30 | height: {$derivative_params->max_height()+3}px; |
---|
| 31 | } |
---|
| 32 | {if $derivative_params->max_width() > 600} |
---|
| 33 | .thumbLegend {ldelim}font-size: 130%} |
---|
| 34 | {else} |
---|
| 35 | {if $derivative_params->max_width() > 400} |
---|
| 36 | .thumbLegend {ldelim}font-size: 110%} |
---|
| 37 | {else} |
---|
| 38 | .thumbLegend {ldelim}font-size: 90%} |
---|
| 39 | {/if} |
---|
| 40 | {/if} |
---|
| 41 | {/html_style} |
---|
| 42 | |
---|
| 43 | <div class="thumbContent"> |
---|
[25981] | 44 | <div id="containerThumb"> |
---|
[18813] | 45 | |
---|
| 46 | {foreach from=$thumbnails item=thumbnail} |
---|
| 47 | <div class="box photo col"> |
---|
| 48 | |
---|
| 49 | {assign var=derivative value=$pwg->derivative($derivative_params, $thumbnail.src_image)} |
---|
| 50 | |
---|
| 51 | <li class="thumbs"> |
---|
| 52 | <div class="thumbnail"> |
---|
| 53 | <div class="illustration"> |
---|
| 54 | <img class="thumbnail" src="{$derivative->get_url()}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}"> |
---|
| 55 | {if $SHOW_THUMBNAIL_CAPTION } |
---|
| 56 | <a href="{$thumbnail.URL}"> |
---|
| 57 | <div class="description"> |
---|
| 58 | <div class="text"> |
---|
| 59 | <span class="thumbLegend"> |
---|
| 60 | <span class="thumbName">{$thumbnail.NAME}</span> |
---|
| 61 | {if !empty($thumbnail.icon_ts)} |
---|
| 62 | <img title="{$thumbnail.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent.png" alt="(!)"> |
---|
| 63 | {/if} |
---|
| 64 | {if isset($thumbnail.NB_COMMENTS)} |
---|
| 65 | <span class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments"> |
---|
| 66 | <br> |
---|
| 67 | {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)} |
---|
| 68 | </span> |
---|
| 69 | {/if} |
---|
| 70 | {if isset($thumbnail.NB_HITS)} |
---|
| 71 | <span class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits"> |
---|
| 72 | <br> |
---|
| 73 | {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)} |
---|
| 74 | </span> |
---|
| 75 | {/if} |
---|
| 76 | </span> |
---|
| 77 | </div> |
---|
| 78 | </div> |
---|
| 79 | </a> |
---|
| 80 | </div> |
---|
| 81 | </div> |
---|
| 82 | |
---|
| 83 | |
---|
| 84 | {/if} |
---|
| 85 | </li> |
---|
| 86 | </div> |
---|
| 87 | {/foreach} |
---|
| 88 | |
---|
| 89 | {/strip} |
---|
| 90 | {/if} |
---|
| 91 | </div> |
---|
| 92 | {footer_script require='jquery'}{literal} |
---|
[25981] | 93 | $(function(){ |
---|
[18813] | 94 | |
---|
[25981] | 95 | var $container = $('#containerThumb'); |
---|
| 96 | |
---|
| 97 | $container.imagesLoaded( function(){ |
---|
| 98 | $container.masonry({ |
---|
| 99 | itemSelector : '.box', |
---|
| 100 | isFitWidth: true |
---|
| 101 | }); |
---|
| 102 | }); |
---|
| 103 | |
---|
| 104 | }); |
---|
[18813] | 105 | {/literal}{/footer_script} |
---|
| 106 | </div> |
---|
| 107 | |
---|