mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 11:44:58 +08:00
More progress on defining new UI capabilities.
--HG-- branch : dev
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
@//Model.Zones.AddRenderPartial("head:before", "HeadPreload", Model);
|
@//Model.Zones.AddRenderPartial("head:before", "HeadPreload", Model);
|
||||||
@//Html.Zone("head", ":metas :styles :scripts"); %>
|
@//Html.Zone("head", ":metas :styles :scripts"); %>
|
||||||
@Display(Model.Head)
|
@Display(Model.Head)
|
||||||
<script>(function(d){d.className="dyn "+d.className.substring(7,d.length);})(document.documentElement);</script>
|
<script>(function(d){d.className="dyn"+d.className.substring(6,d.className.length);})(document.documentElement);</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@Display(Model.Body)
|
@Display(Model.Body)
|
||||||
|
@@ -113,6 +113,7 @@
|
|||||||
<Content Include="Themes\TheThemeMachine\draft.html" />
|
<Content Include="Themes\TheThemeMachine\draft.html" />
|
||||||
<Content Include="Themes\TheThemeMachine\Theme.png" />
|
<Content Include="Themes\TheThemeMachine\Theme.png" />
|
||||||
<Content Include="Themes\TheThemeMachine\Theme.txt" />
|
<Content Include="Themes\TheThemeMachine\Theme.txt" />
|
||||||
|
<None Include="Themes\TheThemeMachine\Views\Document.cshtml" />
|
||||||
<Content Include="Web.config">
|
<Content Include="Web.config">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Content>
|
</Content>
|
||||||
@@ -285,11 +286,10 @@
|
|||||||
<Content Include="Themes\TheAdmin\Views\User.cshtml" />
|
<Content Include="Themes\TheAdmin\Views\User.cshtml" />
|
||||||
<Content Include="Themes\TheAdmin\Views\Header.cshtml" />
|
<Content Include="Themes\TheAdmin\Views\Header.cshtml" />
|
||||||
<Content Include="Themes\Web.config" />
|
<Content Include="Themes\Web.config" />
|
||||||
<Content Include="Themes\TheThemeMachine\Views\Layout.cshtml" />
|
<None Include="Themes\TheThemeMachine\Views\Layout.cshtml" />
|
||||||
<Content Include="Themes\TheThemeMachine\Views\Zone.cshtml" />
|
<None Include="Themes\TheThemeMachine\Views\Menu.cshtml">
|
||||||
<Content Include="Themes\TheThemeMachine\Views\Zone-Sidebar.cshtml" />
|
<SubType>Designer</SubType>
|
||||||
<Content Include="Themes\TheThemeMachine\Views\Zone-Navigation.cshtml" />
|
</None>
|
||||||
<Content Include="Themes\TheThemeMachine\Views\Menu.cshtml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="App_Data\" />
|
<Folder Include="App_Data\" />
|
||||||
|
19
src/Orchard.Web/Themes/TheThemeMachine/Views/Document.cshtml
Normal file
19
src/Orchard.Web/Themes/TheThemeMachine/Views/Document.cshtml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
@using Orchard.Mvc.Html
|
||||||
|
@using Orchard.UI.Resources
|
||||||
|
@{
|
||||||
|
RegisterLink(new LinkEntry {Type = "image/x-icon", Rel = "shortcut icon", Href = Url.Content("~/modules/orchard.themes/Content/orchard.ico")});
|
||||||
|
}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" class="static @Html.ClassForPage()">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>@Model.Title</title>
|
||||||
|
@Display(Model.Head)
|
||||||
|
<script>(function(d){d.className="dyn"+d.className.substring(6,d.className.length);})(document.documentElement);</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
@// Layout (template) is in the Body zone @ the default position (nothing, zero, zilch)
|
||||||
|
@Display(Model.Body)
|
||||||
|
@Display(Model.Tail)
|
||||||
|
</body>
|
||||||
|
</html>
|
@@ -1,34 +1,49 @@
|
|||||||
@using Orchard.UI.Resources
|
@{
|
||||||
@{
|
// cool stuff goes up here
|
||||||
Style.Include("~/themes/Classic/styles/site.css");
|
var homeUrl = Href("~/");
|
||||||
Style.Include("~/themes/Classic/styles/blog.css");
|
|
||||||
}
|
|
||||||
<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">
|
// Zone is an alias for Display
|
||||||
<div id="content">
|
Func<dynamic, dynamic> Zone = x => Display(x);
|
||||||
@// Main Content
|
}
|
||||||
@Display(Model.Content)
|
<div id="layout-wrapper">
|
||||||
|
<header id="layout-header">
|
||||||
|
@// needs to be the page title, not page (head) title...
|
||||||
|
<h1><a href="@homeUrl">@Model.Title</a></h1>
|
||||||
|
@if(Model.Header != null) {
|
||||||
|
<div id="header">
|
||||||
|
@Zone(Model.Header)
|
||||||
</div>
|
</div>
|
||||||
<div id="sidebar">
|
}
|
||||||
@Display(Model.search)
|
@if(Model.Navigation != null) {
|
||||||
@Display(Model.sidebar)
|
<div id="navigation">
|
||||||
|
@Zone(Model.Navigation)
|
||||||
</div>
|
</div>
|
||||||
@// End Content
|
}
|
||||||
@Display.Footer(Navigation:Model.Navigation)
|
</header>
|
||||||
|
@if(Model.Messages != null) {
|
||||||
|
<div id="messages">
|
||||||
|
@Zone(Model.Messages)
|
||||||
</div>
|
</div>
|
||||||
</div>
|
}
|
||||||
|
@if(Model.Featured != null) {
|
||||||
|
<div id="featured">
|
||||||
|
@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>
|
||||||
|
}
|
||||||
|
@if(Model.Sidebar != null) {
|
||||||
|
<aside>
|
||||||
|
@Zone(Model.Sidebar)
|
||||||
|
</aside>
|
||||||
|
}
|
||||||
|
@if(Model.Footer != null) {
|
||||||
|
<footer>
|
||||||
|
@Zone(Model.Footer)
|
||||||
|
</footer>
|
||||||
|
}
|
||||||
|
</div>
|
@@ -1,13 +1,13 @@
|
|||||||
<!-- Model is Model.Menu from the layout (Page.Menu) -->
|
<!-- Model is Model.Menu from the layout (Page.Menu) -->
|
||||||
<nav>
|
<nav>
|
||||||
<ul>
|
@{
|
||||||
<li class="first current"><a href="#">Home</a></li>
|
// these should move somewhere else
|
||||||
<li><a href="#">Blog</a></li>
|
Model.Id = "menu-" + Model.MenuName.ToLower();
|
||||||
<li><a href="#">About</a></li>
|
Model.Classes.Add(Model.Id);
|
||||||
<li><a href="#">Full Page</a></li>
|
Model.Classes.Add("menu");
|
||||||
<li><a href="#">Image Page</a></li>
|
var tag = Html.Resolve<Orchard.DisplayManagement.Shapes.ITagBuilderFactory>().Create(Model, "ul");
|
||||||
<li><a href="#">Gallery Page</a></li>
|
}
|
||||||
<li><a href="#">Nested Page</a></li>
|
@tag.StartElement
|
||||||
<li class="last"><a href="#">Contact</a></li>
|
@DisplayChildren(Model)
|
||||||
</ul>
|
@tag.EndElement <!-- /@Model.Id -->
|
||||||
</nav>
|
</nav>
|
@@ -1,3 +0,0 @@
|
|||||||
<div class="zone zone-@Model.ZoneName">
|
|
||||||
@Display...
|
|
||||||
</div>
|
|
@@ -1,3 +0,0 @@
|
|||||||
<div class="zone zone-@Model.ZoneName">
|
|
||||||
@Display...
|
|
||||||
</div>
|
|
@@ -1,4 +0,0 @@
|
|||||||
|
|
||||||
<div class="zone zone-@Model.ZoneName">
|
|
||||||
@Display...
|
|
||||||
</div>
|
|
Reference in New Issue
Block a user