Ignore:
Timestamp:
Jun 1, 2014, 9:38:49 PM (10 years ago)
Author:
Miklfe
Message:

Compatibilité avec Slim

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Slimi/template/mainpage_categories.tpl

    r25998 r28586  
    1 {define_derivative name='carousel' width='300' height='300' min_width='300'}
    2 <div id="carousel">
    3 <div id="wrap">
    4         <div class="jcarousel">
    5           <ul>
    6                 {foreach from=$category_thumbnails item=cat}
    7                         <li>
    8                                         <div class="illustration">
    9                                                 <a href="{$cat.URL}">
    10                                                         <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()}"/>
     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                                                       
    1143                                                        <div class="CatMPdescription">
    1244                                                                <h3>
     
    1648                                                                        {/if}
    1749                                                                </h3>
    18                                                                
     50                                                                <div class="Nb_images">
    1951                                                                {if isset($cat.INFO_DATES) }
    2052                                                                <p class="dates">{$cat.INFO_DATES}</p>
    2153                                                                {/if}
    22                                                                 <p class="Nb_images">{$cat.CAPTION_NB_IMAGES}</p>
     54                                                                <p >{$cat.CAPTION_NB_IMAGES}</p>
    2355                                                                {if not empty($cat.DESCRIPTION)}
    2456                                                                <p>{$cat.DESCRIPTION}</p>
    2557                                                                {/if}
     58                                                                </div>
    2659                                                        </div>
    2760                                                </a>
    28                                         </div>
    29                         </li>
    30                 {/foreach}
    31         </ul>
     61                                                </div>
     62                        {/foreach}
    3263</div>
    33 </div>
    34         <a href="#" class="jcarousel-control-prev">&lsaquo;</a>
    35     <a href="#" class="jcarousel-control-next">&rsaquo;</a>
    36 </div>
Note: See TracChangeset for help on using the changeset viewer.