@using DysonNetwork.Shared.Models @model DysonNetwork.Shared.Models.SnPost
@if (!string.IsNullOrWhiteSpace(Model.Title) || !string.IsNullOrWhiteSpace(Model.Description)) {
@if (!string.IsNullOrWhiteSpace(Model.Title)) {

@Model.Title

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

@Model.Description

}
}

@Html.Raw(Model.Content)

@if (Model.Attachments.Any() && Model.Type != PostType.Article) {
@foreach (var attachment in Model.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.Categories.Any() || Model.Tags.Any()) {
@foreach (var category in Model.Categories) { @(!string.IsNullOrEmpty(category.Name) ? category.Name : category.Slug) } @foreach (var tag in Model.Tags) { @(!string.IsNullOrEmpty(tag.Name) ? tag.Name : tag.Slug) }
}
Posted on @Model.CreatedAt.ToDateTimeOffset().ToString("yyyy-MM-dd")