[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 | } |
---|
[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 | */ |
---|
| 43 | jQuery.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] | 78 | function tnb_resize() { |
---|
| 79 | $('#subcontent').masonry({ |
---|
[11699] | 80 | columnWidth: {/literal} {if $stripped_black_bloc.column_width}{$stripped_black_bloc.column_width}{/if}{literal}, |
---|
[12048] | 81 | itemSelector: '.bloc, .bloc_big, .content_block, .bloc_stuff', |
---|
[11679] | 82 | isAnimated: true |
---|
[10851] | 83 | }); |
---|
| 84 | } |
---|
[11699] | 85 | |
---|
| 86 | |
---|
[11677] | 87 | jQuery(document).ready(function(jQuery){ |
---|
[11699] | 88 | |
---|
| 89 | // fade onmouseover |
---|
[11677] | 90 | jQuery(".bloc a").hover(function() { jQuery(this).fadeTo(500, 1); }, function() { jQuery(this).fadeTo(500, 0.75); }); |
---|
[11699] | 91 | |
---|
| 92 | // sidemenu managment |
---|
[11677] | 93 | var sidemenu = jQuery.cookie('side-menu'); |
---|
| 94 | var isdisplayed; |
---|
| 95 | // if cookie says the menu is hiding, keep it hidden! |
---|
[11679] | 96 | {/literal} {if $stripped.hideMenu} {literal} |
---|
| 97 | if (sidemenu == 'showing') { |
---|
| 98 | jQuery("#subcontent").css({'margin-left' : '20em'}); |
---|
| 99 | isdisplayed=true; |
---|
| 100 | } |
---|
| 101 | else { |
---|
| 102 | jQuery("#subcontent").css({'margin-left' : '0'}); |
---|
| 103 | isdisplayed=false; |
---|
| 104 | } |
---|
| 105 | {/literal} {else} {literal} |
---|
[11677] | 106 | if (sidemenu == 'hiding') { |
---|
| 107 | jQuery("#subcontent").css({'margin-left' : '0'}); |
---|
| 108 | isdisplayed=false; |
---|
| 109 | } |
---|
[11679] | 110 | else { |
---|
[11677] | 111 | jQuery("#subcontent").css({'margin-left' : '20em'}); |
---|
| 112 | isdisplayed=true; |
---|
| 113 | } |
---|
[11679] | 114 | {/literal} {/if} {literal} |
---|
[11677] | 115 | // creates a variable with the contents of the cookie side-menu |
---|
| 116 | jQuery("#menuswitcher").click(function(){ |
---|
| 117 | if (jQuery("#menubar").is(":hidden") || isdisplayed==false ) { |
---|
| 118 | jQuery("#subcontent").css({'margin-left' : '20em'}); |
---|
| 119 | isdisplayed=true; |
---|
| 120 | } else { |
---|
| 121 | jQuery("#subcontent").css({'margin-left' : '0'}); |
---|
| 122 | isdisplayed=false; |
---|
| 123 | } |
---|
| 124 | }); |
---|
[11679] | 125 | tnb_resize(); |
---|
[10851] | 126 | |
---|
| 127 | }); |
---|
| 128 | </script> |
---|
| 129 | {/literal} |
---|
| 130 | {/html_head} |
---|
| 131 | {/if} |
---|