From 5dcd3cb508066c4437c2ad88c4365a3b0e09c13f Mon Sep 17 00:00:00 2001 From: Jonathan Wall Date: Fri, 8 Oct 2010 17:10:41 -0700 Subject: [PATCH] Updates to the new theme. --HG-- branch : dev --- .../Themes/TheThemeMachine/Styles/site.css | 82 +++++++++++++++-- .../Themes/TheThemeMachine/Theme.txt | 2 +- .../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 | 48 +++++++--- .../TheThemeMachine/Views/Recent.cshtml | 22 +++++ .../TheThemeMachine/Views/TempFeatured.cshtml | 1 - 9 files changed, 317 insertions(+), 20 deletions(-) create mode 100644 src/Orchard.Web/Themes/TheThemeMachine/Views/Content.cshtml create mode 100644 src/Orchard.Web/Themes/TheThemeMachine/Views/Featured.cshtml create mode 100644 src/Orchard.Web/Themes/TheThemeMachine/Views/Layout-Blog.cshtml create mode 100644 src/Orchard.Web/Themes/TheThemeMachine/Views/Layout-homePage.cshtml create mode 100644 src/Orchard.Web/Themes/TheThemeMachine/Views/Recent.cshtml delete mode 100644 src/Orchard.Web/Themes/TheThemeMachine/Views/TempFeatured.cshtml diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Styles/site.css b/src/Orchard.Web/Themes/TheThemeMachine/Styles/site.css index 0a3a3a2d0..a4af8be35 100644 --- a/src/Orchard.Web/Themes/TheThemeMachine/Styles/site.css +++ b/src/Orchard.Web/Themes/TheThemeMachine/Styles/site.css @@ -103,7 +103,7 @@ h4 img, h5 img, h6 img { } p { - font-size:1.2em; + font-size:1.3em; line-height:2em; } @@ -145,6 +145,51 @@ nav ul li a { /* Forms ***************************************************************/ +input[type=text], +input.text, input.title, +textarea, select { + background-color:#fff; + border:1px solid #bbb; +} +input[type=text]:focus, +input.text:focus, input.title:focus, +textarea:focus, select:focus { + border-color:#a5cc7a; + background-color: #fbfff7; +} + +input[type=text], +input.text, input.title, +textarea, select { + margin:0.5em 0; +} + +input.text, +input.title { width: 300px; padding:5px; } +input.title { font-size:1.5em; } +textarea { padding:5px; } + +input[type=checkbox], input[type=radio], +input.checkbox, input.radio { + position:relative; top:.25em; +} + +/* TODO: Causes form rendering issues with theme preview, had to add line-height: normal */ +form.inline { line-height: normal; } +form.inline p { margin-bottom:0; } + + +/*- Login Control -*/ + +.login-form { border: solid 1px #e2e2e2; padding: 20px; font-size: 1.2em; font-weight: normal; } +.login-form div { padding: 5px 0px 5px 0px; } +.login-form input[type=submit] { margin: 5px 0px 5px 0px; } +.validation-summary-errors { padding: 20px 20px 0px 20px; border: solid 1px #fff54f; background-color: #fffcca; margin-bottom: 20px; } + +.edit-form { display: none; } +.static_text_div { border: dashed 1px #CCCCCC; display:block; color: inherit; } +.static_text_div:hover { border: dashed 1px red; color: inherit; } + /* Misc ***************************************************************/ @@ -154,28 +199,49 @@ nav ul li a { border:1px solid #CCC; } - /* Sidebar off - Content Zone 960 */ #content { - background-color:#e8e8e8; - width: 960px; clear:both; + padding:12px; } -/* Sidebar on - Content Zone 640 */ -.icanhassidebar #content { +/* Sidebar on - Content Zone 600 */ +.has-sidebar #content { background-color:#e8e8e8; - width: 640px; + width: 582px; + padding:12px 6px 6px 12px; float:left; clear:both; } .sidebar { background-color:#f6f6f6; - width: 320px; + width: 360px; float:right; } #sitemap { clear:both; +} + +.zone { + padding:6px; +} + +/* Featured Zone - switch to an image */ + +.featuredimage { + float:left; + border: 1px solid #ccc; + width: 462px; + height: 240px; + margin: 6px; +} + +/* Recent Zone */ + +#zone-recent ul li { + float:left; + width: 462px; + margin: 6px; } \ No newline at end of file diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Theme.txt b/src/Orchard.Web/Themes/TheThemeMachine/Theme.txt index 181a08857..2a93f052e 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, ..., Footer \ No newline at end of file +Zones: Header, Navigation, Messages, Featured, Recent, Footer \ No newline at end of file diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Views/Content.cshtml b/src/Orchard.Web/Themes/TheThemeMachine/Views/Content.cshtml new file mode 100644 index 000000000..2cb7526c9 --- /dev/null +++ b/src/Orchard.Web/Themes/TheThemeMachine/Views/Content.cshtml @@ -0,0 +1 @@ +Chili diff --git a/src/Orchard.Web/Themes/TheThemeMachine/Views/Featured.cshtml b/src/Orchard.Web/Themes/TheThemeMachine/Views/Featured.cshtml new file mode 100644 index 000000000..d7afa6e08 --- /dev/null +++ b/src/Orchard.Web/Themes/TheThemeMachine/Views/Featured.cshtml @@ -0,0 +1,15 @@ + +
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 new file mode 100644 index 000000000..a31dd0b0f --- /dev/null +++ b/src/Orchard.Web/Themes/TheThemeMachine/Views/Layout-Blog.cshtml @@ -0,0 +1,79 @@ +@{ + 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 new file mode 100644 index 000000000..a3f985ac4 --- /dev/null +++ b/src/Orchard.Web/Themes/TheThemeMachine/Views/Layout-homePage.cshtml @@ -0,0 +1,87 @@ +@{ + 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 837c808bf..16b56c9ba 100644 --- a/src/Orchard.Web/Themes/TheThemeMachine/Views/Layout.cshtml +++ b/src/Orchard.Web/Themes/TheThemeMachine/Views/Layout.cshtml @@ -8,14 +8,10 @@ Func Zone = x => Display(x); if (Model.Sidebar != null) { - Html.AddPageClassNames(new[]{"icanhassidebar"}); + Html.AddPageClassNames(new[]{"has-sidebar"}); } - - WorkContext.Layout.Featured.Add(New.TempFeatured(Hello:"bob")); - WorkContext.Layout.Featured.Add("just some text in featured"); }
-@Display.User()
@* needs to be the page title, not page (head) title... *@

@WorkContext.CurrentSite.SiteName

@@ -35,25 +31,57 @@ @Zone(Model.Messages)
} - @if(Model.Featured != null) { -