source: extensions/Slimi/template/mainpage_categories.tpl @ 18812

Last change on this file since 18812 was 18812, checked in by Miklfe, 11 years ago
File size: 1.8 KB
Line 
1<div id="carouselcat">
2
3<div id="wrap">
4          <ul id="carousel" class="jcarousel-skin-cat">
5
6                {foreach from=$category_thumbnails item=cat}
7
8
9                        <li>
10                                        <div class="illustration">
11                                                <a href="{$cat.URL}">
12                                                        <img src="{$ROOT_URL}{$cat.representative.path}" alt="{$cat.TN_ALT}" title="{$cat.NAME|@replace:'"':' '|@strip_tags:false} - {'display this album'|@translate}" min-width="{$derivative_params->max_width()}" height="{$derivative_params->max_height()}"/>
13                                                        <div class="CatMPdescription">
14                                                                <h3>
15                                                                        {$cat.NAME}
16                                                                        {if !empty($cat.icon_ts)}
17                                                                        <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="(!)">
18                                                                        {/if}
19                                                                </h3>
20                                                               
21                                                                {if isset($cat.INFO_DATES) }
22                                                                <p class="dates">{$cat.INFO_DATES}</p>
23                                                                {/if}
24                                                                <p class="Nb_images">{$cat.CAPTION_NB_IMAGES}</p>
25                                                                {if not empty($cat.DESCRIPTION)}
26                                                                <p>{$cat.DESCRIPTION}</p>
27                                                                {/if}
28                                                        </div>
29                                                </a>
30                                        </div>
31                        </li>
32                {/foreach}
33        </ul>
34{footer_script}{literal}
35function mycarousel_initCallback(carousel)
36{
37// Disable autoscrolling if the user clicks the prev or next button.
38    carousel.buttonNext.bind('click', function() {
39        carousel.startAuto(1);
40    });
41
42    carousel.buttonPrev.bind('click', function() {
43        carousel.startAuto(0);
44    });
45       
46       
47    // Pause autoscrolling if the user moves with the cursor over the clip.
48    carousel.clip.hover(function() {carousel.stopAuto();},
49                                                function() {carousel.startAuto();}
50                                                );
51};
52
53jQuery(document).ready(function() {
54    jQuery('#carousel').jcarousel({
55        auto: 1,
56                wrap: 'circular',
57                scroll: 2,
58                animation: 2000,
59                initCallback: mycarousel_initCallback,
60               
61    });
62});
63{/literal}{/footer_script}
64</div>
65</div>
66
Note: See TracBrowser for help on using the repository browser.