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