source: extensions/Slim/template/mainpage_categories.tpl @ 28556

Last change on this file since 28556 was 28556, checked in by Miklfe, 10 years ago

nouveau carousel: mousewheel; scrollable pour les écrans tactiles
nouvelle lightbox: Fancybox

File size: 1.3 KB
Line 
1{define_derivative name='carousel' width='300' height='350' min_width='350'}
2
3{footer_script}{literal}
4$(document).ready(function () {
5        var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0)),
6                start;
7       
8        if (isTouch==true){
9        start="";
10        }else{
11        start="onStart";
12        };
13       
14        $("div.carousel").smoothDivScroll({
15                autoScrollingMode: start,
16                touchScrolling: true,
17                autoScrollingStep: 5,
18                mousewheelScrolling: "allDirections",
19                manualContinuousScrolling: true,
20               
21        });     
22                       
23        $("div.carousel").bind("mouseover", function() {
24                $(this).smoothDivScroll("stopAutoScrolling");
25        }).bind("mouseout", function() {
26                $(this).smoothDivScroll("startAutoScrolling");
27        });     
28});
29{/literal}{/footer_script}
30
31<div class="carousel">
32                        {foreach from=$category_thumbnails item=cat}
33                                                <div class="illustration">
34                                                        <a href="{$cat.URL}">
35                                                                <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}"/>
36                                                       
37                                                <div class="CatMPdescription">
38                                                        <h3>
39                                                                {$cat.NAME}
40                                                        </h3>
41                                                        <div>
42                                                                {$cat.CAPTION_NB_IMAGES}
43                                                </div>
44                                                        </div> 
45                                                </a>
46                                                </div>
47                        {/foreach}
48</div>
Note: See TracBrowser for help on using the repository browser.