mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Merge
--HG-- branch : dev
This commit is contained in:
@@ -40,4 +40,7 @@
|
||||
<div id="footer" role="contentinfo">
|
||||
@Display(Model.Footer)</div>
|
||||
|
||||
@* tmp *@
|
||||
<div style="background:#666;color:#daf2f6;margin:10px;padding:10px;font:12px/18px Consolas,'Lucida Console','Bitstream Vera Sans Mono','DejaVu Sans Mono',monospace;">
|
||||
@Display.DumpShapeTable()
|
||||
</div>
|
@@ -63,7 +63,7 @@ header, footer, aside, nav, article {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.group {display: inline-block;} /* for IE/Mac */
|
||||
/*.group {display: inline-block;}*/ /* for IE/Mac */
|
||||
|
||||
/* Typography (Optional)
|
||||
***************************************************************/
|
||||
@@ -102,36 +102,101 @@ h4 img, h5 img, h6 img {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size:1.2em;
|
||||
p, .meta {
|
||||
font-size:1.3em;
|
||||
line-height:2em;
|
||||
}
|
||||
|
||||
/* Structure
|
||||
***************************************************************/
|
||||
#layout-wrapper {
|
||||
#layout-header, #layout-content, #layout-footer {
|
||||
width:960px;
|
||||
margin:0 auto;
|
||||
}
|
||||
|
||||
#header {}
|
||||
#logo {}
|
||||
|
||||
#layout-header {
|
||||
border:1px solid #ff0000;
|
||||
background: #53a4ca;
|
||||
}
|
||||
|
||||
#branding a {
|
||||
color:#fff;
|
||||
text-decoration:none;
|
||||
padding:48px 12px;
|
||||
}
|
||||
|
||||
|
||||
#layout-wrapper {
|
||||
border:1px solid #CCC;
|
||||
}
|
||||
|
||||
/* Sidebar off - Content Zone 960 */
|
||||
#content {
|
||||
clear:both;
|
||||
/*padding:12px;*/
|
||||
}
|
||||
|
||||
/*Right Sidebar on - Content Zone 600 */
|
||||
.has-sidebar #content {
|
||||
background-color:#e8e8e8;
|
||||
width: 600px;
|
||||
/*padding:12px 6px 6px 12px;*/
|
||||
float:left;
|
||||
clear:both;
|
||||
}
|
||||
|
||||
/*Left Sidebar on - Content Zone 600
|
||||
|
||||
.has-sidebar #content {
|
||||
float:right;
|
||||
}*/
|
||||
|
||||
.sidebar {
|
||||
background-color:#f6f6f6;
|
||||
width: 360px;
|
||||
float:right;
|
||||
}
|
||||
|
||||
#sitemap {
|
||||
clear:both;
|
||||
}
|
||||
|
||||
|
||||
/* Navigation */
|
||||
|
||||
nav ul li {
|
||||
margin:2em 0 0 0;
|
||||
float:left;
|
||||
}
|
||||
|
||||
nav ul li a {
|
||||
font-size:1.4em;
|
||||
margin:0 1.8em;
|
||||
#navigation {
|
||||
width: 960px;
|
||||
margin: 4px auto;
|
||||
display:block;
|
||||
text-decoration:none;
|
||||
text-transform:uppercase;
|
||||
float:left;
|
||||
border-bottom: 1px solid #999;
|
||||
}
|
||||
|
||||
nav ul {
|
||||
padding: 0 0 0 8px;
|
||||
}
|
||||
|
||||
nav ul li
|
||||
{
|
||||
border:1px solid #999;
|
||||
background:#e7e7e7;
|
||||
display:block;
|
||||
float:left;
|
||||
margin:0 2px -1px 0;
|
||||
}
|
||||
|
||||
nav ul li.on {
|
||||
border-bottom: 1px solid #fff;
|
||||
background:#fff;
|
||||
}
|
||||
|
||||
nav ul a {
|
||||
padding:0 18px;
|
||||
display:block;
|
||||
float:left;
|
||||
font-size:1.4em;
|
||||
text-decoration:none;
|
||||
line-height:24px;
|
||||
}
|
||||
|
||||
#footer {}
|
||||
@@ -145,37 +210,84 @@ 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
|
||||
***************************************************************/
|
||||
|
||||
/* For testing purposes */
|
||||
|
||||
#layout-wrapper {
|
||||
border:1px solid #CCC;
|
||||
|
||||
|
||||
|
||||
|
||||
.zone {
|
||||
/*padding:6px;*/
|
||||
}
|
||||
|
||||
|
||||
/* Sidebar off - Content Zone 960 */
|
||||
#content {
|
||||
background-color:#e8e8e8;
|
||||
width: 960px;
|
||||
clear:both;
|
||||
/* Featured Zone - switch to an image */
|
||||
|
||||
.featuredimage {
|
||||
float:left;
|
||||
border: 1px solid #ccc;
|
||||
width: 462px;
|
||||
height: 240px;
|
||||
margin: 6px;
|
||||
}
|
||||
|
||||
/* Sidebar on - Content Zone 640 */
|
||||
.icanhassidebar #content {
|
||||
background-color:#e8e8e8;
|
||||
width: 640px;
|
||||
float:left;
|
||||
clear:both;
|
||||
/* Recent Zone */
|
||||
|
||||
#zone-recent ul li {
|
||||
float:left;
|
||||
width: 462px;
|
||||
margin: 6px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
background-color:#f6f6f6;
|
||||
width: 320px;
|
||||
float:right;
|
||||
}
|
||||
|
||||
#sitemap {
|
||||
clear:both;
|
||||
.clearfix {
|
||||
clear:both;
|
||||
}
|
@@ -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
|
||||
Zones: Header, Navigation, Messages, Featured, Recent, Footer
|
@@ -0,0 +1 @@
|
||||
Chili
|
15
src/Orchard.Web/Themes/TheThemeMachine/Views/Featured.cshtml
Normal file
15
src/Orchard.Web/Themes/TheThemeMachine/Views/Featured.cshtml
Normal file
@@ -0,0 +1,15 @@
|
||||
<!-- zone: featured -->
|
||||
<div class="featuredimage">Image</div>
|
||||
<article class="featured-blogpost">
|
||||
<header>
|
||||
<!-- // example // -->
|
||||
@if(HasText(Model.Title)) {
|
||||
<h1>@Model.Title</h1>
|
||||
}
|
||||
else {
|
||||
<h1>@Model.insertMessage</h1>
|
||||
}
|
||||
</header>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ultrices vehicula nibh quis varius. Donec tincidunt, purus at tincidunt elementum, justo nisi rhoncus metus, quis bibendum lorem nunc at dolor. Sed scelerisque aliquet leo sed semper. Donec accumsan, nibh at consectetur rhoncus, odio justo imperdiet risus, quis pretium tortor dolor vel dolor.</p>
|
||||
</article>
|
||||
<!-- /zone: featured -->
|
@@ -0,0 +1,79 @@
|
||||
@{
|
||||
Style.Include("site.css");
|
||||
|
||||
// cool stuff goes up here
|
||||
var homeUrl = Href("~/");
|
||||
|
||||
// Zone is an alias for Display
|
||||
Func<dynamic, dynamic> Zone = x => Display(x);
|
||||
|
||||
if (Model.Sidebar != null) {
|
||||
Html.AddPageClassNames(new[]{"icanhassidebar"});
|
||||
}
|
||||
}
|
||||
<div id="layout-wrapper">
|
||||
<header id="layout-header">
|
||||
@* needs to be the page title, not page (head) title... *@
|
||||
<h1><a href="@homeUrl">@WorkContext.CurrentSite.SiteName</a></h1>
|
||||
@if(Model.Header != null) {
|
||||
<div id="header">
|
||||
@Zone(Model.Header)
|
||||
</div>
|
||||
}
|
||||
@if(Model.Navigation != null) {
|
||||
<div id="navigation">
|
||||
@Zone(Model.Navigation)
|
||||
</div>
|
||||
}
|
||||
</header>
|
||||
@if(Model.Messages != null) {
|
||||
<div id="messages">
|
||||
@Zone(Model.Messages)
|
||||
</div>
|
||||
}
|
||||
|
||||
@* 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) {
|
||||
<div id="featured" class="group">
|
||||
@Zone(Model.Featured)
|
||||
</div>
|
||||
}
|
||||
|
||||
@* the model content for the page is in the Content zone @ the default position (nothing, zero, zilch) *@
|
||||
@if(Model.Content == null) {
|
||||
<div id="content">
|
||||
@Zone(Model.Content)
|
||||
</div>
|
||||
}
|
||||
else {
|
||||
<div id="content">
|
||||
Let's take over the home page
|
||||
</div>
|
||||
}
|
||||
|
||||
@if(Model.Sidebar != null) {
|
||||
<aside class="sidebar">
|
||||
@Zone(Model.Sidebar)
|
||||
</aside>
|
||||
}
|
||||
|
||||
@if(Model.Footer != null) {
|
||||
<footer>
|
||||
@Zone(Model.Footer)
|
||||
</footer>
|
||||
}
|
||||
else {
|
||||
<footer id="sitemap">
|
||||
Powered by Orchard @Display.User()
|
||||
</footer>
|
||||
}
|
||||
|
||||
|
||||
</div>
|
@@ -0,0 +1,87 @@
|
||||
@{
|
||||
Style.Include("site.css");
|
||||
|
||||
// cool stuff goes up here
|
||||
var homeUrl = Href("~/");
|
||||
|
||||
// Zone is an alias for Display
|
||||
Func<dynamic, dynamic> Zone = x => Display(x);
|
||||
|
||||
if (Model.Sidebar != null) {
|
||||
Html.AddPageClassNames(new[]{"has-sidebar"});
|
||||
}
|
||||
}
|
||||
<div id="layout-wrapper">
|
||||
<header id="layout-header">
|
||||
@* needs to be the page title, not page (head) title... *@
|
||||
<h1><a href="@homeUrl">@WorkContext.CurrentSite.SiteName</a></h1>
|
||||
@if(Model.Header != null) {
|
||||
<div id="header">
|
||||
@Zone(Model.Header)
|
||||
</div>
|
||||
}
|
||||
@if(Model.Navigation != null) {
|
||||
<div id="navigation">
|
||||
@Zone(Model.Navigation)
|
||||
</div>
|
||||
}
|
||||
</header>
|
||||
@if(Model.Messages != null) {
|
||||
<div id="messages">
|
||||
@Zone(Model.Messages)
|
||||
</div>
|
||||
}
|
||||
|
||||
@* 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) {
|
||||
<div class="group">
|
||||
@Zone(Model.Featured)
|
||||
</div>
|
||||
}
|
||||
|
||||
@{
|
||||
WorkContext.Layout.Recent.Add(New.Recent());
|
||||
}
|
||||
@if(Model.Featured != null) {
|
||||
<div class="zone-featured zone group">
|
||||
@Zone(Model.Recent)
|
||||
</div>
|
||||
}
|
||||
|
||||
@* the model content for the page is in the Content zone @ the default position (nothing, zero, zilch) *@
|
||||
@if(Model.Content != null) {
|
||||
<div id="content" class="group">
|
||||
@Zone(Model.Content)
|
||||
</div>
|
||||
}
|
||||
else {
|
||||
<div id="content" class="group">
|
||||
Let's take over the home page
|
||||
</div>
|
||||
}
|
||||
|
||||
@if(Model.Sidebar != null) {
|
||||
<aside class="sidebar">
|
||||
@Zone(Model.Sidebar)
|
||||
</aside>
|
||||
}
|
||||
|
||||
@if(Model.Footer != null) {
|
||||
<footer>
|
||||
@Zone(Model.Footer)
|
||||
</footer>
|
||||
}
|
||||
else {
|
||||
<footer id="sitemap">
|
||||
Powered by Orchard @Display.User()
|
||||
</footer>
|
||||
}
|
||||
|
||||
|
||||
</div>
|
@@ -8,53 +8,110 @@
|
||||
Func<dynamic, dynamic> Zone = x => Display(x);
|
||||
|
||||
if (Model.Sidebar != null) {
|
||||
Html.AddPageClassNames(new[]{"icanhassidebar"});
|
||||
Model.Classes.Add("has-sidebar");
|
||||
}
|
||||
|
||||
WorkContext.Layout.Featured.Add(New.TempFeatured(Hello:"bob"));
|
||||
WorkContext.Layout.Featured.Add("just some text in featured");
|
||||
//Model.Attributes.Add("onclick", "javscript:alert('woot')");
|
||||
|
||||
Model.Id = "layout-wrapper";
|
||||
var tag = Tag (Model, "div");
|
||||
|
||||
}
|
||||
@Model.TitleFromMenu
|
||||
<div id="layout-wrapper">
|
||||
@Display.User()
|
||||
|
||||
@* Add a wrapping div around everything *@
|
||||
@tag.StartElement
|
||||
|
||||
@* needs to be the page title, not page (head) title... *@
|
||||
@* Adds text and html to the header zone *@
|
||||
|
||||
@using(Capture(branding => WorkContext.Layout.Header.Add(branding) )) {
|
||||
<h1 id="branding"><a href="@homeUrl">@WorkContext.CurrentSite.SiteName</a></h1>
|
||||
}
|
||||
|
||||
<header id="layout-header">
|
||||
@* needs to be the page title, not page (head) title... *@
|
||||
<h1><a href="@homeUrl">@WorkContext.CurrentSite.SiteName</a></h1>
|
||||
@if(Model.Header != null) {
|
||||
<div id="header">
|
||||
@Zone(Model.Header)
|
||||
</div>
|
||||
}
|
||||
</header>
|
||||
|
||||
|
||||
@if(Model.Navigation != null) {
|
||||
<div id="navigation">
|
||||
<div id="navigation" class="group">
|
||||
@Zone(Model.Navigation)
|
||||
</div>
|
||||
}
|
||||
</header>
|
||||
|
||||
|
||||
<div id="layout-content" class="group">
|
||||
@if(Model.Messages != null) {
|
||||
<div id="messages">
|
||||
@Zone(Model.Messages)
|
||||
</div>
|
||||
}
|
||||
@if(Model.Featured != null) {
|
||||
<div id="featured">
|
||||
|
||||
@* 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) {
|
||||
<div class="zone-featured group">
|
||||
@Zone(Model.Featured)
|
||||
</div>
|
||||
}
|
||||
|
||||
@{
|
||||
WorkContext.Layout.Recent.Add(New.Recent());
|
||||
}
|
||||
@if(Model.Featured != null) {
|
||||
<div class="group">
|
||||
@Zone(Model.Recent)
|
||||
</div>
|
||||
}
|
||||
|
||||
@{WorkContext.Layout.Sidebar1.Add("just some text in featured");}
|
||||
@if(Model.Sidebar1 != null) {
|
||||
<aside class="sidebar">
|
||||
@Zone(Model.Sidebar1)
|
||||
</aside>
|
||||
}
|
||||
|
||||
@* the model content for the page is in the Content zone @ the default position (nothing, zero, zilch) *@
|
||||
@if(Model.Content != null) {
|
||||
<div id="content">
|
||||
<div id="content" class="group">
|
||||
@Zone(Model.Content)
|
||||
</div>
|
||||
}
|
||||
else {
|
||||
<div id="content" class="group">
|
||||
Let's take over the home page
|
||||
</div>
|
||||
}
|
||||
|
||||
@if(Model.Sidebar != null) {
|
||||
<aside class="sidebar">
|
||||
@Zone(Model.Sidebar)
|
||||
</aside>
|
||||
}
|
||||
|
||||
<footer id="sitemap">
|
||||
Powered by Awesomeness...
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@{
|
||||
WorkContext.Layout.Footer.Add(@Display.User());
|
||||
}
|
||||
@if(Model.Footer != null) {
|
||||
<footer id="layout-footer" class="group">
|
||||
@Zone(Model.Footer)
|
||||
</footer>
|
||||
}
|
||||
else {
|
||||
<footer id="layout-footer">
|
||||
Powered by Orchard @Display.User()
|
||||
</footer>
|
||||
}
|
||||
|
||||
@tag.EndElement
|
@@ -3,7 +3,7 @@
|
||||
var items = (IEnumerable<dynamic>)Enumerable.Cast<dynamic>(Model);
|
||||
}
|
||||
@{
|
||||
if (HasText(Model.Text)) {
|
||||
if (!HasText(Model.Text)) {
|
||||
@DisplayChildren(Model)
|
||||
} else {
|
||||
<li><a href="@Model.Href">@Model.Text</a>
|
22
src/Orchard.Web/Themes/TheThemeMachine/Views/Recent.cshtml
Normal file
22
src/Orchard.Web/Themes/TheThemeMachine/Views/Recent.cshtml
Normal file
@@ -0,0 +1,22 @@
|
||||
<!-- zone: recent -->
|
||||
<section class="posts-recent">
|
||||
<ul>
|
||||
<li class="first">
|
||||
<article>
|
||||
<header>
|
||||
<h1>Another recent post title</h1>
|
||||
</header>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent magna ante, accumsan at blandit et, posuere imperdiet sapien. Praesent condimentum laoreet justo non semper. Cras molestie fermentum turpis, in ornare eros mollis non. Sed a ligula sit amet mauris ultrices hendrerit ac vitae quam. Integer sit amet lorem vitae velit accumsan suscipit. Nulla mi nulla, congue eget euismod eget, ultrices in mauris. Mauris leo turpis, malesuada mattis feugiat ut, convallis in neque. Maecenas iaculis consequat interdum. Sed fermentum dolor quis ante interdum in sollicitudin lorem sollicitudin. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
|
||||
</article>
|
||||
</li>
|
||||
<li class="last">
|
||||
<article>
|
||||
<header>
|
||||
<h1>Another recent post title</h1>
|
||||
</header>
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent magna ante, accumsan at blandit et, posuere imperdiet sapien. Praesent condimentum laoreet justo non semper. Cras molestie fermentum turpis, in ornare eros mollis non. Sed a ligula sit amet mauris ultrices hendrerit ac vitae quam. Integer sit amet lorem vitae velit accumsan suscipit. Nulla mi nulla, congue eget euismod eget, ultrices in mauris. Mauris leo turpis, malesuada mattis feugiat ut, convallis in neque. Maecenas iaculis consequat interdum. Sed fermentum dolor quis ante interdum in sollicitudin lorem sollicitudin. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
|
||||
</article>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- /zone: recent -->
|
@@ -1 +0,0 @@
|
||||
<h1>I am temp featured!! Hello, @Model.Hello</h1>
|
@@ -2,6 +2,8 @@
|
||||
@using Orchard.UI.Resources;
|
||||
@{
|
||||
RegisterLink(new LinkEntry {Type = "image/x-icon", Rel = "shortcut icon", Href = Url.Content("~/modules/orchard.themes/Content/orchard.ico")});
|
||||
//todo: (heskew) get conditions (as in conditional comments) hooked up for script tags too
|
||||
Script.Include("html5.js").AtLocation(ResourceLocation.Head);
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="static @Html.ClassForPage()">
|
Reference in New Issue
Block a user