From b1e6d3dee9fa6519c65dd7564eac02b9e68bc3ce Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 7 Apr 2017 21:13:44 -0400 Subject: Developer blog --- Project-Unite/Views/Blog/ViewBlog.cshtml | 71 ++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Project-Unite/Views/Blog/ViewBlog.cshtml (limited to 'Project-Unite/Views/Blog/ViewBlog.cshtml') diff --git a/Project-Unite/Views/Blog/ViewBlog.cshtml b/Project-Unite/Views/Blog/ViewBlog.cshtml new file mode 100644 index 0000000..0511698 --- /dev/null +++ b/Project-Unite/Views/Blog/ViewBlog.cshtml @@ -0,0 +1,71 @@ +@model Project_Unite.Models.BlogPost +@{ + ViewBag.Title = Model.Name; +} + +

Developer Blog

+ +

@Model.Name

+ +@if (!string.IsNullOrWhiteSpace(ViewBag.Error)) +{ +
+
+

@ViewBag.Error

+
+
+} + +

Posted by @Html.UserLink(Model.AuthorId) at @Model.PostedAt

+ +
+
+ @Html.Markdown(Model.Contents) +
+
+ + + +
+ +

Comments

+ +@if (Request.IsAuthenticated) +{ +
+
+ @using (Html.BeginForm()) + { + + @Html.AntiForgeryToken() + + + + } +
+
+} + +@foreach(var comment in Model.Comments.OrderBy(x=>x.PostedAt)) +{ +
+
+

@Html.UserLink(comment.AuthorId) said on @comment.PostedAt:

+

@Html.Markdown(comment.Body)

+
+
+} \ No newline at end of file -- cgit v1.2.3