Skip to content

Commit f0ca64a

Browse files
committed
Introduced initial views
These are the same views as used in the `Ignia.Topics.AspNetCore.Mvc.Host` file, except a) they use a `web.config` instead of a `_ViewImports.cshtml`, b) they don't include the `/Components` directory, and c) they use `@Html.Partial()` instead of the new `<partial />` tag helper.
1 parent c4ecae2 commit f0ca64a

13 files changed

Lines changed: 181 additions & 1 deletion

Ignia.Topics.Web.Mvc.Host/Ignia.Topics.Web.Mvc.Host.csproj

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,17 @@
115115
<Content Include="Views\web.config" />
116116
<Content Include="Configuration\ConnectionStrings.config" />
117117
<None Include="packages.config" />
118+
<Content Include="Views\ContentList\Accordion.cshtml" />
119+
<Content Include="Views\ContentList\ContentList.cshtml" />
120+
<Content Include="Views\ContentList\IndexedList.cshtml" />
121+
<Content Include="Views\ContentList\LinkedList.cshtml" />
122+
<Content Include="Views\ContentTypes\Page.cshtml" />
123+
<Content Include="Views\ContentTypes\PageGroup.cshtml" />
124+
<Content Include="Views\ContentTypes\Video.cshtml" />
125+
<Content Include="Views\Layout\_Layout.cshtml" />
126+
<Content Include="Views\Shared\_PageAttributes.cshtml" />
127+
<Content Include="Views\Shared\_TopicAttributes.cshtml" />
128+
<Content Include="Views\_ViewStart.cshtml" />
118129
<None Include="Web.Debug.config">
119130
<DependentUpon>Web.config</DependentUpon>
120131
</None>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@Html.Partial("~/Views/ContentList/ContentList.cshtml")
2+
3+
<!--
4+
Content Type: Content List
5+
View Type: Accordion
6+
View Location: ~/Views/ContentList/Accordion.cshtml
7+
-->
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
@model ContentListTopicViewModel
2+
3+
<partial name="_PageAttributes" />
4+
5+
<h2>Collections</h2>
6+
7+
<h3>Categories</h3>
8+
<ul>
9+
@foreach (var category in Model.Categories) {
10+
<li>@category.Title</li>
11+
}
12+
</ul>
13+
14+
<h3>Content Items</h3>
15+
@foreach (var contentItem in Model.ContentItems) {
16+
<h4>@contentItem.Key</h4>
17+
<ul>
18+
<li>Title: @contentItem.Title</li>
19+
<li>Category: @contentItem.Category</li>
20+
<li><a href="@contentItem.LearnMoreUrl">Learn More</a></li>
21+
<li><img src="@contentItem.ThumbnailImage" /></li>
22+
<li>Description: @contentItem.Description</li>
23+
</ul>
24+
}
25+
26+
<!--
27+
Content Type: Content List
28+
View Type: Accordion
29+
View Location: ~/Views/ContentList/Accordion.cshtml
30+
-->
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@Html.PartialAsync("~/Views/ContentList/ContentList.cshtml")
2+
3+
<!--
4+
Content Type: Content List
5+
View Type: Indexed List
6+
View Location: ~/Views/ContentList/IndexedList.cshtml
7+
-->
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@Html.Partial("~/Views/ContentList/ContentList.cshtml")
2+
3+
<!--
4+
Content Type: Content List
5+
View Type: Linked List
6+
View Location: ~/Views/ContentList/LinkedList.cshtml
7+
-->
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@model PageTopicViewModel
2+
3+
@Html.Partial("_PageAttributes")
4+
5+
<!--
6+
Content Type: Page
7+
View Location: ~/ContentTypes/Page.cshtml
8+
-->
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@model PageGroupTopicViewModel
2+
3+
<!--
4+
Content Type: PageGroup
5+
View Location: ~/ContentTypes/PageGroup.cshtml
6+
-->
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@model VideoTopicViewModel
2+
3+
@Html.Partial("_PageAttributes")
4+
5+
<h2>Attributes</h2>
6+
<ul>
7+
<li><a href="@Model.PosterUrl">Poster URL</a></li>
8+
<li><a href="@Model.VideoUrl">Video URL</a></li>
9+
</ul>
10+
11+
<!--
12+
Content Type: Video
13+
View Location: ~/Views/ContentTypes/Video.cshtml
14+
-->
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
@model PageTopicViewModel
2+
3+
<html>
4+
<head>
5+
<meta charset="UTF-8">
6+
<title>@(Model.MetaTitle?? Model.Title?? Model.Key)</title>
7+
<meta name="keywords" content="@Model.MetaKeywords" />
8+
<meta name="description" content="@Model.MetaDescription" />
9+
@RenderSection("Head", false)
10+
</head>
11+
<body vocab="http://schema.org/" typeof="WebPage">
12+
13+
<!-- Site Navigation Area -->
14+
<navigation id="SiteNavigation">
15+
<vc:menu />
16+
</navigation>
17+
<!-- /Site Navigation Area -->
18+
19+
<!-- Main Site Content Area -->
20+
<main id="MainContentArea" class="page content" role="main">
21+
22+
<!-- Page Header Area -->
23+
<section id="PageHeaderSection">
24+
<vc:page-level-navigation />
25+
</section>
26+
<!-- /Page Header Area -->
27+
28+
<article itemscope itemtype="http://schema.org/WebPageElement" itemprop="mainContentOfPage" class="grid-container">
29+
<h1>@(Model.ContentType.Equals("PageGroup")? "Overview" : Model.Title)</h1>
30+
<p class="subtitle">@Model.Subtitle</p>
31+
<section class="body">
32+
@Html.Partial("_TopicAttributes")
33+
@RenderBody()
34+
</section>
35+
</article>
36+
</main>
37+
<!-- /Main Site Content Area -->
38+
39+
@RenderSection("Scripts", false)
40+
41+
</body>
42+
</html>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@model PageTopicViewModel
2+
3+
<h2>Attributes</h2>
4+
<ul>
5+
<li>MetaDescription: @Model.MetaDescription</li>
6+
<li>MetaKeywords: @Model.MetaKeywords</li>
7+
<li>MetaTitle: @Model.MetaTitle</li>
8+
<li>NoIndex? @Model.NoIndex</li>
9+
<li>ShortTitle: @Model.ShortTitle</li>
10+
<li>SubTitle: @Model.Subtitle</li>
11+
</ul>
12+
13+
<h2>Body</h2>
14+
@Html.Raw(Model.Body)
15+
16+
<!--
17+
Content Type: PageTopicViewModel
18+
View Location: ~/Views/Shared/_PageAttributes.cshtml
19+
-->

0 commit comments

Comments
 (0)