diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Styles/site.css b/src/Orchard.Web/Themes/TheThemeMachine/Styles/site.css index f73dd5ed8..8b9736d68 100644 --- a/src/Orchard.Web/Themes/TheThemeMachine/Styles/site.css +++ b/src/Orchard.Web/Themes/TheThemeMachine/Styles/site.css @@ -132,31 +132,40 @@ p, .meta { /* Sidebar off - Content Zone 960 */ #content { - clear:both; - /*padding:12px;*/ + /*clear:both; + padding:12px;*/ } -/*Right Sidebar on - Content Zone 600 */ +/*One Sidebar on */ .has-sidebar #content { background-color:#e8e8e8; width: 600px; /*padding:12px 6px 6px 12px;*/ float:left; - clear:both; + /*clear:both;*/ } -/*Left Sidebar on - Content Zone 600 - -.has-sidebar #content { - float:right; -}*/ - -.sidebar { +.has-sidebar .sidebar { background-color:#f6f6f6; width: 360px; float:right; } +/*Two Sidebars on */ +.has-sidebars #content { + background-color:#e8e8e8; + width: 600px; +} + +.has-sidebars .sidebar { + background-color:#f6f6f6; + width: 180px; +} + +.has-sidebars .primary, .has-sidebars .secondary, .has-sidebars #content { + float:left; +} + #sitemap { clear:both; } @@ -166,37 +175,37 @@ p, .meta { #navigation { - width: 960px; - margin: 4px auto; + width: 960px; + margin: 4px auto; display:block; border-bottom: 1px solid #999; -} - -nav ul { - padding: 0 0 0 8px; -} - -nav ul li - { - border:1px solid #999; - background:#e7e7e7; - display:block; - float:left; - margin:0 2px -1px 0; -} - -nav ul li.on { - border-bottom: 1px solid #fff; - background:#fff; -} - -nav ul a { - padding:0 18px; - display:block; - float:left; - font-size:1.4em; - text-decoration:none; - line-height:24px; +} + +nav ul { + padding: 0 0 0 8px; +} + +nav ul li + { + border:1px solid #999; + background:#e7e7e7; + display:block; + float:left; + margin:0 2px -1px 0; +} + +nav ul li.on { + border-bottom: 1px solid #fff; + background:#fff; +} + +nav ul a { + padding:0 18px; + display:block; + float:left; + font-size:1.4em; + text-decoration:none; + line-height:24px; } #footer {} @@ -288,6 +297,6 @@ form.inline p { margin-bottom:0; } } -.clearfix { - clear:both; +.clearfix { + clear:both; } \ No newline at end of file diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Views/Layout.cshtml b/src/Orchard.Web/Themes/TheThemeMachine/Views/Layout.cshtml index e04622488..5809234a2 100644 --- a/src/Orchard.Web/Themes/TheThemeMachine/Views/Layout.cshtml +++ b/src/Orchard.Web/Themes/TheThemeMachine/Views/Layout.cshtml @@ -7,9 +7,21 @@ // Zone is an alias for Display Func Zone = x => Display(x); - if (Model.Sidebar != null) { + + + if (Model.Sidebar != null && Model.Sidebar2 == null) { Model.Classes.Add("has-sidebar"); } + else if (Model.Sidebar == null && Model.Sidebar2 != null) { + Model.Classes.Add("has-sidebar-left"); + } + else if (Model.Sidebar != null && Model.Sidebar2 != null) { + Model.Classes.Add("has-sidebars"); + } + else { + + } + //Model.Attributes.Add("onclick", "javscript:alert('woot')"); @@ -73,10 +85,9 @@ } - @{WorkContext.Layout.Sidebar1.Add("just some text in featured");} - @if(Model.Sidebar1 != null) { -