-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
993fe77
commit 4d760b3
Showing
20 changed files
with
311 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@page | ||
@model Opw.PineBlog.Sample.Areas.Admin.Pages.IndexModel | ||
@{ | ||
} | ||
<div class="container"> | ||
<h1>Admin</h1> | ||
<p>Admin index page.</p> | ||
</div> |
16 changes: 16 additions & 0 deletions
16
samples/Opw.PineBlog.Sample/Areas/Admin/Pages/Index.cshtml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc.RazorPages; | ||
|
||
namespace Opw.PineBlog.Sample.Areas.Admin.Pages | ||
{ | ||
public class IndexModel : PageModel | ||
{ | ||
public void OnGet() | ||
{ | ||
} | ||
} | ||
} |
19 changes: 18 additions & 1 deletion
19
samples/Opw.PineBlog.Sample/Areas/Admin/Pages/Shared/_AdminLayout.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,21 @@ | ||
@{ | ||
Layout = "~/Pages/Shared/_AdminLayout.cshtml"; | ||
Layout = "~/Pages/Shared/_Layout.cshtml"; | ||
} | ||
@section head { | ||
<environment include="Development"> | ||
<link rel="stylesheet" href="~/themes/default/css/admin.css"> | ||
</environment> | ||
<environment exclude="Development"> | ||
<link rel="stylesheet" href="~/themes/default/css/admin.min.css" asp-append-version="true"> | ||
</environment> | ||
} | ||
@section scripts { | ||
<environment include="Development"> | ||
<script src="~/themes/default/js/admin.js" asp-append-version="true"></script> | ||
</environment> | ||
<environment exclude="Development"> | ||
<script src="~/themes/default/js/admin.min.js" asp-append-version="true"></script> | ||
</environment> | ||
} | ||
<partial name="_Header" /> | ||
@RenderBody() |
16 changes: 16 additions & 0 deletions
16
samples/Opw.PineBlog.Sample/Areas/Admin/Pages/Shared/_Header.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark"> | ||
<div class="container"> | ||
<a class="navbar-brand" href="~/admin">Admin</a> | ||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
|
||
<div class="collapse navbar-collapse" id="navbarSupportedContent"> | ||
<ul class="navbar-nav mr-auto"> | ||
<li class="nav-item"> | ||
<a class="nav-link" href="~/admin/posts">Posts</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
samples/Opw.PineBlog.Sample/Pages/Shared/_AdminLayout.cshtml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
src/Opw.PineBlog.RazorPages/Areas/Admin/Pages/Posts.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
@page | ||
@model PostsModel | ||
@{ | ||
var posts = Model.Model; | ||
} | ||
<div class="container"> | ||
<h1>Posts</h1> | ||
|
||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th scope="col">Title</th> | ||
<th scope="col">Published</th> | ||
<th scope="col">Created</th> | ||
<th scope="col">Modified</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@foreach (var post in posts) | ||
{ | ||
<tr> | ||
<td>@post.Title</td> | ||
<td>@post.Published</td> | ||
<td>@post.Created</td> | ||
<td>@post.Modified</td> | ||
</tr> | ||
} | ||
</tbody> | ||
</table> | ||
</div> |
13 changes: 8 additions & 5 deletions
13
...orPages/Areas/Admin/Pages/Index.cshtml.cs → ...orPages/Areas/Admin/Pages/Posts.cshtml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 4 additions & 15 deletions
19
src/Opw.PineBlog.RazorPages/Areas/Admin/Pages/Shared/_Footer.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,4 @@ | ||
<footer class="footer copy"> | ||
<div class="container d-lg-flex text-center text-lg-left"> | ||
<p>PineBlog © @DateTime.Now.Year Of Pine Wood (@ViewData["ApplicationVersion"])</p> | ||
<div class="ml-auto"> | ||
@if (User.Identity.IsAuthenticated) | ||
{ | ||
<a href="~/admin">admin</a> | ||
} | ||
else | ||
{ | ||
<a asp-area="Identity" asp-page="/Account/Login">login</a> | ||
} | ||
</div> | ||
</div> | ||
</footer> | ||
@{ | ||
//TODO: Update this view from _Footer in sample project | ||
} | ||
<h1>TODO: Update this view from _Footer in sample project</h1> |
21 changes: 2 additions & 19 deletions
21
src/Opw.PineBlog.RazorPages/Areas/Admin/Pages/Shared/_Header.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,6 @@ | ||
@{ | ||
var showTitle = ViewData["ShowTitle"] != null && true; | ||
var showSearch = ViewData["ShowSearch"] != null && true; | ||
//TODO: Update this view from _Header in sample project | ||
} | ||
<header class="blog-header d-flex flex-column"> | ||
<div class="container d-flex"> | ||
<a href="~/" class="blog-logo my-auto d-flex"> | ||
@if (showTitle) | ||
{ | ||
@*<span class="my-auto">@Model.Title</span>*@ | ||
} | ||
</a> | ||
<ul class="blog-social nav ml-auto my-auto"> | ||
@*@await Component.InvokeAsync("HtmlBlock", new { theme = "Standard", widget = "Social Buttons" })*@ | ||
</ul> | ||
@if (showSearch) | ||
{ | ||
<button class="blog-search-toggle btn-unstyled" type="button" data-toggle="modal" data-target="#blog-search"> | ||
<i class="fa fa-search"></i> | ||
</button> | ||
} | ||
</div> | ||
</header> | ||
<h1>TODO: Update this view from _Header in sample project</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
src/Opw.PineBlog.RazorPages/Areas/Blog/Pages/Shared/_Header.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
@{ | ||
var showTitle = ViewData["ShowTitle"] != null && true; | ||
var showSearch = ViewData["ShowSearch"] != null && true; | ||
//TODO: Update this view from _Header in sample project | ||
} | ||
<h1>TODO: Update this view from _Header in sample project</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.