source: extensions/stripped_black_bloc/local_head.tpl @ 11823

Last change on this file since 11823 was 11823, checked in by flop25, 13 years ago

main color (not grey) in config
header, elements of footer, elements of tittlebar and the menubar in "bubbles"
created 2 new classes : two_columns, one_column
width corrected

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