[28586] | 1 | {define_derivative name='carousel' width='300' height='350' min_width='350'} |
---|
| 2 | |
---|
| 3 | {footer_script}{literal} |
---|
| 4 | (function($) { |
---|
| 5 | $(document).ready(function(){ |
---|
| 6 | |
---|
| 7 | var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0)), |
---|
| 8 | start; |
---|
| 9 | |
---|
| 10 | if (isTouch==true){ |
---|
| 11 | start=""; |
---|
| 12 | }else{ |
---|
| 13 | start="onStart"; |
---|
| 14 | }; |
---|
| 15 | |
---|
| 16 | $("div.carousel").smoothDivScroll({ |
---|
| 17 | autoScrollingMode: start, |
---|
| 18 | touchScrolling: true, |
---|
| 19 | autoScrollingStep: {/literal}{$Slimi.carousel_speed}{literal}, |
---|
| 20 | manualContinuousScrolling: true, |
---|
| 21 | mousewheelScrolling: "allDirections", |
---|
| 22 | |
---|
| 23 | }); |
---|
| 24 | |
---|
| 25 | $("div.carousel").bind("mouseover", function() { |
---|
| 26 | $(this).smoothDivScroll("stopAutoScrolling"); |
---|
| 27 | }).bind("mouseout", function() { |
---|
| 28 | $(this).smoothDivScroll("startAutoScrolling"); |
---|
| 29 | }); |
---|
| 30 | |
---|
| 31 | |
---|
| 32 | }); |
---|
| 33 | })(jQuery); |
---|
| 34 | {/literal}{/footer_script} |
---|
| 35 | |
---|
| 36 | |
---|
| 37 | <div class="carousel"> |
---|
| 38 | {foreach from=$category_thumbnails item=cat} |
---|
| 39 | <div class="illustration"> |
---|
| 40 | <a href="{$cat.URL}"> |
---|
| 41 | <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}"/> |
---|
| 42 | |
---|
[18812] | 43 | <div class="CatMPdescription"> |
---|
| 44 | <h3> |
---|
| 45 | {$cat.NAME} |
---|
| 46 | {if !empty($cat.icon_ts)} |
---|
| 47 | <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="(!)"> |
---|
| 48 | {/if} |
---|
| 49 | </h3> |
---|
[28586] | 50 | <div class="Nb_images"> |
---|
[18812] | 51 | {if isset($cat.INFO_DATES) } |
---|
| 52 | <p class="dates">{$cat.INFO_DATES}</p> |
---|
| 53 | {/if} |
---|
[28586] | 54 | <p >{$cat.CAPTION_NB_IMAGES}</p> |
---|
[18812] | 55 | {if not empty($cat.DESCRIPTION)} |
---|
| 56 | <p>{$cat.DESCRIPTION}</p> |
---|
| 57 | {/if} |
---|
[28586] | 58 | </div> |
---|
[18812] | 59 | </div> |
---|
| 60 | </a> |
---|
[28586] | 61 | </div> |
---|
| 62 | {/foreach} |
---|
| 63 | </div> |
---|