|
@model sBlog.Net.Models.PostModel
<div class="post">
@{
var url = Url.RouteUrl("IndividualPost", new { year = Model.Post.PostYear, month = Model.Post.PostMonth, url = Model.Post.PostUrl, status = string.Empty });
}
<h2 class="title"><a href="@url">@Model.Post.PostTitle</a></h2>
<p class="meta">
<span class="date">@Model.Post.PostAddedDate.ToLongDateString()</span>
<span class="posted" style="float: right;">Posted by <b>@Html.ActionLink(Model.Post.OwnerUserName, "PostsByAuthor", "Author", new { authorName = Model.Post.UserName }, new { })</b> under @Html.Partial("PostCategories", Model.Post.Categories)</span>
</p>
<div class="entry">
<p>
@Html.Raw(Model.Post.PostContent)
</p>
@{
var count = Model.Post.Comments != null ? Model.Post.Comments.Count : 0;
}
<p class="meta">
Tagged @Html.Partial("PostTags", Model.Post.Tags)
@* ReSharper disable AssignNullToNotNullAttribute *@
@if (!Model.DisqusEnabled)
{
<span class="posted">@count <a href="@(url + "#user-comments")">Comments</a></span>
}
else
{
var fullyQualifiedUrl = Model.RootUrl.IndexOf(url, System.StringComparison.Ordinal) >= 0 ? string.Format("{0}#disqus_thread", Model.RootUrl) : string.Format("{0}{1}#disqus_thread", Model.RootUrl, url);
<span class="posted"><a href="@fullyQualifiedUrl" data-disqus-identifier="@url">Link</a></span>
}
@* ReSharper restore AssignNullToNotNullAttribute *@
</p>
</div>
</div>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Just another passionate software developer!
Some of the contributions to the open source world - a blog engine written in MVC 4 - sBlog.Net. Check it out
here. For the codeproject article regarding sBlog.Net click
here!
(Figuring out this section!)