@page "/p/{slug}" @model DysonNetwork.Zone.Pages.Posts.DetailsModel @{ Layout = "_LayoutContained"; const string defaultAvatar = "https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp"; }
@if (Model.Post != null) {

@(Model.Post.Title ?? "Post Details")

@if (!string.IsNullOrWhiteSpace(Model.Post.Description)) {

@Model.Post.Description

}
@if (!string.IsNullOrWhiteSpace(Model.Post.Description)) {

@Model.Post.Description

} @Model.Post.Content
@if (Model.Post.Attachments.Any()) {
@foreach (var attachment in Model.Post.Attachments) {
@if (attachment.MimeType!.StartsWith("image")) {
@attachment.Name
} else if (attachment.MimeType!.StartsWith("video")) { } else if (attachment.MimeType!.StartsWith("audio")) { } else { @attachment.Name }
}
} @if (Model.Post.Categories.Any() || (Model.Post.Tags != null && Model.Post.Tags.Any())) {
@foreach (var category in Model.Post.Categories) { @(!string.IsNullOrEmpty(category.Name) ? category.Name : category.Slug) } @if (Model.Post.Tags != null) { @foreach (var tag in Model.Post.Tags) { @(!string.IsNullOrEmpty(tag.Name) ? tag.Name : tag.Slug) } }
}
Posted on @Model.Post.CreatedAt.ToDateTimeOffset().ToString("yyyy-MM-dd")
} else {

Post not found.

}