Changed the default theme back to "Classic" for now and making "Classic" look decent w/ existing CSS and minimal template overrides

--HG--
branch : dev
This commit is contained in:
Nathan Heskew
2010-09-21 13:56:51 -07:00
parent 8e9314686e
commit fd9152eb4f
17 changed files with 50 additions and 127 deletions

View File

@@ -1,5 +1,5 @@
@using System.Web.Mvc
<div id="user-display">
<div class="user-display">
@if (Request.IsAuthenticated) {
@T("Welcome, <strong>{0}</strong>!", WorkContext.CurrentUser.UserName)
@Html.ActionLink(T("Log Off").ToString(), "LogOff", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = Context.Request.RawUrl })

View File

@@ -130,7 +130,9 @@
<None Include="Views\HackScript.cshtml" />
<None Include="Views\HackStyle.cshtml" />
<None Include="Views\ThinBorder.cshtml" />
<None Include="Views\Home\FormShapes.cshtml" />
<None Include="Views\Home\FormShapes.cshtml">
<SubType>Designer</SubType>
</None>
<None Include="Views\Home\UsingShapes.cshtml" />
<None Include="Views\Inventory\ShapeTable.cshtml" />
</ItemGroup>

View File

@@ -182,7 +182,7 @@ namespace Orchard.Setup.Services {
// set site theme
var themeService = environment.Resolve<IThemeService>();
themeService.SetSiteTheme("Contoso");
themeService.SetSiteTheme("Classic");
// add default culture
var cultureManager = environment.Resolve<ICultureManager>();

View File

@@ -136,7 +136,6 @@
<Content Include="Themes\TheAdmin\Styles\images\tableHeaderBackgroundRed.gif" />
<Content Include="Themes\TheAdmin\Styles\site.css" />
<Content Include="Themes\TheAdmin\Theme.txt" />
<None Include="Themes\Classic\Views\Zone.cshtml" />
<None Include="Themes\SafeMode\Views\Document.cshtml" />
<None Include="Themes\TheAdmin\Views\Layout.cshtml" />
</ItemGroup>
@@ -160,20 +159,13 @@
<Content Include="Themes\ClassicDark\Views\ZoneTest.ascx" />
<Content Include="Themes\ClassicDark\Zones\Sidebar.html" />
<Content Include="Themes\Classic\Content\Images\sidebarBackground.gif" />
<Content Include="Themes\Classic\Views\DisplayTemplates\Parts\Blogs.BlogPost.Metadata.ascx" />
<Content Include="Themes\Classic\Zones\Sidebar.html" />
<Content Include="Themes\Classic\Styles\blog.css" />
<Content Include="Themes\Classic\Styles\site.css" />
<Content Include="Themes\Classic\Theme.png" />
<Content Include="Themes\Classic\Theme.txt" />
<Content Include="Themes\Classic\Views\DisplayTemplates\Items\Blogs.Blog.ascx" />
<Content Include="Themes\Classic\Views\DisplayTemplates\Items\Blogs.Blog.Summary.ascx" />
<Content Include="Themes\Classic\Views\DisplayTemplates\Items\Blogs.BlogPost.ascx" />
<Content Include="Themes\Classic\Views\DisplayTemplates\Items\Blogs.BlogPost.Summary.ascx" />
<Content Include="Themes\Classic\Views\DisplayTemplates\Parts\Common.Metadata.ascx" />
<Content Include="Themes\Classic\Views\Footer.ascx" />
<Content Include="Themes\Classic\Views\Layout.ascx" />
<Content Include="Themes\Classic\Views\ZoneTest.ascx" />
<None Include="Themes\Classic\Views\Footer.cshtml" />
<None Include="Themes\Classic\Views\Layout.cshtml" />
<Content Include="Themes\Contoso\Content\Images\bkg.jpg" />
<Content Include="Themes\Contoso\Content\Images\comment-arrow.png" />
<Content Include="Themes\Contoso\Content\Images\content-bkg.png" />

View File

@@ -176,7 +176,7 @@ td.even {
}
#logindisplay {
.user-display {
font-size:1.4em;
margin:1em auto;
text-align:right;

View File

@@ -1,8 +0,0 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ContentItemViewModel<BlogPart>>" %>
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<h3><%: Html.Link(Model.Item.Name, Url.Blog(Model.Item.Slug)) %></h3>
<div class="blog meta"><a href="<%: Url.Blog(Model.Item.Slug) %>"><%: T.Plural("1 post", "{0} posts", Model.Item.PostCount)%></a></div>
<div class="blogdescription"><p><%: Model.Item.Description %></p></div>

View File

@@ -1,9 +0,0 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ContentItemViewModel<BlogPart>>" %>
<%@ Import Namespace="Orchard.UI.Resources"%>
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<h1><%: Html.TitleForPage(Model.Item.Name) %></h1>
<% RegisterLink(new LinkEntry { Rel = "wlwmanifest", Type = "application/wlwmanifest+xml", Href = Url.BlogLiveWriterManifest(Model.Item.Slug) });%>
<% RegisterLink(new LinkEntry { Rel = "EditURI", Type = "application/rsd+xml", Title = "RSD", Href = Url.BlogRsd(Model.Item.Slug) });%>
<% Html.Zone("primary", ":manage");%>

View File

@@ -1,11 +0,0 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ContentItemViewModel<BlogPart>>" %>
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<%@ Import Namespace="Orchard.Core.Common.Extensions" %>
<%Model.Zones.AddRenderPartial("zonetest", "ZoneTest", Model); %>
<h2><%: Html.Link(Model.Item.Title, Url.BlogPost(Model.Item)) %></h2>
<div class="meta"><%: Html.PublishedState(Model.Item, T) %> | <%Html.Zone("meta");%></div>
<div class="postsummary">
<% Html.Zone("primary"); %>
</div>

View File

@@ -1,14 +0,0 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ContentItemViewModel<BlogPart>>" %>
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<h1><%: Html.TitleForPage(Model.Item.Title)%></h1>
<%-- Sorry, Jon. I need to figure out how we can make this markup possible with the recent metadata/manage split.
We can still do it this way but there's isn't yet a story for UI conditional on permissions.
What I have in this template is as close as I can get at the moment. --%>
<%--<div class="metadata">
<% if (Model.Item.Creator != null) {
%><div class="posted"><%: T("Posted by {0} {1}", Model.Item.Creator.UserName, Html.PublishedWhen(Model.Item)) %><% -- | <a href="<%: Url.BlogPostEdit(Model.Item.Blog.Slug, Model.Item.Id) %>" class="ibutton edit"><%: T("Edit") %></a>-- %></div><%
} %>
</div>
--%>
<% Html.Zone("primary"); %>

View File

@@ -1,7 +0,0 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<BlogPart>" %>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<%@ Import Namespace="Orchard.Core.Common.Extensions" %><%
if (Model.Creator != null) {
%><%: T("Posted by {0} {1}", Model.Creator.UserName, Html.PublishedWhen(Model, T)) %><%
} %>

View File

@@ -1,5 +0,0 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Common.ViewModels.CommonMetadataViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
<%--<div class="metadata">
<div class="posted"><%: T("Published by {0}", Model.Creator != null ? Model.Creator.UserName : T("nobody(?)"))%></div>
</div>--%>

View File

@@ -1,10 +0,0 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<div id="footercontainer">
<div id="footer">
<div class="menucontainer">
<% Html.Include("menu"); %>
</div>
<div class="clearBoth"></div>
</div>
</div>

View File

@@ -0,0 +1,8 @@
<div id="footercontainer">
<div id="footer">
<div class="menucontainer">
@Display(Model.Navigation)
</div>
<div class="clearBoth"></div>
</div>
</div>

View File

@@ -1,40 +0,0 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BaseViewModel>" %>
<%@ Import Namespace="Orchard.Mvc.ViewModels" %>
<%@ Import Namespace="Orchard.UI.Resources" %>
<%
// todo: this is verbose because this view does not inherit from an Orchard base view and so does not
// benefit from Style.Require().
Html.Resolve<IResourceManager>().Require(new RequireSettings { Type = "stylesheet", Name = "Classic" });
Html.Resolve<IResourceManager>().Require(new RequireSettings { Type = "stylesheet", Name = "Classic_Blog" });
%>
<%-- todo:(nheskew) this will need to be a generated menu --%>
<div id="wrapper">
<%--HTML.Include will render a div with an id="logindisplay" --%>
<% Html.Include("User"); %>
<%--Top Navigation and branding--%>
<div id="headercontainer">
<div id="header">
<h1><%: Html.SiteName() %></h1>
<div class="menucontainer">
<% Html.Include("menu"); %>
</div>
<div class="clearBoth"></div>
</div>
</div>
<div id="main">
<div id="content">
<%--Main Content--%>
<%Html.ZoneBody("content");%>
</div>
<div id="sidebar">
<% Html.Zone("search");
Html.Zone("sidebar");%>
</div>
<%-- End Content --%>
<% Html.Include("Footer"); %>
</div>
</div>

View File

@@ -0,0 +1,34 @@
@using Orchard.UI.Resources
@{
Style.Require("Classic");
Style.Require("Classic_Blog");
}
<div id="wrapper">
@// HTML.Include will render a div with a class="user-display"
@// Can use this -> {Html.Include("User");}
@// or the following. At least they appear to do the same thing currently. The first is a standard Html.Include, the second "displays the (New) User shape"
@Display.User()
@// Top Navigation and branding
<div id="headercontainer">
<div id="header">
<h1>@WorkContext.CurrentSite.SiteName</h1>
<div class="menucontainer">
@Display(Model.Navigation)
</div>
<div class="clearBoth"></div>
</div>
</div>
<div id="main">
<div id="content">
@// Main Content
@Display(Model.Content)
</div>
<div id="sidebar">
@Display(Model.search)
@Display(Model.sidebar)
</div>
@// End Content
@Display.Footer(Navigation:Model.Navigation)
</div>
</div>

View File

@@ -1,6 +0,0 @@
@{
var tag = Html.Resolve<Orchard.DisplayManagement.Shapes.ITagBuilderFactory>().Create(Model, "div");
}
@tag.StartElement
@DisplayChildren(Model)
@tag.EndElement <!-- /@Model.Id -->

View File

@@ -1,3 +0,0 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ContentItemViewModel<BlogPart>>" %>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>