mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-12-02 19:44:02 +08:00
Some theme refinement (mainly around standardizing on zones and partials for the base "theme" and Orange and TheAdmin themes)
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4044718
This commit is contained in:
@@ -140,6 +140,7 @@
|
|||||||
<Content Include="Common\Views\EditorTemplates\Parts\Common.Owner.ascx" />
|
<Content Include="Common\Views\EditorTemplates\Parts\Common.Owner.ascx" />
|
||||||
<Content Include="Themes\Styles\site.css" />
|
<Content Include="Themes\Styles\site.css" />
|
||||||
<Content Include="Themes\Views\Admin\Install.aspx" />
|
<Content Include="Themes\Views\Admin\Install.aspx" />
|
||||||
|
<Content Include="Themes\Views\header.ascx" />
|
||||||
<Content Include="Themes\Views\document.aspx" />
|
<Content Include="Themes\Views\document.aspx" />
|
||||||
<Content Include="Themes\Views\EditorTemplates\Parts\Themes.SiteSettings.ascx" />
|
<Content Include="Themes\Views\EditorTemplates\Parts\Themes.SiteSettings.ascx" />
|
||||||
<Content Include="Themes\Views\layout.ascx" />
|
<Content Include="Themes\Views\layout.ascx" />
|
||||||
|
|||||||
@@ -332,6 +332,52 @@ div#title
|
|||||||
font-size:95%;
|
font-size:95%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Confirmations, Messages and the like
|
||||||
|
----------------------------------------------------------*/
|
||||||
|
.message, .validation-summary-errors {
|
||||||
|
margin:10px 0 4px 0;
|
||||||
|
padding:4px;
|
||||||
|
}
|
||||||
|
span.message {
|
||||||
|
display:block;
|
||||||
|
margin:4px 0 4px 4px;
|
||||||
|
}
|
||||||
|
.message a {
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirmation.message {
|
||||||
|
background:#e6f1c9; /* green */
|
||||||
|
border:1px solid #cfe493;
|
||||||
|
}
|
||||||
|
.warning.message {
|
||||||
|
background:#fdf5bc; /* yellow */
|
||||||
|
border:1px solid #ffea9b;
|
||||||
|
}
|
||||||
|
/* todo: (heskew) what else (other inputs) needs this? */
|
||||||
|
.critical.message, .validation-summary-errors,
|
||||||
|
.input-validation-error.text-box, .input-validation-error.text {
|
||||||
|
border:1px solid #990808;
|
||||||
|
}
|
||||||
|
.critical.message, .validation-summary-errors {
|
||||||
|
background:#e68585; /* red */
|
||||||
|
color:#fff;
|
||||||
|
}
|
||||||
|
.info.message {
|
||||||
|
background:#fff; /* orange :P */
|
||||||
|
border:1px dashed #D2D6C6;
|
||||||
|
}
|
||||||
|
.debug.message {
|
||||||
|
background:#eee;
|
||||||
|
border:1px dashed #D2D6C6;
|
||||||
|
color:#7a7a7a;
|
||||||
|
margin:20px 0 14px 0;
|
||||||
|
}
|
||||||
|
.debug.message:before {
|
||||||
|
content:"DEBUG » ";
|
||||||
|
}
|
||||||
|
|
||||||
/* Icon buttons
|
/* Icon buttons
|
||||||
----------------------------------------------------------*/
|
----------------------------------------------------------*/
|
||||||
a.ibutton, a.ibutton:link, a.ibutton:visited {
|
a.ibutton, a.ibutton:link, a.ibutton:visited {
|
||||||
|
|||||||
2
src/Orchard.Web/Core/Themes/Views/header.ascx
Normal file
2
src/Orchard.Web/Core/Themes/Views/header.ascx
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
|
||||||
|
<div id="title"><%=Html.TitleForPage(Html.SiteName()) %></div>
|
||||||
@@ -1,17 +1,19 @@
|
|||||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BaseViewModel>" %>
|
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BaseViewModel>" %>
|
||||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%><%
|
<%@ Import Namespace="Orchard.Mvc.ViewModels"%><%
|
||||||
Html.RegisterStyle("site.css"); %>
|
Html.RegisterStyle("site.css");
|
||||||
|
Model.Zones.AddRenderPartial("header", "header", Model);
|
||||||
|
Model.Zones.AddRenderPartial("header:after", "user", Model);
|
||||||
|
Model.Zones.AddRenderPartial("menu", "menu", Model);
|
||||||
|
Model.Zones.AddRenderPartial("content:before", "messages", Model.Messages);
|
||||||
|
%>
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<div id="header">
|
<div id="header"><%
|
||||||
<div id="title"><%=Html.TitleForPage(Html.SiteName()) %></div><%
|
|
||||||
Model.Zones.AddRenderPartial("header", "user", Model);
|
|
||||||
Html.Zone("header");
|
Html.Zone("header");
|
||||||
Model.Zones.AddRenderPartial("menu", "menu", Model);
|
|
||||||
Html.Zone("menu"); %>
|
Html.Zone("menu"); %>
|
||||||
</div>
|
</div>
|
||||||
<div id="main"><%
|
<div id="main"><%
|
||||||
Html.ZoneBody("content");
|
Html.ZoneBody("content"); %>
|
||||||
%> <div id="footer"><%
|
<div id="footer"><%
|
||||||
Html.Zone("footer");
|
Html.Zone("footer");
|
||||||
%></div>
|
%></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -172,7 +172,6 @@
|
|||||||
<Content Include="Themes\TheAdmin\Theme.gif" />
|
<Content Include="Themes\TheAdmin\Theme.gif" />
|
||||||
<Content Include="Themes\TheAdmin\Theme.txt" />
|
<Content Include="Themes\TheAdmin\Theme.txt" />
|
||||||
<Content Include="Themes\TheAdmin\Views\layout.ascx" />
|
<Content Include="Themes\TheAdmin\Views\layout.ascx" />
|
||||||
<Content Include="Themes\TheAdmin\Views\Shared\document.aspx" />
|
|
||||||
<Content Include="Views\Templates\ThreeColumns.aspx" />
|
<Content Include="Views\Templates\ThreeColumns.aspx" />
|
||||||
<Content Include="Views\Templates\TwoColumns.aspx" />
|
<Content Include="Views\Templates\TwoColumns.aspx" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@@ -192,6 +191,9 @@
|
|||||||
<Content Include="Themes\Green\Views\footer.ascx" />
|
<Content Include="Themes\Green\Views\footer.ascx" />
|
||||||
<Content Include="Themes\Green\Views\layout.ascx" />
|
<Content Include="Themes\Green\Views\layout.ascx" />
|
||||||
<Content Include="Themes\Green\Views\menu.ascx" />
|
<Content Include="Themes\Green\Views\menu.ascx" />
|
||||||
|
<Content Include="Themes\TheAdmin\Views\menu.ascx" />
|
||||||
|
<Content Include="Themes\TheAdmin\Views\user.ascx" />
|
||||||
|
<Content Include="Themes\TheAdmin\Views\header.ascx" />
|
||||||
<Content Include="Themes\Web.config" />
|
<Content Include="Themes\Web.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -332,6 +332,52 @@ div#title
|
|||||||
font-size:95%;
|
font-size:95%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Confirmations, Messages and the like
|
||||||
|
----------------------------------------------------------*/
|
||||||
|
.message, .validation-summary-errors {
|
||||||
|
margin:10px 0 4px 0;
|
||||||
|
padding:4px;
|
||||||
|
}
|
||||||
|
span.message {
|
||||||
|
display:block;
|
||||||
|
margin:4px 0 4px 4px;
|
||||||
|
}
|
||||||
|
.message a {
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirmation.message {
|
||||||
|
background:#e6f1c9; /* green */
|
||||||
|
border:1px solid #cfe493;
|
||||||
|
}
|
||||||
|
.warning.message {
|
||||||
|
background:#fdf5bc; /* yellow */
|
||||||
|
border:1px solid #ffea9b;
|
||||||
|
}
|
||||||
|
/* todo: (heskew) what else (other inputs) needs this? */
|
||||||
|
.critical.message, .validation-summary-errors,
|
||||||
|
.input-validation-error.text-box, .input-validation-error.text {
|
||||||
|
border:1px solid #990808;
|
||||||
|
}
|
||||||
|
.critical.message, .validation-summary-errors {
|
||||||
|
background:#e68585; /* red */
|
||||||
|
color:#fff;
|
||||||
|
}
|
||||||
|
.info.message {
|
||||||
|
background:#fff; /* orange :P */
|
||||||
|
border:1px dashed #D2D6C6;
|
||||||
|
}
|
||||||
|
.debug.message {
|
||||||
|
background:#eee;
|
||||||
|
border:1px dashed #D2D6C6;
|
||||||
|
color:#7a7a7a;
|
||||||
|
margin:20px 0 14px 0;
|
||||||
|
}
|
||||||
|
.debug.message:before {
|
||||||
|
content:"DEBUG » ";
|
||||||
|
}
|
||||||
|
|
||||||
/* Icon buttons
|
/* Icon buttons
|
||||||
----------------------------------------------------------*/
|
----------------------------------------------------------*/
|
||||||
a.ibutton, a.ibutton:link, a.ibutton:visited {
|
a.ibutton, a.ibutton:link, a.ibutton:visited {
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BaseViewModel>" %>
|
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BaseViewModel>" %>
|
||||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%><%
|
<%@ Import Namespace="Orchard.Mvc.ViewModels"%><%
|
||||||
Html.RegisterStyle("site.css"); %>
|
Html.RegisterStyle("site.css");
|
||||||
|
Model.Zones.AddRenderPartial("header", "header", Model);
|
||||||
|
Model.Zones.AddRenderPartial("header:after", "user", Model);
|
||||||
|
Model.Zones.AddRenderPartial("menu", "menu", Model);
|
||||||
|
Model.Zones.AddRenderPartial("content:before", "messages", Model.Messages);
|
||||||
|
%>
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<div id="header">
|
<div id="header"><%
|
||||||
<div id="title"><%=Html.TitleForPage(Html.SiteName()) %></div><%
|
|
||||||
Model.Zones.AddRenderPartial("header", "user", Model);
|
|
||||||
Html.Zone("header");
|
Html.Zone("header");
|
||||||
Model.Zones.AddRenderPartial("menu", "menu", Model);
|
|
||||||
Html.Zone("menu"); %>
|
Html.Zone("menu"); %>
|
||||||
</div>
|
</div>
|
||||||
<div id="main"><%
|
<div id="main"><%
|
||||||
Model.Zones.AddRenderPartial("content:-1", "messages", Model.Messages);
|
Html.ZoneBody("content"); %>
|
||||||
Html.ZoneBody("content");
|
<div id="footer"><%
|
||||||
%> <div id="footer"><%
|
|
||||||
Html.Zone("footer");
|
Html.Zone("footer");
|
||||||
%></div>
|
%></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<BaseViewModel>" %>
|
|
||||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
|
||||||
<%@ Import Namespace="Orchard.Mvc.Html"
|
|
||||||
%><!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
|
||||||
<title><%=Html.Title() %></title><%
|
|
||||||
Html.Zone("head", ":metas :styles :scripts"); %>
|
|
||||||
</head>
|
|
||||||
<body><%
|
|
||||||
Html.ZoneBody("body"); %>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
4
src/Orchard.Web/Themes/TheAdmin/Views/header.ascx
Normal file
4
src/Orchard.Web/Themes/TheAdmin/Views/header.ascx
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<AdminViewModel>" %>
|
||||||
|
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||||
|
<h1><%=Html.ActionLink("Project Orchard", "Index", new { Area = "", Controller = "Home" })%></h1>
|
||||||
|
<div id="site"><%=Html.ActionLink("Your Site", "Index", new { Area = "", Controller = "Home" })%></div>
|
||||||
@@ -1,41 +1,16 @@
|
|||||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<AdminViewModel>" %>
|
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<AdminViewModel>" %>
|
||||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
<%@ Import Namespace="Orchard.Mvc.Html"%><%
|
||||||
<%
|
Html.RegisterStyle("site.css");
|
||||||
Html.RegisterStyle("site.css"); %>
|
Model.Zones.AddRenderPartial("header", "header", Model);
|
||||||
<div id="header" role="banner">
|
Model.Zones.AddRenderPartial("header:after", "user", Model); // todo: (heskew) should be a user display or widget
|
||||||
<h1><%=Html.ActionLink("Project Orchard", "Index", new { Area = "", Controller = "Home" })%></h1>
|
Model.Zones.AddRenderPartial("menu", "menu", Model);
|
||||||
<div id="site"><%=Html.ActionLink("Your Site", "Index", new { Area = "", Controller = "Home" })%></div>
|
Model.Zones.AddRenderPartial("content:before", "messages", Model.Messages);
|
||||||
<% if (Model.CurrentUser != null) { //todo: (heskew) localize the string format "User: <username> | a:logoff"
|
%>
|
||||||
%><div id="login"><%="User"%>: <%=Html.Encode(Model.CurrentUser.UserName)%> | <%=Html.ActionLink("Logout", "LogOff", new { Area = "", Controller = "Account" }) %></div><%
|
<div id="header" role="banner"><% Html.Zone("header"); %></div>
|
||||||
} %>
|
|
||||||
</div>
|
|
||||||
<div id="content">
|
<div id="content">
|
||||||
<div id="navshortcut"><a href="#navigation"><%="Skip to navigation" %></a></div>
|
<div id="navshortcut"><a href="#menu"><%="Skip to navigation" %></a></div>
|
||||||
<div id="main" role="main">
|
<div id="main" role="main"><% Html.ZoneBody("content"); %></div>
|
||||||
<div class="wrapper">
|
<div id="menu"><% Html.Zone("menu"); %></div>
|
||||||
<% Html.RenderPartial("Messages", Model.Messages); %>
|
|
||||||
</div><%
|
|
||||||
Html.ZoneBody("content");
|
|
||||||
%> </div>
|
|
||||||
<ul id="navigation" role="navigation">
|
|
||||||
<li class="first"><h4><span>Dashboard</span></h4></li>
|
|
||||||
<%if (Model.AdminMenu != null) {
|
|
||||||
foreach (var menuSection in Model.AdminMenu) {
|
|
||||||
// todo: (heskew) need some help(er)
|
|
||||||
var firstSectionItem = menuSection.Items.FirstOrDefault();
|
|
||||||
var sectionHeaderMarkup = firstSectionItem != null
|
|
||||||
? Html.ActionLink(menuSection.Text, (string)firstSectionItem.RouteValues["action"], firstSectionItem.RouteValues).ToHtmlString()
|
|
||||||
: string.Format("<span>{0}</span>", Html.Encode(menuSection.Text));
|
|
||||||
%>
|
|
||||||
<li><h4><%=sectionHeaderMarkup%></h4><ul><%foreach (var menuItem in menuSection.Items) { %>
|
|
||||||
<li><%=Html.ActionLink(menuItem.Text, (string)menuItem.RouteValues["action"], menuItem.RouteValues)%></li>
|
|
||||||
<%} %></ul></li>
|
|
||||||
<%
|
|
||||||
}
|
|
||||||
}%>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="footer" role="contentinfo"><%
|
<div id="footer" role="contentinfo"><% Html.Zone("footer"); %></div>
|
||||||
Html.Zone("footer");
|
|
||||||
%></div>
|
|
||||||
19
src/Orchard.Web/Themes/TheAdmin/Views/menu.ascx
Normal file
19
src/Orchard.Web/Themes/TheAdmin/Views/menu.ascx
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<AdminViewModel>" %>
|
||||||
|
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||||
|
<ul id="navigation" role="navigation">
|
||||||
|
<li class="first"><h4><span>Dashboard</span></h4></li>
|
||||||
|
<%if (Model.AdminMenu != null) {
|
||||||
|
foreach (var menuSection in Model.AdminMenu) {
|
||||||
|
// todo: (heskew) need some help(er)
|
||||||
|
var firstSectionItem = menuSection.Items.FirstOrDefault();
|
||||||
|
var sectionHeaderMarkup = firstSectionItem != null
|
||||||
|
? Html.ActionLink(menuSection.Text, (string)firstSectionItem.RouteValues["action"], firstSectionItem.RouteValues).ToHtmlString()
|
||||||
|
: string.Format("<span>{0}</span>", Html.Encode(menuSection.Text));
|
||||||
|
%>
|
||||||
|
<li><h4><%=sectionHeaderMarkup%></h4><ul><%foreach (var menuItem in menuSection.Items) { %>
|
||||||
|
<li><%=Html.ActionLink(menuItem.Text, (string)menuItem.RouteValues["action"], menuItem.RouteValues)%></li>
|
||||||
|
<%} %></ul></li>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
}%>
|
||||||
|
</ul>
|
||||||
5
src/Orchard.Web/Themes/TheAdmin/Views/user.ascx
Normal file
5
src/Orchard.Web/Themes/TheAdmin/Views/user.ascx
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<AdminViewModel>" %>
|
||||||
|
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||||
|
<% if (Model.CurrentUser != null) { //todo: (heskew) localize the string format "User: <username> | a:logoff"
|
||||||
|
%><div id="login"><%="User"%>: <%=Html.Encode(Model.CurrentUser.UserName)%> | <%=Html.ActionLink("Logout", "LogOff", new { Area = "", Controller = "Account" }) %></div><%
|
||||||
|
} %>
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
<%@ Import Namespace="Orchard.Mvc.ViewModels"%>
|
||||||
<h2><%=Html.TitleForPage("Log On") %></h2>
|
<h2><%=Html.TitleForPage("Log On") %></h2>
|
||||||
<p>Please enter your username and password. <%= Html.ActionLink("Register", "Register") %> if you don't have an account.</p>
|
<p>Please enter your username and password. <%= Html.ActionLink("Register", "Register") %> if you don't have an account.</p>
|
||||||
<% if (Model != null && Model.Messages != null) Html.RenderPartial("Messages", Model.Messages); %>
|
|
||||||
<%= Html.ValidationSummary("Login was unsuccessful. Please correct the errors and try again.") %>
|
<%= Html.ValidationSummary("Login was unsuccessful. Please correct the errors and try again.") %>
|
||||||
|
|
||||||
<% using (Html.BeginFormAntiForgeryPost()) { %>
|
<% using (Html.BeginFormAntiForgeryPost()) { %>
|
||||||
|
|||||||
Reference in New Issue
Block a user