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