Blogs UI work (small CSS/markup changes and tmp masters for the public views)

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4042280
This commit is contained in:
skewed
2009-11-26 01:37:51 +00:00
parent 984c5ee983
commit aea8aff4d3
6 changed files with 33 additions and 26 deletions

View File

@@ -140,7 +140,7 @@ number of columns: 24; actual width: 946; column width: 26; gutter width:14
/* Headings and defaults
----------------------------------------------------------*/
h1, h2, h3, h4, h5, h6, legend {
h1, h2, h3, h4, h5, legend {
padding:.4em 0;
font-family:"Palatino Linotype", Palatino, Palladio, "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif;
font-style: normal;
@@ -153,7 +153,7 @@ h3 { font-size:2.1em; } /* 21px */
h4 { font-size:1.8em; } /* 18px */
h5 { font-size:1.6em; } /* 16px */
h6, p, label, input, select, .button, .cancel /* todo: (heskew) need to do something better with cancel */,
.message, th, td { font-size:1.5em; } /* 15px */
.message, th, td { font-size:1.5em; line-height:1.5em; } /* 15px */
p .button { font-size:inherit; }
h3 span { font-size:.57em; }
@@ -254,6 +254,9 @@ a:hover, a:active, a:focus {
#main h2, #main h3, #main h4, #main p {
margin:.23em 0 1em;
}
#main p {
margin:0 0 1.5em;
}
#main form {
margin:.345em 0 1.5em;
}

View File

@@ -74,7 +74,7 @@ namespace Orchard.Blogs.Controllers {
var session = _sessionLocator.For(typeof(BlogPostRecord));
session.Flush();
return Redirect(Url.BlogPostEdit(blogSlug, blogPost.As<RoutableAspect>().Slug));
return Redirect(Url.BlogPost(blogSlug, blogPost.As<RoutableAspect>().Slug));
}
}
}

View File

@@ -1,6 +1,10 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Blog>" %>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
<%@ Import Namespace="Orchard.Blogs.Models"%>
<h3><a href="<%=Url.BlogEdit(Model.Slug) %>"><%=Html.Encode(Model.Name) %></a> <span>(<a href="<%=Url.Blog(Model.Slug) %>">view</a>)</span> <span>(<a href="<%=Url.BlogPostCreate(Model.Slug) %>">post</a>)</span></h3>
<h3>
<a href="<%=Url.BlogEdit(Model.Slug) %>"><%=Html.Encode(Model.Name) %></a>
<span>(<a href="<%=Url.Blog(Model.Slug) %>">view</a>)</span>
<span>(<a href="<%=Url.BlogPostCreate(Model.Slug) %>">create post</a>)</span>
</h3>
<p>[list of authors] [modify blog access]</p>
<p><%=Model.Description %></p>

View File

@@ -1,4 +1,4 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<BlogViewModel>" %>
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<BlogViewModel>" %>
<%@ Import Namespace="Orchard.Core.Common.Models"%>
<%@ Import Namespace="Orchard.Models"%>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
@@ -6,17 +6,16 @@
<%@ Import Namespace="Orchard.Blogs.Models"%>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
<% Html.Include("Header"); %>
<div class="yui-g">
<h2>Blog</h2>
<div><%=Html.Encode(Model.Blog.Name) %></div><%
//TODO: (erikpo) Move this into a helper
if (Model.Posts.Count() > 0) { %>
<ul><%
foreach (BlogPost post in Model.Posts) { %>
<li><a href="<%=Url.BlogPost(Model.Blog.Slug, post.As<RoutableAspect>().Slug) %>"><%=Html.Encode(post.As<RoutableAspect>().Title) %></a></li><%
} %>
</ul><%
<%-- todo: (heskew) make master-less when we get into theming --%>
<asp:Content ContentPlaceHolderID="MainContent" runat="server">
<h2>Blog</h2>
<div><%=Html.Encode(Model.Blog.Name) %></div><%
//TODO: (erikpo) Move this into a helper
if (Model.Posts.Count() > 0) { %>
<ul><%
foreach (BlogPost post in Model.Posts) { %>
<li><a href="<%=Url.BlogPost(Model.Blog.Slug, post.As<RoutableAspect>().Slug) %>"><%=Html.Encode(post.As<RoutableAspect>().Title) %></a></li><%
} %>
</div>
<% Html.Include("Footer"); %>
</ul><%
} %>
</asp:Content>

View File

@@ -13,6 +13,8 @@
<span><%=Html.TextBoxFor(m => m.Slug, new { id = "permalink", @class = "text" })%> <span> &laquo; How to write a permalink. &raquo; </span></span>
</fieldset>
<fieldset>
<label for="body">Excerpt:</label>
<span>[still needed]</span>
<label for="body">Body:</label>
<span><%=Html.TextAreaFor(m => m.Body, new { id = "body", @class = "html" })%></span>
</fieldset>

View File

@@ -1,4 +1,4 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<BlogPostViewModel>" %>
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<BlogPostViewModel>" %>
<%@ Import Namespace="Orchard.Core.Common.Models"%>
<%@ Import Namespace="Orchard.Models"%>
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
@@ -6,10 +6,9 @@
<%@ Import Namespace="Orchard.Blogs.Models"%>
<%@ Import Namespace="Orchard.Mvc.Html"%>
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
<% Html.Include("Header"); %>
<div class="yui-g">
<h2><%=Html.Encode(Model.Post.Title) %></h2>
<div>Posted by <%=Html.Encode(Model.Post.Creator.UserName) %> on {M d yyyy h:mm tt}</div>
<%=Model.Post.Body %>
</div>
<% Html.Include("Footer"); %>
<%-- todo: (heskew) make master-less when we get into theming --%>
<asp:Content ContentPlaceHolderID="MainContent" runat="server">
<h2><%=Html.Encode(Model.Post.Title) %></h2>
<div>Posted by <%=Html.Encode(Model.Post.Creator.UserName) %> on {M d yyyy h:mm tt}</div>
<%=Model.Post.Body %>
</asp:Content>