Changeset 25998


Ignore:
Timestamp:
Dec 17, 2013, 11:25:38 PM (10 years ago)
Author:
Miklfe
Message:
 
Location:
extensions/Slimi
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • extensions/Slimi/local_head.tpl

    r18812 r25998  
    1 {php}
    2         global $Slimi;
    3         $this->assign( 'Slimi', $Slimi );
    4 {/php}
    5 
    61{combine_script id='menu' load='header' require='jquery' path='themes/Slim/js/menu.js'}
    7 {combine_script id='hoverIntent' load='header' require='jquery' path='themes/Slim/js/jquery.hoverIntent.minified.js'}
    8 {combine_script id='columnizer' load='header' require='jquery' path='themes/Slim/js/columnizer.js'}
     2{combine_script id='hoverIntent' load='header' require='jquery' path='themes/Slim/js/jquery.hoverIntent.js'}
     3{combine_script id='columnizer' load='header' require='jquery' path='themes/Slim/js/jquery.columnizer.js'}
    94
    105{if (($Slimi.lytebox_slimi)==1)}
  • extensions/Slimi/slimi.php

    r19203 r25998  
    44global $conf, $template;
    55  $params = array_merge(unserialize($conf['Slimi']));
     6        $template->assign('Slimi', $params);
    67
    78 
     
    910<style media="screen" type="text/css">
    1011body{background:'.$params['bg_slimi'].'}
    11 #infoBlock,#imageHeaderBar, .jcarousel-skin-cat .jcarousel-container,#menubar{background:'.$params['bd_slimi'].'}
     12#infoBlock,#imageHeaderBar, #carousel,#menubar{background:'.$params['bd_slimi'].'}
    1213#theHeader p, #theHeader h1{color:'.$params['title_slimi'].'}
    1314</style>
  • extensions/Slimi/template/index.tpl

    r18812 r25998  
    145145
    146146{if !empty($THUMBNAILS)}
    147 <ul class="thumbnails" id="thumbnails">
    148147{$THUMBNAILS}
    149 </ul>
     148{footer_script}{literal}
     149        $('.jcarousel')
     150            .jcarousel({
     151                 wrap: 'circular'
     152            })         
     153                        .jcarouselAutoscroll({
     154                        autostart: false
     155                        });     
     156                       
     157        $('.jcarousel-control-prev')
     158            .on('jcarouselcontrol:active', function() {
     159                $(this).removeClass('inactive');
     160            })
     161            .on('jcarouselcontrol:inactive', function() {
     162                $(this).addClass('inactive');
     163            })
     164            .jcarouselControl({
     165                target: '-=1'
     166            });
     167
     168        $('.jcarousel-control-next')
     169            .on('jcarouselcontrol:active', function() {
     170                $(this).removeClass('inactive');
     171            })
     172            .on('jcarouselcontrol:inactive', function() {
     173                $(this).addClass('inactive');
     174            })
     175            .jcarouselControl({
     176                target: '+=1'
     177            });
     178{/literal}{/footer_script}
    150179{/if}
    151180
    152181{if empty($THUMBNAILS)}
    153 {if !empty($CATEGORIES)}{$CATEGORIES}{/if}
     182{if !empty($CATEGORIES)}{$CATEGORIES}
     183                {footer_script}{literal}
     184        $('.jcarousel')
     185            .jcarousel({
     186                 wrap: 'circular'
     187            })         
     188                        .jcarouselAutoscroll({
     189                        interval: 3000,
     190                        target: '+=1',
     191                        autostart: true
     192                        });     
     193                       
     194        $('.jcarousel-control-prev')
     195            .on('jcarouselcontrol:active', function() {
     196                $(this).removeClass('inactive');
     197            })
     198            .on('jcarouselcontrol:inactive', function() {
     199                $(this).addClass('inactive');
     200            })
     201            .jcarouselControl({
     202                target: '-=1'
     203            });
     204
     205        $('.jcarousel-control-next')
     206            .on('jcarouselcontrol:active', function() {
     207                $(this).removeClass('inactive');
     208            })
     209            .on('jcarouselcontrol:inactive', function() {
     210                $(this).addClass('inactive');
     211            })
     212            .jcarouselControl({
     213                target: '+=1'
     214            });
     215               
     216                $('.jcarousel')
     217                        .on('mouseenter', function(){
     218                                $(this).jcarouselAutoscroll('stop')
     219                        })
     220                        .on('mouseleave', function(){
     221                                $(this).jcarouselAutoscroll('start')
     222                        });
     223{/literal}{/footer_script}
     224
     225{/if}
    154226{/if}
    155227
  • extensions/Slimi/template/mainpage_categories.tpl

    r18917 r25998  
    11{define_derivative name='carousel' width='300' height='300' min_width='300'}
    2 
    3 
    4 {html_style}
    5 .jcarousel-skin-cat .jcarousel-list li{ldelim}
    6         min-width:{$carousel->max_width()}px;
    7 {/html_style}
    8 
    9 <div id="carouselcat">
    10 
     2<div id="carousel">
    113<div id="wrap">
    12           <ul id="carousel" class="jcarousel-skin-cat">
    13 
     4        <div class="jcarousel">
     5          <ul>
    146                {foreach from=$category_thumbnails item=cat}
    15 
    16 
    177                        <li>
    188                                        <div class="illustration">
     
    4030                {/foreach}
    4131        </ul>
    42 {footer_script}{literal}
    43 function mycarousel_initCallback(carousel)
    44 {
    45 // Disable autoscrolling if the user clicks the prev or next button.
    46     carousel.buttonNext.bind('click', function() {
    47         carousel.startAuto(1);
    48     });
    49 
    50     carousel.buttonPrev.bind('click', function() {
    51         carousel.startAuto(0);
    52     });
    53        
    54        
    55     // Pause autoscrolling if the user moves with the cursor over the clip.
    56     carousel.clip.hover(function() {carousel.stopAuto();},
    57                                                 function() {carousel.startAuto();}
    58                                                 );
    59 };
    60 
    61 jQuery(document).ready(function() {
    62     jQuery('#carousel').jcarousel({
    63         auto: 1,
    64                 wrap: 'circular',
    65                 scroll: 2,
    66                 animation: 2000,
    67                 initCallback: mycarousel_initCallback,
    68                
    69     });
    70 });
    71 {/literal}{/footer_script}
    7232</div>
    7333</div>
    74 
     34        <a href="#" class="jcarousel-control-prev">&lsaquo;</a>
     35    <a href="#" class="jcarousel-control-next">&rsaquo;</a>
     36</div>
  • extensions/Slimi/template/thumbnails.tpl

    r19019 r25998  
    33    global $page, $template;
    44    $template->assign('cat_name', $page['category']['name']);
    5        
    6         global $Slimi;  $this->assign( 'Slimi', $Slimi);
    75{/php}
    86
    97
    10 <div id="carouselthumb">
     8<div id="carousel">
    119<div id="wrap">
    12 <ul id="carousel" class="jcarousel-skin-cat">
     10                <div class="jcarousel">
     11<ul>
    1312                {if !empty($category_thumbnails)}
    1413               
     
    3938        {assign var=derivative value=$pwg->derivative($carousel, $thumbnail.src_image)}
    4039                        <li>
    41                                 <div class="iIllustration">
     40                                <div class="illustration">
    4241                                        <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:'\'':'&#39;'|replace:'"':'&quot;'}">
    4342                                        <img class="thumbnail" src="{$derivative->get_url()}" alt="{$thumbnail.TN_ALT}" title="{$thumbnail.TN_TITLE}" height="{$carousel->max_height()}"/>
     
    7372        {/foreach}
    7473</ul>
    75 {footer_script}{literal}
    76 function mycarousel_initCallback(carousel)
    77 {
    78     // Pause autoscrolling if the user moves with the cursor over the clip.
    79     carousel.clip.hover(function() {
    80         carousel.stopAuto();
    81     }, function() {
    82         carousel.startAuto();
    83     });
    84 };
    85 
    86 jQuery(document).ready(function() {
    87     jQuery('#carousel').jcarousel({
    88         auto: 0,
    89                 wrap: 'circular',
    90                 scroll: 2,
    91                 initCallback: mycarousel_initCallback,
    92                
    93     });
    94 });
    95 
    96 {/literal}{/footer_script}
    9774
    9875</div>
    9976</div>
     77        <a href="#" class="jcarousel-control-prev">&lsaquo;</a>
     78    <a href="#" class="jcarousel-control-next">&rsaquo;</a>
     79</div>
  • extensions/Slimi/theme.css

    r19203 r25998  
    1717#comments{background:#4f4f4f;width:100%}
    1818.commentElement{border-radius:0;border:none;color:#c2c2c2}
    19 
     19.switchBox{z-index:1001}
    2020/*=========================================icon======================================================*/
    2121.pwg-icon{background-image:url("../default/s26/outline_ffffff.png")}
     
    3838#menubar{background:#000;height:35px}
    3939.dd_wrapper,.cl_wrapper,.cc_wrapper,#menubar dt,#menubar dt a{line-height:35px;height:29px;padding:0 16px 6px;color:#c2c2c2}
    40 .dd_wrapper:hover,.cl_wrapper:hover,.cc_wrapper:hover,.activate,#menubar dt a:hover,#menubar dt:hover{z-index:100;height:29px;background:#4f4f4f;color:#ff8a00;padding:0 16px 4px;text-shadow:none}
     40.dd_wrapper:hover,.cl_wrapper:hover,.cc_wrapper:hover,.activate,#menubar dt a:hover,#menubar dt:hover{z-index:100;background:#4f4f4f;color:#ff8a00;padding:0 16px 4px;text-shadow:none}
    4141#menubar dt a,#menubar dt a:hover{padding:0 0}
    4242span#menu_start{background:none}
     
    4444#topnav .liSub{background:none}
    4545#topnav .sub, #topnav #loger{top:35px;border-radius:0;box-shadow:5px 5px 20px #000;background:rgba(0, 0, 0, 0.8)}
    46 ul#topnav .sub ul li,ul#topnav #loger ul li,ul#topnav .sub #menuTagCloud div{border:none}
     46ul#topnav .sub ul li,ul#topnav #loger ul li,ul#topnav .sub #menuTagCloud div{2px;border:1px solid #CBCBCB;border-radius:10px}
    4747ul#topnav .sub ul li a,ul#topnav #loger ul li a{background:none}
    4848ul#topnav .sub ul li.selected a{background:url(images/menu/navlist_arrow_select.png) no-repeat 0 5px}
     
    6262
    6363/*=========================================carousel======================================================*/
    64 .jcarousel-skin-cat .jcarousel-list li{height:300px}
    65 .jcarousel-skin-cat .jcarousel-container{border:none;border-radius:0;box-shadow:none;}
    66 .jcarousel-skin-cat {padding:0}
    67 .jcarousel-skin-cat .jcarousel-prev-horizontal,.jcarousel-skin-cat .jcarousel-next-horizontal{z-index:1000}
     64#wrap{position:relative;margin:0;padding:50px 0px 40px;border:none;border-radius:0;background:transparent;box-shadow:none}
     65.jcarousel-control-prev{left:40px;z-index:1000}
     66.jcarousel-control-next{right:40px;z-index:1000}
  • extensions/Slimi/themeconf.inc.php

    r19046 r25998  
    22/*
    33Theme Name: Slimi
    4 Version: auto
     4Version: 1.3
    55Description: Piwigo theme.
    66Theme URI: http://piwigo.org/ext/extension_view.php?eid=644
     
    3838
    3939add_event_handler('loc_end_page_header', 'load_Slimi' );
    40 
    41 
    4240function load_Slimi()
    4341{
    44 global $user, $page;
    45 if($user['theme']=='Slimi')
    46  
    47                 {
    4842        include('slimi.php');
    49                 }
    5043        }
    5144
Note: See TracChangeset for help on using the changeset viewer.