[28556] | 1 | {define_derivative name='carousel' width='300' height='350' min_width='350'} |
---|
[18811] | 2 | {php} |
---|
| 3 | global $page, $template; |
---|
| 4 | $template->assign('cat_name', $page['category']['name']); |
---|
| 5 | |
---|
| 6 | {/php} |
---|
| 7 | |
---|
[28556] | 8 | {footer_script}{literal} |
---|
| 9 | $(document).ready(function () { |
---|
| 10 | var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0)), |
---|
| 11 | start; |
---|
| 12 | |
---|
| 13 | if (isTouch==true){ |
---|
| 14 | start=""; |
---|
| 15 | }else{ |
---|
| 16 | start="onStart"; |
---|
| 17 | }; |
---|
| 18 | |
---|
| 19 | $("div.carousel").smoothDivScroll({ |
---|
| 20 | autoScrollingMode: start, |
---|
| 21 | touchScrolling: true, |
---|
| 22 | autoScrollingStep:5, |
---|
| 23 | mousewheelScrolling: "allDirections", |
---|
| 24 | manualContinuousScrolling: true, |
---|
| 25 | }); |
---|
| 26 | |
---|
| 27 | $("div.carousel").bind("mouseover", function() { |
---|
| 28 | $(this).smoothDivScroll("stopAutoScrolling"); |
---|
| 29 | }).bind("mouseout", function() { |
---|
| 30 | $(this).smoothDivScroll("startAutoScrolling"); |
---|
| 31 | }); |
---|
| 32 | |
---|
| 33 | |
---|
| 34 | $('.fancybox').fancybox({ |
---|
| 35 | helpers : { |
---|
| 36 | title : { |
---|
| 37 | type : 'over' |
---|
| 38 | }, |
---|
| 39 | }, |
---|
| 40 | afterLoad: function() { |
---|
| 41 | $("div.carousel").smoothDivScroll("stopAutoScrolling"); |
---|
| 42 | }, |
---|
| 43 | afterClose: function() { |
---|
| 44 | $("div.carousel").smoothDivScroll("startAutoScrolling"); |
---|
| 45 | } |
---|
| 46 | }); |
---|
| 47 | }); |
---|
| 48 | {/literal}{/footer_script} |
---|
[18811] | 49 | |
---|
[28556] | 50 | |
---|
| 51 | |
---|
| 52 | |
---|
| 53 | |
---|
| 54 | <div class="carousel"> |
---|
[25997] | 55 | {if !empty($category_thumbnails)} |
---|
[28556] | 56 | {foreach from=$category_thumbnails item=cat} |
---|
| 57 | <div class="illustration"> |
---|
| 58 | <a href="{$cat.URL}"> |
---|
| 59 | <img src="{$pwg->derivative_url($carousel, $cat.representative.src_image)}" alt="{$cat.TN_ALT}" title="{$cat.NAME|@replace:'"':' '|@strip_tags:false} - {'display this album'|@translate}" min-width="{$carousel->max_width()}" height="{$carousel->max_height()-22}"/> |
---|
| 60 | |
---|
| 61 | <div class="CatMPdescription"> |
---|
| 62 | <h3> |
---|
| 63 | {$cat.NAME} |
---|
| 64 | </h3> |
---|
| 65 | <div> |
---|
| 66 | {$cat.CAPTION_NB_IMAGES} |
---|
| 67 | </div> |
---|
| 68 | </div> |
---|
[18811] | 69 | </a> |
---|
[28556] | 70 | </div> |
---|
| 71 | {/foreach} |
---|
[25997] | 72 | {/if} |
---|
| 73 | {foreach from=$thumbnails item=thumbnail} |
---|
| 74 | {assign var=derivative value=$pwg->derivative($carousel, $thumbnail.src_image)} |
---|
| 75 | <div class="illustration"> |
---|
[28556] | 76 | <a href="{if ($Slim.style_slim)!=3}{$thumbnail.path}" class="fancybox" data-fancybox-group="gallery"{else}{$thumbnail.URL}"{/if} title="{$thumbnail.NAME|strip_tags:false|replace:'\'':'''|replace:'"':'"'}"> |
---|
[25997] | 77 | <img class="thumbnail" src="{$derivative->get_url()}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}" height="{$carousel->max_height()-22}"/> |
---|
[18811] | 78 | {if $SHOW_THUMBNAIL_CAPTION } |
---|
| 79 | <div class="CatMPdescription"> |
---|
| 80 | <H3> |
---|
| 81 | {$thumbnail.NAME} |
---|
| 82 | {if !empty($thumbnail.icon_ts)} |
---|
| 83 | <img title="{$thumbnail.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent.png" alt="(!)"> |
---|
| 84 | {/if} |
---|
| 85 | </h3> |
---|
| 86 | {if isset($thumbnail.NB_COMMENTS) or isset($thumbnail.NB_HITS)} |
---|
[25997] | 87 | <div> |
---|
[18811] | 88 | {if isset($thumbnail.NB_COMMENTS)} |
---|
| 89 | <p class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments"> |
---|
[25997] | 90 | {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)} |
---|
[18811] | 91 | </p> |
---|
| 92 | {/if} |
---|
| 93 | {if isset($thumbnail.NB_HITS)} |
---|
| 94 | <p class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits"> |
---|
[25997] | 95 | {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)} |
---|
[18811] | 96 | </p> |
---|
| 97 | {/if} |
---|
[25997] | 98 | </div> |
---|
[18811] | 99 | {/if} |
---|
| 100 | </div> |
---|
| 101 | {/if} |
---|
[25997] | 102 | </a> |
---|
| 103 | </div> |
---|
| 104 | {/foreach} |
---|
| 105 | </div> |
---|
[28556] | 106 | |
---|