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