@model List<AbpDesk.Blogging.BlogPost>

<h2>Blog Posts</h2>

@section styles {
    <link rel="stylesheet" type="text/css" href="~/modules/mongoblog/views/posts/Index.css" />
}

<ul class="blog-post-list">
    @foreach (var post in Model)
    {
        <h3>@post.Title</h3>
        <p>@post.Body</p>
        if (!post.Comments.Any())
        {
            <p><em>No comment yet!</em></p>
        }
        else
        {
            <div class="post-comments">
                <h5>Comments</h5>
                @foreach (var comment in post.Comments)
                {
                    <p class="post-comment"><strong>@comment.Name</strong>: @comment.Message</p>
                }
            </div>
        }
    }
</ul>