source: extensions/stripped_black_bloc/local_head.tpl @ 13211

Last change on this file since 13211 was 13211, checked in by flop25, 12 years ago

masonry changed for isotope.js
enhanced compat. with stuffs_thumbnails.tpl

File size: 4.4 KB
RevLine 
[10851]1{if ($BODY_ID=='theCategoryPage')}
[13211]2{combine_script id='jquery.isotope' load='header' require='jquery' path='themes/stripped_black_bloc/js/isotope.js'}
[11699]3{html_head}{literal}
4<style>
[11823]5#theHeader a, .titrePage a, .footer_login a, .navigationBar a {
6        color: {/literal}{if $stripped_black_bloc.color_main}#{$stripped_black_bloc.color_main}{/if}{literal};
7}
[11699]8.bloc {
[11842]9        max-width: {/literal}{if $stripped_black_bloc.thumbnail_width}{$stripped_black_bloc.thumbnail_width}{/if}{literal}px;
[11699]10}
[13211]11.bloc a{
[11699]12        max-width:{/literal}{if $stripped_black_bloc.thumbnail_width}{$stripped_black_bloc.thumbnail_width}{/if}{literal}px;
13}
[12048]14.bloc_big {
15        max-width: {/literal}{if $stripped_black_bloc.thumbnail_width}{$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width}{/if}{literal}px;
16}
17.bloc_big a {
18        max-width:{/literal}{if $stripped_black_bloc.thumbnail_width}{$stripped_black_bloc.thumbnail_width+$stripped_black_bloc.column_width}{/if}{literal}px;
19}
[11823]20.content_block, .bloc_stuff, .two_columns {
21        width:{/literal}{if $stripped_black_bloc.thumbnail_width}{$stripped_black_bloc.column_width*2-10}{/if}{literal}px;
[11709]22}
[11823]23.stuffs_thumbnails, .stuffs_thumbnails #thumbnails, .one_column {
24        width:{/literal}{if $stripped_black_bloc.thumbnail_width}{$stripped_black_bloc.thumbnail_width-10 }{/if}{literal}px;
[11709]25}
[11871]26{/literal}{if isset($chronology_calendar)}{literal}
27#subcontent {
28        min-height: inherit;
29}
30{/literal}{/if}{literal}
31
[11699]32</style>
[10851]33<script type="text/javascript">
[11679]34/**
35* jQuery Cookie plugin
36*
37* Copyright (c) 2010 Klaus Hartl (stilbuero.de)
38* Dual licensed under the MIT and GPL licenses:
39* http://www.opensource.org/licenses/mit-license.php
40* http://www.gnu.org/licenses/gpl.html
41*
42*/
43jQuery.cookie = function (key, value, options) {
44
45    // key and at least value given, set cookie...
46    if (arguments.length > 1 && String(value) !== "[object Object]") {
47        options = jQuery.extend({}, options);
48
49        if (value === null || value === undefined) {
50            options.expires = -1;
51        }
52
53        if (typeof options.expires === 'number') {
54            var days = options.expires, t = options.expires = new Date();
55            t.setDate(t.getDate() + days);
56        }
57
58        value = String(value);
59
60        return (document.cookie = [
61            encodeURIComponent(key), '=',
62            options.raw ? value : encodeURIComponent(value),
63            options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
64            options.path ? '; path=' + options.path : '',
65            options.domain ? '; domain=' + options.domain : '',
66            options.secure ? '; secure' : ''
67        ].join(''));
68    }
69
70    // key and possibly options given, get cookie...
71    options = value || {};
72    var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
73    return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
74};
[11699]75
76    // MASONRY
77
[10851]78function tnb_resize() {
[13211]79        $('#content_cell').isotope({
80         masonry: {
81                columnWidth: {/literal} {if $stripped_black_bloc.column_width}{$stripped_black_bloc.column_width}{/if}{literal}
82 },
[12048]83                itemSelector: '.bloc, .bloc_big, .content_block, .bloc_stuff',
[11679]84                isAnimated: true
[10851]85        });
86}
[11699]87
88
[11677]89jQuery(document).ready(function(jQuery){
[11699]90
91        // fade onmouseover
[11677]92        jQuery(".bloc a").hover(function() { jQuery(this).fadeTo(500, 1); }, function() { jQuery(this).fadeTo(500, 0.75);  });
[11699]93
94        // sidemenu managment
[11677]95        var sidemenu = jQuery.cookie('side-menu');
96        var isdisplayed;
97                // if cookie says the menu is hiding, keep it hidden!
[11679]98        {/literal} {if $stripped.hideMenu} {literal}
99        if (sidemenu == 'showing') {
[12406]100                jQuery("#content_cell").css({'margin-left' : '20em'});
[11679]101                isdisplayed=true;
102        }
103        else {
[12406]104                jQuery("#content_cell").css({'margin-left' : '0'});
[11679]105                isdisplayed=false;
106        }
107        {/literal} {else} {literal}
[11677]108        if (sidemenu == 'hiding') {
[12406]109                jQuery("#content_cell").css({'margin-left' : '0'});
[11677]110                isdisplayed=false;
111        }
[11679]112        else {
[12406]113                jQuery("#content_cell").css({'margin-left' : '20em'});
[11677]114                isdisplayed=true;
115        }
[11679]116        {/literal} {/if} {literal}
[11677]117        // creates a variable with the contents of the cookie side-menu
118        jQuery("#menuswitcher").click(function(){
119                if (jQuery("#menubar").is(":hidden") || isdisplayed==false ) {
[12406]120                        jQuery("#content_cell").css({'margin-left' : '20em'});
[11677]121                        isdisplayed=true;
122                } else {
[12406]123                        jQuery("#content_cell").css({'margin-left' : '0'});
[11677]124                        isdisplayed=false;
125                }
126        });
[11679]127        tnb_resize();
[10851]128
129});
130  </script>
131{/literal}
132{/html_head}
133{/if}
Note: See TracBrowser for help on using the repository browser.