From 7540e437b8a8e3b9b5528faebc7fcc84c8bc39c3 Mon Sep 17 00:00:00 2001 From: Jonathan Wall Date: Tue, 12 Oct 2010 15:53:42 -0700 Subject: [PATCH] More layout updates to the new theme. --HG-- branch : dev --- src/Orchard.Web/Orchard.Web.csproj | 3 +- .../Themes/TheThemeMachine/Styles/site.css | 28 ++++-- .../Themes/TheThemeMachine/Theme.txt | 2 +- .../TheThemeMachine/Views/AsideThird.cshtml | 14 +++ .../TheThemeMachine/Views/Content.cshtml | 1 - .../TheThemeMachine/Views/Featured.cshtml | 15 ---- .../TheThemeMachine/Views/Layout-Blog.cshtml | 79 ----------------- .../Views/Layout-homePage.cshtml | 87 ------------------- .../TheThemeMachine/Views/Layout.cshtml | 50 ++++++----- .../TheThemeMachine/Views/Recent.cshtml | 22 ----- 10 files changed, 63 insertions(+), 238 deletions(-) create mode 100644 src/Orchard.Web/Themes/TheThemeMachine/Views/AsideThird.cshtml delete mode 100644 src/Orchard.Web/Themes/TheThemeMachine/Views/Content.cshtml delete mode 100644 src/Orchard.Web/Themes/TheThemeMachine/Views/Featured.cshtml delete mode 100644 src/Orchard.Web/Themes/TheThemeMachine/Views/Layout-Blog.cshtml delete mode 100644 src/Orchard.Web/Themes/TheThemeMachine/Views/Layout-homePage.cshtml delete mode 100644 src/Orchard.Web/Themes/TheThemeMachine/Views/Recent.cshtml diff --git a/src/Orchard.Web/Orchard.Web.csproj b/src/Orchard.Web/Orchard.Web.csproj index 4037e23c0..e6f0ebc94 100644 --- a/src/Orchard.Web/Orchard.Web.csproj +++ b/src/Orchard.Web/Orchard.Web.csproj @@ -140,11 +140,10 @@ - + Designer - Designer diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Styles/site.css b/src/Orchard.Web/Themes/TheThemeMachine/Styles/site.css index 5a9db4e4b..0c7e50ab3 100644 --- a/src/Orchard.Web/Themes/TheThemeMachine/Styles/site.css +++ b/src/Orchard.Web/Themes/TheThemeMachine/Styles/site.css @@ -90,7 +90,7 @@ a:visited{} h1,h2,h3,h4,h5,h6 { font-weight: normal; } -h1 { font-size: 3em; } +h1 { font-size: 2em; } h2 { font-size: 1.3em; } h3 { font-size: 1.2em; } h4 { font-size: 1.1em; } @@ -102,9 +102,10 @@ h4 img, h5 img, h6 img { margin: 0; } -article header h1 { font-size: 2em; } -p, aside, footer, .meta { +/* TODO: We wrap all widgets with consistent html so we get predictable font sizing */ + +p, footer, .meta { font-size:1.3em; line-height:2em; } @@ -176,8 +177,7 @@ nav ul a { /* Main ***************************************************************/ -/* Sidebar off - Content Zone 960 */ -#content, .sidebar { +#content, .aside, .about { padding:6px; } @@ -187,7 +187,7 @@ nav ul a { float:left; } -.has-sidebar .sidebar { +.has-sidebar .aside.first { width: 348px; float:right; } @@ -198,7 +198,7 @@ nav ul a { float:right; } -.has-sidebar-left .secondary { +.has-sidebar-left .aside.second { width: 348px; float:left; } @@ -208,11 +208,11 @@ nav ul a { width: 588px; } -.has-sidebars .sidebar { +.has-sidebars .aside.first, .has-sidebars .aside.second { width: 168px; } -.has-sidebars .primary, .has-sidebars .secondary, .has-sidebars #content { +.has-sidebars .aside.first, .has-sidebars .aside.second, .has-sidebars #content { float:left; } @@ -275,6 +275,16 @@ form.inline p { margin-bottom:0; } display:inline; } +.aside.third { + border-top:1px solid #999999; + clear:both; +} + +.aside.third div > div { + float:left; + width:304px; + padding:12px 6px 0 6px; +} /* Featured Zone - switch to an image */ diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Theme.txt b/src/Orchard.Web/Themes/TheThemeMachine/Theme.txt index 0aa044032..345ff3840 100644 --- a/src/Orchard.Web/Themes/TheThemeMachine/Theme.txt +++ b/src/Orchard.Web/Themes/TheThemeMachine/Theme.txt @@ -4,4 +4,4 @@ Description: It's a *really* good theme, yo. Version: 0.1 Tags: Awesome Website: http://orchardproject.net -Zones: Header, Navigation, Messages, Featured, Recent, Sidebar, Content, Sidebar2, Footer \ No newline at end of file +Zones: Header, Navigation, Messages, AsideFirst, AsideSecond, AsideThird, Content, Footer \ No newline at end of file diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Views/AsideThird.cshtml b/src/Orchard.Web/Themes/TheThemeMachine/Views/AsideThird.cshtml new file mode 100644 index 000000000..41d6d75d9 --- /dev/null +++ b/src/Orchard.Web/Themes/TheThemeMachine/Views/AsideThird.cshtml @@ -0,0 +1,14 @@ +
+

First Leader Aside

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur a nibh ut tortor dapibus vestibulum. Aliquam vel sem nibh. Suspendisse vel condimentum tellus.

+
+ +
+

Second Leader Aside

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur a nibh ut tortor dapibus vestibulum. Aliquam vel sem nibh. Suspendisse vel condimentum tellus.

+
+ +
+

Third Leader Aside

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur a nibh ut tortor dapibus vestibulum. Aliquam vel sem nibh. Suspendisse vel condimentum tellus.

+
diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Views/Content.cshtml b/src/Orchard.Web/Themes/TheThemeMachine/Views/Content.cshtml deleted file mode 100644 index 2cb7526c9..000000000 --- a/src/Orchard.Web/Themes/TheThemeMachine/Views/Content.cshtml +++ /dev/null @@ -1 +0,0 @@ -Chili diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Views/Featured.cshtml b/src/Orchard.Web/Themes/TheThemeMachine/Views/Featured.cshtml deleted file mode 100644 index d7afa6e08..000000000 --- a/src/Orchard.Web/Themes/TheThemeMachine/Views/Featured.cshtml +++ /dev/null @@ -1,15 +0,0 @@ - -
Image
- - \ No newline at end of file diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Views/Layout-Blog.cshtml b/src/Orchard.Web/Themes/TheThemeMachine/Views/Layout-Blog.cshtml deleted file mode 100644 index a31dd0b0f..000000000 --- a/src/Orchard.Web/Themes/TheThemeMachine/Views/Layout-Blog.cshtml +++ /dev/null @@ -1,79 +0,0 @@ -@{ - Style.Include("site.css"); - - // cool stuff goes up here - var homeUrl = Href("~/"); - - // Zone is an alias for Display - Func Zone = x => Display(x); - - if (Model.Sidebar != null) { - Html.AddPageClassNames(new[]{"icanhassidebar"}); - } -} -
-
- @* needs to be the page title, not page (head) title... *@ -

@WorkContext.CurrentSite.SiteName

- @if(Model.Header != null) { - - } - @if(Model.Navigation != null) { - - } -
- @if(Model.Messages != null) { -
- @Zone(Model.Messages) -
- } - - @* This code would inject text into the Featured zone. - @{WorkContext.Layout.Featured.Add("just some text in featured");} - *@ - - @{ - WorkContext.Layout.Featured.Add(New.Featured(insertMessage:"This is a featured blog post.")); - } - - @if(Model.Featured != null) { - - } - - @* the model content for the page is in the Content zone @ the default position (nothing, zero, zilch) *@ - @if(Model.Content == null) { -
- @Zone(Model.Content) -
- } - else { -
- Let's take over the home page -
- } - - @if(Model.Sidebar != null) { - - } - - @if(Model.Footer != null) { -
- @Zone(Model.Footer) -
- } - else { -
- Powered by Orchard @Display.User() -
-} - - -
\ No newline at end of file diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Views/Layout-homePage.cshtml b/src/Orchard.Web/Themes/TheThemeMachine/Views/Layout-homePage.cshtml deleted file mode 100644 index a3f985ac4..000000000 --- a/src/Orchard.Web/Themes/TheThemeMachine/Views/Layout-homePage.cshtml +++ /dev/null @@ -1,87 +0,0 @@ -@{ - Style.Include("site.css"); - - // cool stuff goes up here - var homeUrl = Href("~/"); - - // Zone is an alias for Display - Func Zone = x => Display(x); - - if (Model.Sidebar != null) { - Html.AddPageClassNames(new[]{"has-sidebar"}); - } -} -
-
- @* needs to be the page title, not page (head) title... *@ -

@WorkContext.CurrentSite.SiteName

- @if(Model.Header != null) { - - } - @if(Model.Navigation != null) { - - } -
- @if(Model.Messages != null) { -
- @Zone(Model.Messages) -
- } - - @* This code would inject text into the Featured zone. - @{WorkContext.Layout.Featured.Add("just some text in featured");} -*@ - - @{ - WorkContext.Layout.Featured.Add(New.Featured(insertMessage:"This is a featured blog post.")); - } - @if(Model.Featured != null) { -
- @Zone(Model.Featured) -
- } - - @{ - WorkContext.Layout.Recent.Add(New.Recent()); - } - @if(Model.Featured != null) { - - } - - @* the model content for the page is in the Content zone @ the default position (nothing, zero, zilch) *@ - @if(Model.Content != null) { -
- @Zone(Model.Content) -
- } - else { -
- Let's take over the home page -
- } - - @if(Model.Sidebar != null) { - - } - - @if(Model.Footer != null) { -
- @Zone(Model.Footer) -
- } - else { -
- Powered by Orchard @Display.User() -
-} - - -
\ 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 5f6d4f961..4fdba2241 100644 --- a/src/Orchard.Web/Themes/TheThemeMachine/Views/Layout.cshtml +++ b/src/Orchard.Web/Themes/TheThemeMachine/Views/Layout.cshtml @@ -8,20 +8,25 @@ // Zone is an alias for Display Func Zone = x => Display(x); - //Add classes to the wrapper div to toggle zones on and off - if (Model.Sidebar != null && Model.Sidebar2 == null) { +//Use the two lines below to test the sidebar zones. +//WorkContext.Layout.AsideFirst.Add("This test text will render in Sidebar1."); +//WorkContext.Layout.AsideSecond.Add("This test text will render in Sidebar2."); + + //Add classes to the wrapper div to toggle zones on and off + if (Model.AsideFirst != null && Model.AsideSecond == null) { Model.Classes.Add("has-sidebar"); } - else if (Model.Sidebar == null && Model.Sidebar2 != null) { + else if (Model.AsideFirst == null && Model.AsideSecond != null) { Model.Classes.Add("has-sidebar-left"); } - else if (Model.Sidebar != null && Model.Sidebar2 != null) { + else if (Model.AsideFirst != null && Model.AsideSecond != null) { Model.Classes.Add("has-sidebars"); } else { } + //Model.Attributes.Add("onclick", "javscript:alert('woot')"); Model.Id = "layout-wrapper"; @@ -61,19 +66,10 @@ @Zone(Model.Messages) } - @if(Model.Featured != null) { - - } - @if(Model.Recent != null) { -
- @Zone(Model.Recent) -
- } - @if(Model.Sidebar2 != null) { -