Fix admin route access and backend configuration
- Added /admin redirect to login page in nginx config - Fixed backend server.js route ordering for proper admin handling - Updated authentication middleware and routes - Added user management routes - Configured PostgreSQL integration - Updated environment configuration
This commit is contained in:
38
Sky_Art_shop/Views/Blog/Index.cshtml
Normal file
38
Sky_Art_shop/Views/Blog/Index.cshtml
Normal file
@@ -0,0 +1,38 @@
|
||||
@model List<SkyArtShop.Models.BlogPost>
|
||||
@{
|
||||
ViewData["Title"] = "Blog";
|
||||
}
|
||||
|
||||
<section class="portfolio-hero">
|
||||
<div class="container">
|
||||
<h1>Sky Art Shop Blog</h1>
|
||||
<p class="hero-subtitle">Creative ideas, tutorials, and inspiration for your crafting journey</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="shop-products">
|
||||
<div class="container">
|
||||
<div class="projects-grid">
|
||||
@foreach (var post in Model)
|
||||
{
|
||||
<article class="project-card">
|
||||
@if (!string.IsNullOrEmpty(post.FeaturedImage))
|
||||
{
|
||||
<div class="project-image">
|
||||
<img src="@post.FeaturedImage" alt="@post.Title" />
|
||||
</div>
|
||||
}
|
||||
<div class="project-info">
|
||||
<h3>@post.Title</h3>
|
||||
<p class="project-date">@post.CreatedAt.ToString("MMMM dd, yyyy")</p>
|
||||
@if (!string.IsNullOrEmpty(post.Excerpt))
|
||||
{
|
||||
<p>@post.Excerpt</p>
|
||||
}
|
||||
<a href="/blog/post/@post.Slug" class="btn btn-primary btn-small">Read More</a>
|
||||
</div>
|
||||
</article>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
38
Sky_Art_shop/Views/Blog/Post.cshtml
Normal file
38
Sky_Art_shop/Views/Blog/Post.cshtml
Normal file
@@ -0,0 +1,38 @@
|
||||
@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>
|
||||
Reference in New Issue
Block a user