Files
SkyArtShop/Sky_Art_shop/Views/Blog/Post.cshtml

39 lines
1.2 KiB
Plaintext
Raw Normal View History

@model SkyArtShop.Models.BlogPost
@{
ViewData["Title"] = Model.Title;
}
<section class="portfolio-hero">
<div class="container">
<h1>@Model.Title</h1>
<p class="hero-subtitle">@Model.CreatedAt.ToString("MMMM dd, yyyy")</p>
<a href="/blog" class="btn btn-secondary">← Back to Blog</a>
</div>
</section>
<section class="shop-products">
<div class="container">
<article class="blog-post-content">
@if (!string.IsNullOrEmpty(Model.FeaturedImage))
{
<div class="featured-image">
<img src="@Model.FeaturedImage" alt="@Model.Title" style="max-width: 100%; height: auto;" />
</div>
}
<div class="content">
@Html.Raw(Model.Content)
</div>
@if (Model.Tags != null && Model.Tags.Any())
{
<div class="tags">
<strong>Tags:</strong>
@foreach (var tag in Model.Tags)
{
<span class="tag">@tag</span>
}
</div>
}
</article>
</div>
</section>