Changeset 28586 for extensions/Slimi/template/thumbnails.tpl
- Timestamp:
- Jun 1, 2014, 9:38:49 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Slimi/template/thumbnails.tpl
r25998 r28586 1 {define_derivative name='carousel' width='300' height='3 00' min_width='300'}1 {define_derivative name='carousel' width='300' height='350' min_width='350'} 2 2 {php} 3 3 global $page, $template; 4 4 $template->assign('cat_name', $page['category']['name']); 5 5 6 {/php} 7 {footer_script}{literal} 8 (function($) { 9 $(document).ready(function(){ 10 11 var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0)), 12 start; 13 14 if (isTouch==true){ 15 start=""; 16 }else{ 17 start="onStart"; 18 }; 19 20 $("div.carousel").smoothDivScroll({ 21 autoScrollingMode: start, 22 touchScrolling: true, 23 autoScrollingStep: {/literal}{$Slimi.carousel_speed}{literal}, 24 manualContinuousScrolling: true, 25 mousewheelScrolling: "allDirections", 26 27 }); 28 29 $("div.carousel").bind("mouseover", function() { 30 $(this).smoothDivScroll("stopAutoScrolling"); 31 }).bind("mouseout", function() { 32 $(this).smoothDivScroll("startAutoScrolling"); 33 }); 34 35 36 }); 37 })(jQuery); 38 {/literal}{/footer_script} 6 39 40 {if (($Slimi.lytebox_slimi)==1)} 41 {footer_script}{literal} 42 (function($) { 43 $(document).ready(function(){ 44 $('.fancybox').fancybox({ 45 helpers : { 46 title : { 47 type : 'over' 48 }, 49 }, 50 afterLoad: function() { 51 $("div.carousel").smoothDivScroll("stopAutoScrolling"); 52 }, 53 afterClose: function() { 54 $("div.carousel").smoothDivScroll("startAutoScrolling"); 55 } 56 }); 57 58 }); 59 })(jQuery); 60 {/literal}{/footer_script} 61 {/if} 7 62 8 <div id="carousel"> 9 <div id="wrap"> 10 <div class="jcarousel"> 11 <ul> 12 {if !empty($category_thumbnails)} 13 14 {foreach from=$category_thumbnails item=cat} 15 16 17 <li> 18 <div class="illustration"> 19 <a href="{$cat.URL}"> 20 <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()}"/> 21 </a> 22 </div> 23 24 63 <div class="carousel"> 64 {if !empty($category_thumbnails)} 65 {foreach from=$category_thumbnails item=cat} 66 <div class="illustration"> 67 <a href="{$cat.URL}"> 68 <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}"/> 69 25 70 <div class="CatMPdescription"> 26 71 <h3> 27 <a href="{$cat.URL}">{$cat.NAME}</a>72 {$cat.NAME} 28 73 </h3> 29 74 <div> 30 {$cat.CAPTION_NB_IMAGES} 75 {$cat.CAPTION_NB_IMAGES} 76 </div> 31 77 </div> 78 </a> 32 79 </div> 33 </li> 34 {/foreach}{/if} 35 36 37 {foreach from=$thumbnails item=thumbnail} 38 {assign var=derivative value=$pwg->derivative($carousel, $thumbnail.src_image)} 39 <li> 40 <div class="illustration"> 41 <a href="{if ($Slimi.lytebox_slimi)==1}{$thumbnail.path}" class="lytebox" rev="slide:true group:name showNavigation:true navType:1 slideInterval:6000"{else}{$thumbnail.URL}"{/if} title="{$thumbnail.NAME|strip_tags:false|replace:'\'':'''|replace:'"':'"'}"> 42 <img class="thumbnail" src="{$derivative->get_url()}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}" height="{$carousel->max_height()}"/> 43 80 {/foreach} 81 {/if} 82 {foreach from=$thumbnails item=thumbnail} 83 {assign var=derivative value=$pwg->derivative($carousel, $thumbnail.src_image)} 84 <div class="illustration"> 85 <a href="{if (($Slimi.lytebox_slimi)==1)}{$thumbnail.path}" class="fancybox" data-fancybox-group="gallery"{else}{$thumbnail.URL}"{/if} title="{$thumbnail.NAME|strip_tags:false|replace:'\'':'''|replace:'"':'"'}"> 86 <img class="thumbnail" src="{$derivative->get_url()}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}" height="{$carousel->max_height()-22}"/> 44 87 {if $SHOW_THUMBNAIL_CAPTION } 45 88 <div class="CatMPdescription"> 46 89 <H3> 47 90 {$thumbnail.NAME} 48 49 91 {if !empty($thumbnail.icon_ts)} 50 92 <img title="{$thumbnail.icon_ts.TITLE}" src="{$ROOT_URL}{$themeconf.icon_dir}/recent.png" alt="(!)"> … … 52 94 </h3> 53 95 {if isset($thumbnail.NB_COMMENTS) or isset($thumbnail.NB_HITS)} 54 <div>96 <div> 55 97 {if isset($thumbnail.NB_COMMENTS)} 56 98 <p class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments"> 57 {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)}99 {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)} 58 100 </p> 59 101 {/if} 60 102 {if isset($thumbnail.NB_HITS)} 61 103 <p class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits"> 62 {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)}104 {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)} 63 105 </p> 64 106 {/if} 65 </div>107 </div> 66 108 {/if} 67 109 </div> 68 110 {/if} 69 </a> 70 </div> 71 </li> 72 {/foreach} 73 </ul> 111 </a> 112 </div> 113 {/foreach} 114 </div> 74 115 75 </div>76 </div>77 <a href="#" class="jcarousel-control-prev">‹</a>78 <a href="#" class="jcarousel-control-next">›</a>79 </div>
Note: See TracChangeset
for help on using the changeset viewer.