diff --git a/src/LinkDotNet.Blog.Web/App.razor b/src/LinkDotNet.Blog.Web/App.razor index 358f152b..74b82bf4 100644 --- a/src/LinkDotNet.Blog.Web/App.razor +++ b/src/LinkDotNet.Blog.Web/App.razor @@ -1,3 +1,4 @@ +@using LinkDotNet.Blog.Web.Features.Home.Components diff --git a/src/LinkDotNet.Blog.Web/AppConfiguration.cs b/src/LinkDotNet.Blog.Web/AppConfiguration.cs index 7c7ff97d..14244ab3 100644 --- a/src/LinkDotNet.Blog.Web/AppConfiguration.cs +++ b/src/LinkDotNet.Blog.Web/AppConfiguration.cs @@ -1,5 +1,5 @@ using LinkDotNet.Blog.Domain; -using LinkDotNet.Blog.Web.Shared.Services; +using LinkDotNet.Blog.Web.Features.ShowBlogPost.Components; namespace LinkDotNet.Blog.Web; diff --git a/src/LinkDotNet.Blog.Web/AppConfigurationFactory.cs b/src/LinkDotNet.Blog.Web/AppConfigurationFactory.cs index 1e2c9ca3..aeb9a68d 100644 --- a/src/LinkDotNet.Blog.Web/AppConfigurationFactory.cs +++ b/src/LinkDotNet.Blog.Web/AppConfigurationFactory.cs @@ -1,5 +1,5 @@ using LinkDotNet.Blog.Domain; -using LinkDotNet.Blog.Web.Shared.Services; +using LinkDotNet.Blog.Web.Features.ShowBlogPost.Components; using Microsoft.Extensions.Configuration; namespace LinkDotNet.Blog.Web; diff --git a/src/LinkDotNet.Blog.Web/Pages/AboutMe.razor b/src/LinkDotNet.Blog.Web/Features/AboutMe/AboutMePage.razor similarity index 94% rename from src/LinkDotNet.Blog.Web/Pages/AboutMe.razor rename to src/LinkDotNet.Blog.Web/Features/AboutMe/AboutMePage.razor index d1583211..fd7a62f6 100644 --- a/src/LinkDotNet.Blog.Web/Pages/AboutMe.razor +++ b/src/LinkDotNet.Blog.Web/Features/AboutMe/AboutMePage.razor @@ -1,6 +1,6 @@ @page "/AboutMe" -@using LinkDotNet.Blog.Web.Shared.Skills -@using LinkDotNet.Blog.Web.Shared.Services +@using LinkDotNet.Blog.Web.Features.Services +@using LinkDotNet.Blog.Web.Features.AboutMe.Components @inject AppConfiguration appConfiguration @inject AuthenticationStateProvider authenticationStateProvider @inject IUserRecordService userRecordService diff --git a/src/LinkDotNet.Blog.Web/Shared/AddProfileShortItem.razor b/src/LinkDotNet.Blog.Web/Features/AboutMe/Components/AddProfileShortItem.razor similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/AddProfileShortItem.razor rename to src/LinkDotNet.Blog.Web/Features/AboutMe/Components/AddProfileShortItem.razor diff --git a/src/LinkDotNet.Blog.Web/Shared/Skills/AddSkillDialog.razor b/src/LinkDotNet.Blog.Web/Features/AboutMe/Components/AddSkillDialog.razor similarity index 97% rename from src/LinkDotNet.Blog.Web/Shared/Skills/AddSkillDialog.razor rename to src/LinkDotNet.Blog.Web/Features/AboutMe/Components/AddSkillDialog.razor index f17fb099..2f1b4d9b 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Skills/AddSkillDialog.razor +++ b/src/LinkDotNet.Blog.Web/Features/AboutMe/Components/AddSkillDialog.razor @@ -1,4 +1,5 @@ @using LinkDotNet.Blog.Domain +@using LinkDotNet.Blog.Web.Features.Components @inject IToastService toastService diff --git a/src/LinkDotNet.Blog.Web/Shared/Skills/AddSkillModel.cs b/src/LinkDotNet.Blog.Web/Features/AboutMe/Components/AddSkillModel.cs similarity index 85% rename from src/LinkDotNet.Blog.Web/Shared/Skills/AddSkillModel.cs rename to src/LinkDotNet.Blog.Web/Features/AboutMe/Components/AddSkillModel.cs index f4645897..cc4edd94 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Skills/AddSkillModel.cs +++ b/src/LinkDotNet.Blog.Web/Features/AboutMe/Components/AddSkillModel.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using LinkDotNet.Blog.Domain; -namespace LinkDotNet.Blog.Web.Shared.Skills; +namespace LinkDotNet.Blog.Web.Features.AboutMe.Components; public class AddSkillModel { diff --git a/src/LinkDotNet.Blog.Web/Shared/Skills/Card.razor b/src/LinkDotNet.Blog.Web/Features/AboutMe/Components/Card.razor similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/Skills/Card.razor rename to src/LinkDotNet.Blog.Web/Features/AboutMe/Components/Card.razor diff --git a/src/LinkDotNet.Blog.Web/Shared/Skills/Card.razor.css b/src/LinkDotNet.Blog.Web/Features/AboutMe/Components/Card.razor.css similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/Skills/Card.razor.css rename to src/LinkDotNet.Blog.Web/Features/AboutMe/Components/Card.razor.css diff --git a/src/LinkDotNet.Blog.Web/Shared/Profile.razor b/src/LinkDotNet.Blog.Web/Features/AboutMe/Components/Profile.razor similarity index 95% rename from src/LinkDotNet.Blog.Web/Shared/Profile.razor rename to src/LinkDotNet.Blog.Web/Features/AboutMe/Components/Profile.razor index 9c94da96..b65e3210 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Profile.razor +++ b/src/LinkDotNet.Blog.Web/Features/AboutMe/Components/Profile.razor @@ -1,7 +1,8 @@ -@using LinkDotNet.Blog.Web.Shared.Services -@using LinkDotNet.Blog.Domain +@using LinkDotNet.Blog.Domain @using LinkDotNet.Blog.Infrastructure.Persistence -@inherits MarkdownComponentBase +@using LinkDotNet.Blog.Web.Features.Components +@using LinkDotNet.Blog.Web.Features.Services +@inherits LinkDotNet.Blog.Web.Features.MarkdownComponentBase @inject AppConfiguration appConfiguration @inject IRepository repository diff --git a/src/LinkDotNet.Blog.Web/Shared/Profile.razor.css b/src/LinkDotNet.Blog.Web/Features/AboutMe/Components/Profile.razor.css similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/Profile.razor.css rename to src/LinkDotNet.Blog.Web/Features/AboutMe/Components/Profile.razor.css diff --git a/src/LinkDotNet.Blog.Web/Shared/Skills/SkillTable.razor b/src/LinkDotNet.Blog.Web/Features/AboutMe/Components/SkillTable.razor similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/Skills/SkillTable.razor rename to src/LinkDotNet.Blog.Web/Features/AboutMe/Components/SkillTable.razor diff --git a/src/LinkDotNet.Blog.Web/Shared/Skills/SkillTable.razor.css b/src/LinkDotNet.Blog.Web/Features/AboutMe/Components/SkillTable.razor.css similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/Skills/SkillTable.razor.css rename to src/LinkDotNet.Blog.Web/Features/AboutMe/Components/SkillTable.razor.css diff --git a/src/LinkDotNet.Blog.Web/Shared/Skills/SkillTag.razor b/src/LinkDotNet.Blog.Web/Features/AboutMe/Components/SkillTag.razor similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/Skills/SkillTag.razor rename to src/LinkDotNet.Blog.Web/Features/AboutMe/Components/SkillTag.razor diff --git a/src/LinkDotNet.Blog.Web/Shared/Skills/SkillTag.razor.css b/src/LinkDotNet.Blog.Web/Features/AboutMe/Components/SkillTag.razor.css similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/Skills/SkillTag.razor.css rename to src/LinkDotNet.Blog.Web/Features/AboutMe/Components/SkillTag.razor.css diff --git a/src/LinkDotNet.Blog.Web/Shared/Admin/CreateNewBlogPost.razor b/src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/CreateNewBlogPost.razor similarity index 99% rename from src/LinkDotNet.Blog.Web/Shared/Admin/CreateNewBlogPost.razor rename to src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/CreateNewBlogPost.razor index aae545af..8f78324b 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Admin/CreateNewBlogPost.razor +++ b/src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/CreateNewBlogPost.razor @@ -1,5 +1,4 @@ @using LinkDotNet.Blog.Domain -@using LinkDotNet.Blog.Web.Shared.Services @inherits MarkdownComponentBase

@Title

diff --git a/src/LinkDotNet.Blog.Web/Shared/Admin/CreateNewBlogPost.razor.css b/src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/CreateNewBlogPost.razor.css similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/Admin/CreateNewBlogPost.razor.css rename to src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/CreateNewBlogPost.razor.css diff --git a/src/LinkDotNet.Blog.Web/Shared/Admin/CreateNewModel.cs b/src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/CreateNewModel.cs similarity index 95% rename from src/LinkDotNet.Blog.Web/Shared/Admin/CreateNewModel.cs rename to src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/CreateNewModel.cs index d7580673..bd9a655c 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Admin/CreateNewModel.cs +++ b/src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/CreateNewModel.cs @@ -3,7 +3,7 @@ using System.Linq; using LinkDotNet.Blog.Domain; -namespace LinkDotNet.Blog.Web.Shared.Admin; +namespace LinkDotNet.Blog.Web.Features.Admin.BlogPostEditor.Components; public class CreateNewModel { diff --git a/src/LinkDotNet.Blog.Web/Shared/Admin/FeatureInfoDialog.razor b/src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/FeatureInfoDialog.razor similarity index 93% rename from src/LinkDotNet.Blog.Web/Shared/Admin/FeatureInfoDialog.razor rename to src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/FeatureInfoDialog.razor index 4e9b83f9..acd67c0c 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Admin/FeatureInfoDialog.razor +++ b/src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/FeatureInfoDialog.razor @@ -1,4 +1,5 @@ - +@using LinkDotNet.Blog.Web.Features.Components +

Here you will find a comprehensive list over feature you can use additional to classic markdown

Features marked with are experimental and can change heavily, get removed or the usage changes.

Use with caution and check the changelog

diff --git a/src/LinkDotNet.Blog.Web/Shared/SelectionRange.cs b/src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/SelectionRange.cs similarity index 60% rename from src/LinkDotNet.Blog.Web/Shared/SelectionRange.cs rename to src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/SelectionRange.cs index 829010c4..db191a06 100644 --- a/src/LinkDotNet.Blog.Web/Shared/SelectionRange.cs +++ b/src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/SelectionRange.cs @@ -1,4 +1,4 @@ -namespace LinkDotNet.Blog.Web.Shared; +namespace LinkDotNet.Blog.Web.Features.Admin.BlogPostEditor.Components; public sealed class SelectionRange { diff --git a/src/LinkDotNet.Blog.Web/Shared/TextAreaWithShortcuts.razor b/src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/TextAreaWithShortcuts.razor similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/TextAreaWithShortcuts.razor rename to src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/TextAreaWithShortcuts.razor diff --git a/src/LinkDotNet.Blog.Web/Shared/UploadFile.razor b/src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/UploadFile.razor similarity index 95% rename from src/LinkDotNet.Blog.Web/Shared/UploadFile.razor rename to src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/UploadFile.razor index 7cc09f85..c69fa6df 100644 --- a/src/LinkDotNet.Blog.Web/Shared/UploadFile.razor +++ b/src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/UploadFile.razor @@ -1,5 +1,5 @@ @using System.IO -@using LinkDotNet.Blog.Web.Shared.Services +@using LinkDotNet.Blog.Web.Features.Admin.BlogPostEditor.Services @inject IFileProcessor fileProcessor
diff --git a/src/LinkDotNet.Blog.Web/Shared/UploadFile.razor.css b/src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/UploadFile.razor.css similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/UploadFile.razor.css rename to src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Components/UploadFile.razor.css diff --git a/src/LinkDotNet.Blog.Web/Pages/Admin/CreateNewBlogPostPage.razor b/src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/CreateBlogPost.razor similarity index 89% rename from src/LinkDotNet.Blog.Web/Pages/Admin/CreateNewBlogPostPage.razor rename to src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/CreateBlogPost.razor index 97526977..2ca7a70b 100644 --- a/src/LinkDotNet.Blog.Web/Pages/Admin/CreateNewBlogPostPage.razor +++ b/src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/CreateBlogPost.razor @@ -1,8 +1,8 @@ @page "/create" @attribute [Authorize] -@using LinkDotNet.Blog.Web.Shared.Admin @using LinkDotNet.Blog.Domain @using LinkDotNet.Blog.Infrastructure.Persistence +@using LinkDotNet.Blog.Web.Features.Admin.BlogPostEditor.Components @inherits MarkdownComponentBase @inject IRepository blogPostRepository @inject IToastService toastService diff --git a/src/LinkDotNet.Blog.Web/Shared/Services/FileProcessor.cs b/src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Services/FileProcessor.cs similarity index 83% rename from src/LinkDotNet.Blog.Web/Shared/Services/FileProcessor.cs rename to src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Services/FileProcessor.cs index 8eb52a30..9b836796 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Services/FileProcessor.cs +++ b/src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Services/FileProcessor.cs @@ -2,7 +2,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Components.Forms; -namespace LinkDotNet.Blog.Web.Shared.Services; +namespace LinkDotNet.Blog.Web.Features.Admin.BlogPostEditor.Services; public class FileProcessor : IFileProcessor { diff --git a/src/LinkDotNet.Blog.Web/Shared/Services/IFileProcessor.cs b/src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Services/IFileProcessor.cs similarity index 69% rename from src/LinkDotNet.Blog.Web/Shared/Services/IFileProcessor.cs rename to src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Services/IFileProcessor.cs index 4bf70057..abadb4f9 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Services/IFileProcessor.cs +++ b/src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/Services/IFileProcessor.cs @@ -1,7 +1,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Components.Forms; -namespace LinkDotNet.Blog.Web.Shared.Services; +namespace LinkDotNet.Blog.Web.Features.Admin.BlogPostEditor.Services; public interface IFileProcessor { diff --git a/src/LinkDotNet.Blog.Web/Pages/Admin/UpdateBlogPostPage.razor b/src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/UpdateBlogPostPage.razor similarity index 94% rename from src/LinkDotNet.Blog.Web/Pages/Admin/UpdateBlogPostPage.razor rename to src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/UpdateBlogPostPage.razor index 408e5653..4267b93c 100644 --- a/src/LinkDotNet.Blog.Web/Pages/Admin/UpdateBlogPostPage.razor +++ b/src/LinkDotNet.Blog.Web/Features/Admin/BlogPostEditor/UpdateBlogPostPage.razor @@ -1,8 +1,8 @@ @page "/update/{blogPostId}" @attribute [Authorize] -@using LinkDotNet.Blog.Web.Shared.Admin @using LinkDotNet.Blog.Domain @using LinkDotNet.Blog.Infrastructure.Persistence +@using LinkDotNet.Blog.Web.Features.Admin.BlogPostEditor.Components @inherits MarkdownComponentBase @inject IRepository blogPostRepository @inject IToastService toastService diff --git a/src/LinkDotNet.Blog.Web/Shared/Admin/Dashboard/DashboardCard.razor b/src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Components/DashboardCard.razor similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/Admin/Dashboard/DashboardCard.razor rename to src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Components/DashboardCard.razor diff --git a/src/LinkDotNet.Blog.Web/Shared/Admin/Dashboard/DateRangeSelector.razor b/src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Components/DateRangeSelector.razor similarity index 91% rename from src/LinkDotNet.Blog.Web/Shared/Admin/Dashboard/DateRangeSelector.razor rename to src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Components/DateRangeSelector.razor index 6e0ef821..4d68a3a3 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Admin/Dashboard/DateRangeSelector.razor +++ b/src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Components/DateRangeSelector.razor @@ -1,4 +1,5 @@ -
+@using LinkDotNet.Blog.Web.Features.Admin.Dashboard.Services +
diff --git a/src/LinkDotNet.Blog.Web/Pages/Admin/Dashboard.razor b/src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/DashboardPage.razor similarity index 91% rename from src/LinkDotNet.Blog.Web/Pages/Admin/Dashboard.razor rename to src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/DashboardPage.razor index 7bb9cd79..9f39b6f1 100644 --- a/src/LinkDotNet.Blog.Web/Pages/Admin/Dashboard.razor +++ b/src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/DashboardPage.razor @@ -1,5 +1,6 @@ @page "/dashboard" -@using LinkDotNet.Blog.Web.Shared.Admin.Dashboard +@using LinkDotNet.Blog.Web.Features.Admin.Dashboard.Services +@using LinkDotNet.Blog.Web.Features.Admin.Dashboard.Components @inject IDashboardService dashboardService @inject AppConfiguration appConfiguration @attribute [Authorize] diff --git a/src/LinkDotNet.Blog.Web/Pages/Admin/DashboardData.cs b/src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Services/DashboardData.cs similarity index 83% rename from src/LinkDotNet.Blog.Web/Pages/Admin/DashboardData.cs rename to src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Services/DashboardData.cs index eeec2d71..cfab41d1 100644 --- a/src/LinkDotNet.Blog.Web/Pages/Admin/DashboardData.cs +++ b/src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Services/DashboardData.cs @@ -1,4 +1,4 @@ -namespace LinkDotNet.Blog.Web.Pages.Admin; +namespace LinkDotNet.Blog.Web.Features.Admin.Dashboard.Services; public class DashboardData { diff --git a/src/LinkDotNet.Blog.Web/Pages/Admin/DashboardService.cs b/src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Services/DashboardService.cs similarity index 92% rename from src/LinkDotNet.Blog.Web/Pages/Admin/DashboardService.cs rename to src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Services/DashboardService.cs index fac41e58..dc9325cf 100644 --- a/src/LinkDotNet.Blog.Web/Pages/Admin/DashboardService.cs +++ b/src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Services/DashboardService.cs @@ -4,12 +4,7 @@ using LinkDotNet.Blog.Domain; using LinkDotNet.Blog.Infrastructure.Persistence; -namespace LinkDotNet.Blog.Web.Pages.Admin; - -public interface IDashboardService -{ - Task GetDashboardDataAsync(); -} +namespace LinkDotNet.Blog.Web.Features.Admin.Dashboard.Services; public class DashboardService : IDashboardService { diff --git a/src/LinkDotNet.Blog.Web/Shared/Admin/Dashboard/Filter.cs b/src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Services/Filter.cs similarity index 67% rename from src/LinkDotNet.Blog.Web/Shared/Admin/Dashboard/Filter.cs rename to src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Services/Filter.cs index e8c212e9..f29d820e 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Admin/Dashboard/Filter.cs +++ b/src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Services/Filter.cs @@ -1,6 +1,6 @@ using System; -namespace LinkDotNet.Blog.Web.Shared.Admin.Dashboard; +namespace LinkDotNet.Blog.Web.Features.Admin.Dashboard.Services; public sealed class Filter { diff --git a/src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Services/IDashboardService.cs b/src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Services/IDashboardService.cs new file mode 100644 index 00000000..498f2693 --- /dev/null +++ b/src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Services/IDashboardService.cs @@ -0,0 +1,8 @@ +using System.Threading.Tasks; + +namespace LinkDotNet.Blog.Web.Features.Admin.Dashboard.Services; + +public interface IDashboardService +{ + Task GetDashboardDataAsync(); +} \ No newline at end of file diff --git a/src/LinkDotNet.Blog.Web/Shared/Admin/Dashboard/VisitCountPageData.cs b/src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Services/VisitCountPageData.cs similarity index 73% rename from src/LinkDotNet.Blog.Web/Shared/Admin/Dashboard/VisitCountPageData.cs rename to src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Services/VisitCountPageData.cs index 8db99722..126532d6 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Admin/Dashboard/VisitCountPageData.cs +++ b/src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Services/VisitCountPageData.cs @@ -1,4 +1,4 @@ -namespace LinkDotNet.Blog.Web.Shared.Admin.Dashboard; +namespace LinkDotNet.Blog.Web.Features.Admin.Dashboard.Services; public record VisitCountPageData { @@ -9,4 +9,4 @@ public record VisitCountPageData public int Likes { get; init; } public int ClickCount { get; init; } -} +} \ No newline at end of file diff --git a/src/LinkDotNet.Blog.Web/Shared/Admin/Dashboard/VisitCountPerPage.razor b/src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Services/VisitCountPerPage.razor similarity index 95% rename from src/LinkDotNet.Blog.Web/Shared/Admin/Dashboard/VisitCountPerPage.razor rename to src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Services/VisitCountPerPage.razor index 56ad66d4..40607b8a 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Admin/Dashboard/VisitCountPerPage.razor +++ b/src/LinkDotNet.Blog.Web/Features/Admin/Dashboard/Services/VisitCountPerPage.razor @@ -1,8 +1,9 @@ -@using LinkDotNet.Blog.Domain +@using System.Linq.Expressions +@using Microsoft.EntityFrameworkCore +@using LinkDotNet.Blog.Domain @using LinkDotNet.Blog.Infrastructure.Persistence -@using System.Linq.Expressions @using LinkDotNet.Blog.Infrastructure.Persistence.Sql -@using Microsoft.EntityFrameworkCore +@using LinkDotNet.Blog.Web.Features.Admin.Dashboard.Components @inject BlogDbContext blogDbContext
diff --git a/src/LinkDotNet.Blog.Web/Pages/Admin/DraftBlogPosts.razor b/src/LinkDotNet.Blog.Web/Features/Admin/DraftBlogPost/DraftBlogPostPage.razor similarity index 100% rename from src/LinkDotNet.Blog.Web/Pages/Admin/DraftBlogPosts.razor rename to src/LinkDotNet.Blog.Web/Features/Admin/DraftBlogPost/DraftBlogPostPage.razor diff --git a/src/LinkDotNet.Blog.Web/Shared/Services/Sitemap/ISitemapService.cs b/src/LinkDotNet.Blog.Web/Features/Admin/Sitemap/Services/ISitemapService.cs similarity index 72% rename from src/LinkDotNet.Blog.Web/Shared/Services/Sitemap/ISitemapService.cs rename to src/LinkDotNet.Blog.Web/Features/Admin/Sitemap/Services/ISitemapService.cs index 09c03bf4..581e9467 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Services/Sitemap/ISitemapService.cs +++ b/src/LinkDotNet.Blog.Web/Features/Admin/Sitemap/Services/ISitemapService.cs @@ -1,10 +1,10 @@ using System.Threading.Tasks; -namespace LinkDotNet.Blog.Web.Shared.Services.Sitemap; +namespace LinkDotNet.Blog.Web.Features.Admin.Sitemap.Services; public interface ISitemapService { Task CreateSitemapAsync(); Task SaveSitemapToFileAsync(SitemapUrlSet sitemap); -} +} \ No newline at end of file diff --git a/src/LinkDotNet.Blog.Web/Shared/Services/IXmlFileWriter.cs b/src/LinkDotNet.Blog.Web/Features/Admin/Sitemap/Services/IXmlFileWriter.cs similarity index 68% rename from src/LinkDotNet.Blog.Web/Shared/Services/IXmlFileWriter.cs rename to src/LinkDotNet.Blog.Web/Features/Admin/Sitemap/Services/IXmlFileWriter.cs index c9eded87..12ab89b9 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Services/IXmlFileWriter.cs +++ b/src/LinkDotNet.Blog.Web/Features/Admin/Sitemap/Services/IXmlFileWriter.cs @@ -1,8 +1,8 @@ using System.Threading.Tasks; -namespace LinkDotNet.Blog.Web.Shared.Services; +namespace LinkDotNet.Blog.Web.Features.Admin.Sitemap.Services; public interface IXmlFileWriter { Task WriteObjectToXmlFileAsync(T objectToSave, string fileName); -} +} \ No newline at end of file diff --git a/src/LinkDotNet.Blog.Web/Shared/Services/Sitemap/SitemapService.cs b/src/LinkDotNet.Blog.Web/Features/Admin/Sitemap/Services/SitemapService.cs similarity index 97% rename from src/LinkDotNet.Blog.Web/Shared/Services/Sitemap/SitemapService.cs rename to src/LinkDotNet.Blog.Web/Features/Admin/Sitemap/Services/SitemapService.cs index 96dbe2ad..443ed238 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Services/Sitemap/SitemapService.cs +++ b/src/LinkDotNet.Blog.Web/Features/Admin/Sitemap/Services/SitemapService.cs @@ -6,7 +6,7 @@ using LinkDotNet.Blog.Infrastructure.Persistence; using Microsoft.AspNetCore.Components; -namespace LinkDotNet.Blog.Web.Shared.Services.Sitemap; +namespace LinkDotNet.Blog.Web.Features.Admin.Sitemap.Services; public class SitemapService : ISitemapService { diff --git a/src/LinkDotNet.Blog.Web/Shared/Services/Sitemap/SitemapUrl.cs b/src/LinkDotNet.Blog.Web/Features/Admin/Sitemap/Services/SitemapUrl.cs similarity index 80% rename from src/LinkDotNet.Blog.Web/Shared/Services/Sitemap/SitemapUrl.cs rename to src/LinkDotNet.Blog.Web/Features/Admin/Sitemap/Services/SitemapUrl.cs index bd3ff1f3..b1f3d67e 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Services/Sitemap/SitemapUrl.cs +++ b/src/LinkDotNet.Blog.Web/Features/Admin/Sitemap/Services/SitemapUrl.cs @@ -1,6 +1,6 @@ using System.Xml.Serialization; -namespace LinkDotNet.Blog.Web.Shared.Services.Sitemap; +namespace LinkDotNet.Blog.Web.Features.Admin.Sitemap.Services; [XmlRoot(ElementName = "url")] public class SitemapUrl diff --git a/src/LinkDotNet.Blog.Web/Shared/Services/Sitemap/SitemapUrlSet.cs b/src/LinkDotNet.Blog.Web/Features/Admin/Sitemap/Services/SitemapUrlSet.cs similarity index 82% rename from src/LinkDotNet.Blog.Web/Shared/Services/Sitemap/SitemapUrlSet.cs rename to src/LinkDotNet.Blog.Web/Features/Admin/Sitemap/Services/SitemapUrlSet.cs index e9aa40ab..a182cf5e 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Services/Sitemap/SitemapUrlSet.cs +++ b/src/LinkDotNet.Blog.Web/Features/Admin/Sitemap/Services/SitemapUrlSet.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Xml.Serialization; -namespace LinkDotNet.Blog.Web.Shared.Services.Sitemap; +namespace LinkDotNet.Blog.Web.Features.Admin.Sitemap.Services; [XmlRoot(ElementName = "urlset", Namespace = "http://www.sitemaps.org/schemas/sitemap/0.9")] public class SitemapUrlSet diff --git a/src/LinkDotNet.Blog.Web/Shared/Services/XmlFileWriter.cs b/src/LinkDotNet.Blog.Web/Features/Admin/Sitemap/Services/XmlFileWriter.cs similarity index 89% rename from src/LinkDotNet.Blog.Web/Shared/Services/XmlFileWriter.cs rename to src/LinkDotNet.Blog.Web/Features/Admin/Sitemap/Services/XmlFileWriter.cs index 031014ce..87af8a19 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Services/XmlFileWriter.cs +++ b/src/LinkDotNet.Blog.Web/Features/Admin/Sitemap/Services/XmlFileWriter.cs @@ -3,7 +3,7 @@ using System.Xml; using System.Xml.Serialization; -namespace LinkDotNet.Blog.Web.Shared.Services; +namespace LinkDotNet.Blog.Web.Features.Admin.Sitemap.Services; public class XmlFileWriter : IXmlFileWriter { @@ -16,4 +16,4 @@ public async Task WriteObjectToXmlFileAsync(T objectToSave, string fileName) xmlWriter.Close(); file.Close(); } -} +} \ No newline at end of file diff --git a/src/LinkDotNet.Blog.Web/Pages/Admin/Sitemap.razor b/src/LinkDotNet.Blog.Web/Features/Admin/Sitemap/SitemapPage.razor similarity index 96% rename from src/LinkDotNet.Blog.Web/Pages/Admin/Sitemap.razor rename to src/LinkDotNet.Blog.Web/Features/Admin/Sitemap/SitemapPage.razor index 053b4f08..25d6057f 100644 --- a/src/LinkDotNet.Blog.Web/Pages/Admin/Sitemap.razor +++ b/src/LinkDotNet.Blog.Web/Features/Admin/Sitemap/SitemapPage.razor @@ -1,5 +1,5 @@ @page "/Sitemap" -@using LinkDotNet.Blog.Web.Shared.Services.Sitemap +@using LinkDotNet.Blog.Web.Features.Admin.Sitemap.Services @inject ISitemapService sitemapService @attribute [Authorize]

Sitemap

diff --git a/src/LinkDotNet.Blog.Web/Shared/AccessControl.razor b/src/LinkDotNet.Blog.Web/Features/Components/AccessControl.razor similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/AccessControl.razor rename to src/LinkDotNet.Blog.Web/Features/Components/AccessControl.razor diff --git a/src/LinkDotNet.Blog.Web/Shared/AccessControl.razor.css b/src/LinkDotNet.Blog.Web/Features/Components/AccessControl.razor.css similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/AccessControl.razor.css rename to src/LinkDotNet.Blog.Web/Features/Components/AccessControl.razor.css diff --git a/src/LinkDotNet.Blog.Web/Shared/ConfirmDialog.razor b/src/LinkDotNet.Blog.Web/Features/Components/ConfirmDialog.razor similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/ConfirmDialog.razor rename to src/LinkDotNet.Blog.Web/Features/Components/ConfirmDialog.razor diff --git a/src/LinkDotNet.Blog.Web/Shared/ConfirmDialog.razor.css b/src/LinkDotNet.Blog.Web/Features/Components/ConfirmDialog.razor.css similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/ConfirmDialog.razor.css rename to src/LinkDotNet.Blog.Web/Features/Components/ConfirmDialog.razor.css diff --git a/src/LinkDotNet.Blog.Web/Shared/Loading.razor b/src/LinkDotNet.Blog.Web/Features/Components/Loading.razor similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/Loading.razor rename to src/LinkDotNet.Blog.Web/Features/Components/Loading.razor diff --git a/src/LinkDotNet.Blog.Web/Shared/ModalDialog.razor b/src/LinkDotNet.Blog.Web/Features/Components/ModalDialog.razor similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/ModalDialog.razor rename to src/LinkDotNet.Blog.Web/Features/Components/ModalDialog.razor diff --git a/src/LinkDotNet.Blog.Web/Shared/OgData.razor b/src/LinkDotNet.Blog.Web/Features/Components/OgData.razor similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/OgData.razor rename to src/LinkDotNet.Blog.Web/Features/Components/OgData.razor diff --git a/src/LinkDotNet.Blog.Web/Shared/ShortBlogPost.razor b/src/LinkDotNet.Blog.Web/Features/Components/ShortBlogPost.razor similarity index 97% rename from src/LinkDotNet.Blog.Web/Shared/ShortBlogPost.razor rename to src/LinkDotNet.Blog.Web/Features/Components/ShortBlogPost.razor index ff7d7652..c9487d8c 100644 --- a/src/LinkDotNet.Blog.Web/Shared/ShortBlogPost.razor +++ b/src/LinkDotNet.Blog.Web/Features/Components/ShortBlogPost.razor @@ -2,7 +2,7 @@ @using System.Text.RegularExpressions @using System.Web @using LinkDotNet.Blog.Domain -@inherits MarkdownComponentBase +@inherits LinkDotNet.Blog.Web.Features.MarkdownComponentBase
diff --git a/src/LinkDotNet.Blog.Web/Shared/ShortBlogPost.razor.css b/src/LinkDotNet.Blog.Web/Features/Components/ShortBlogPost.razor.css similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/ShortBlogPost.razor.css rename to src/LinkDotNet.Blog.Web/Features/Components/ShortBlogPost.razor.css diff --git a/src/LinkDotNet.Blog.Web/Pages/Error.cshtml b/src/LinkDotNet.Blog.Web/Features/Error.cshtml similarity index 96% rename from src/LinkDotNet.Blog.Web/Pages/Error.cshtml rename to src/LinkDotNet.Blog.Web/Features/Error.cshtml index ca1088e4..4c6f22c6 100644 --- a/src/LinkDotNet.Blog.Web/Pages/Error.cshtml +++ b/src/LinkDotNet.Blog.Web/Features/Error.cshtml @@ -1,5 +1,5 @@ @page -@model LinkDotNet.Blog.Web.Pages.ErrorModel +@model LinkDotNet.Blog.Web.Features.ErrorModel diff --git a/src/LinkDotNet.Blog.Web/Pages/Error.cshtml.cs b/src/LinkDotNet.Blog.Web/Features/Error.cshtml.cs similarity index 92% rename from src/LinkDotNet.Blog.Web/Pages/Error.cshtml.cs rename to src/LinkDotNet.Blog.Web/Features/Error.cshtml.cs index f38115d2..1a6f70eb 100644 --- a/src/LinkDotNet.Blog.Web/Pages/Error.cshtml.cs +++ b/src/LinkDotNet.Blog.Web/Features/Error.cshtml.cs @@ -2,7 +2,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace LinkDotNet.Blog.Web.Pages; +namespace LinkDotNet.Blog.Web.Features; [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] [IgnoreAntiforgeryToken] diff --git a/src/LinkDotNet.Blog.Web/Shared/BlogPostNavigation.razor b/src/LinkDotNet.Blog.Web/Features/Home/Components/BlogPostNavigation.razor similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/BlogPostNavigation.razor rename to src/LinkDotNet.Blog.Web/Features/Home/Components/BlogPostNavigation.razor diff --git a/src/LinkDotNet.Blog.Web/Shared/Footer.razor b/src/LinkDotNet.Blog.Web/Features/Home/Components/Footer.razor similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/Footer.razor rename to src/LinkDotNet.Blog.Web/Features/Home/Components/Footer.razor diff --git a/src/LinkDotNet.Blog.Web/Shared/IntroductionCard.razor b/src/LinkDotNet.Blog.Web/Features/Home/Components/IntroductionCard.razor similarity index 91% rename from src/LinkDotNet.Blog.Web/Shared/IntroductionCard.razor rename to src/LinkDotNet.Blog.Web/Features/Home/Components/IntroductionCard.razor index f77d421e..4b429153 100644 --- a/src/LinkDotNet.Blog.Web/Shared/IntroductionCard.razor +++ b/src/LinkDotNet.Blog.Web/Features/Home/Components/IntroductionCard.razor @@ -1,5 +1,5 @@ @using LinkDotNet.Blog.Domain -@inherits MarkdownComponentBase +@inherits LinkDotNet.Blog.Web.Features.MarkdownComponentBase
diff --git a/src/LinkDotNet.Blog.Web/Shared/IntroductionCard.razor.css b/src/LinkDotNet.Blog.Web/Features/Home/Components/IntroductionCard.razor.css similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/IntroductionCard.razor.css rename to src/LinkDotNet.Blog.Web/Features/Home/Components/IntroductionCard.razor.css diff --git a/src/LinkDotNet.Blog.Web/Shared/MainLayout.razor b/src/LinkDotNet.Blog.Web/Features/Home/Components/MainLayout.razor similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/MainLayout.razor rename to src/LinkDotNet.Blog.Web/Features/Home/Components/MainLayout.razor diff --git a/src/LinkDotNet.Blog.Web/Shared/NavMenu.razor b/src/LinkDotNet.Blog.Web/Features/Home/Components/NavMenu.razor similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/NavMenu.razor rename to src/LinkDotNet.Blog.Web/Features/Home/Components/NavMenu.razor diff --git a/src/LinkDotNet.Blog.Web/Shared/NavMenu.razor.css b/src/LinkDotNet.Blog.Web/Features/Home/Components/NavMenu.razor.css similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/NavMenu.razor.css rename to src/LinkDotNet.Blog.Web/Features/Home/Components/NavMenu.razor.css diff --git a/src/LinkDotNet.Blog.Web/Shared/SearchInput.razor b/src/LinkDotNet.Blog.Web/Features/Home/Components/SearchInput.razor similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/SearchInput.razor rename to src/LinkDotNet.Blog.Web/Features/Home/Components/SearchInput.razor diff --git a/src/LinkDotNet.Blog.Web/Shared/SearchInput.razor.css b/src/LinkDotNet.Blog.Web/Features/Home/Components/SearchInput.razor.css similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/SearchInput.razor.css rename to src/LinkDotNet.Blog.Web/Features/Home/Components/SearchInput.razor.css diff --git a/src/LinkDotNet.Blog.Web/Pages/Index.razor b/src/LinkDotNet.Blog.Web/Features/Home/Index.razor similarity index 95% rename from src/LinkDotNet.Blog.Web/Pages/Index.razor rename to src/LinkDotNet.Blog.Web/Features/Home/Index.razor index 51adac92..0111273f 100644 --- a/src/LinkDotNet.Blog.Web/Pages/Index.razor +++ b/src/LinkDotNet.Blog.Web/Features/Home/Index.razor @@ -2,9 +2,10 @@ @page "/{page:int}" @using Markdig @using X.PagedList -@using LinkDotNet.Blog.Web.Shared.Services @using LinkDotNet.Blog.Domain @using LinkDotNet.Blog.Infrastructure.Persistence +@using LinkDotNet.Blog.Web.Features.Services +@using LinkDotNet.Blog.Web.Features.Home.Components @inject IRepository blogPostRepository @inject AppConfiguration appConfiguration @inject NavigationManager navigationManager diff --git a/src/LinkDotNet.Blog.Web/Pages/Index.razor.css b/src/LinkDotNet.Blog.Web/Features/Home/Index.razor.css similarity index 100% rename from src/LinkDotNet.Blog.Web/Pages/Index.razor.css rename to src/LinkDotNet.Blog.Web/Features/Home/Index.razor.css diff --git a/src/LinkDotNet.Blog.Web/Features/Login.cshtml b/src/LinkDotNet.Blog.Web/Features/Login.cshtml new file mode 100644 index 00000000..a8ac85bd --- /dev/null +++ b/src/LinkDotNet.Blog.Web/Features/Login.cshtml @@ -0,0 +1,4 @@ +@page +@model LinkDotNet.Blog.Web.Features.LoginModel +@{ +} \ No newline at end of file diff --git a/src/LinkDotNet.Blog.Web/Pages/Login.cshtml.cs b/src/LinkDotNet.Blog.Web/Features/Login.cshtml.cs similarity index 91% rename from src/LinkDotNet.Blog.Web/Pages/Login.cshtml.cs rename to src/LinkDotNet.Blog.Web/Features/Login.cshtml.cs index d2b6b2ca..2184dba6 100644 --- a/src/LinkDotNet.Blog.Web/Pages/Login.cshtml.cs +++ b/src/LinkDotNet.Blog.Web/Features/Login.cshtml.cs @@ -2,7 +2,7 @@ using LinkDotNet.Blog.Web.Authentication; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace LinkDotNet.Blog.Web.Pages; +namespace LinkDotNet.Blog.Web.Features; public partial class LoginModel : PageModel { diff --git a/src/LinkDotNet.Blog.Web/Features/Logout.cshtml b/src/LinkDotNet.Blog.Web/Features/Logout.cshtml new file mode 100644 index 00000000..18e2bdb3 --- /dev/null +++ b/src/LinkDotNet.Blog.Web/Features/Logout.cshtml @@ -0,0 +1,4 @@ +@page +@model LinkDotNet.Blog.Web.Features.LogoutModel +@{ +} \ No newline at end of file diff --git a/src/LinkDotNet.Blog.Web/Pages/Logout.cshtml.cs b/src/LinkDotNet.Blog.Web/Features/Logout.cshtml.cs similarity index 91% rename from src/LinkDotNet.Blog.Web/Pages/Logout.cshtml.cs rename to src/LinkDotNet.Blog.Web/Features/Logout.cshtml.cs index e8038f48..a43b3760 100644 --- a/src/LinkDotNet.Blog.Web/Pages/Logout.cshtml.cs +++ b/src/LinkDotNet.Blog.Web/Features/Logout.cshtml.cs @@ -2,7 +2,7 @@ using LinkDotNet.Blog.Web.Authentication; using Microsoft.AspNetCore.Mvc.RazorPages; -namespace LinkDotNet.Blog.Web.Pages; +namespace LinkDotNet.Blog.Web.Features; public partial class LogoutModel : PageModel { diff --git a/src/LinkDotNet.Blog.Web/Shared/MarkdownComponentBase.cs b/src/LinkDotNet.Blog.Web/Features/MarkdownComponentBase.cs similarity index 94% rename from src/LinkDotNet.Blog.Web/Shared/MarkdownComponentBase.cs rename to src/LinkDotNet.Blog.Web/Features/MarkdownComponentBase.cs index 5e537fed..48a50c8b 100644 --- a/src/LinkDotNet.Blog.Web/Shared/MarkdownComponentBase.cs +++ b/src/LinkDotNet.Blog.Web/Features/MarkdownComponentBase.cs @@ -2,7 +2,7 @@ using Markdig.Extensions.AutoIdentifiers; using Microsoft.AspNetCore.Components; -namespace LinkDotNet.Blog.Web.Shared; +namespace LinkDotNet.Blog.Web.Features; public abstract class MarkdownComponentBase : ComponentBase { @@ -23,4 +23,4 @@ protected static MarkupString RenderMarkupString(string content) return (MarkupString)Markdown.ToHtml(content, MarkdownPipeline); } -} +} \ No newline at end of file diff --git a/src/LinkDotNet.Blog.Web/Pages/Search.razor b/src/LinkDotNet.Blog.Web/Features/Search/SearchPage.razor similarity index 96% rename from src/LinkDotNet.Blog.Web/Pages/Search.razor rename to src/LinkDotNet.Blog.Web/Features/Search/SearchPage.razor index 9f80a278..6c2f8d92 100644 --- a/src/LinkDotNet.Blog.Web/Pages/Search.razor +++ b/src/LinkDotNet.Blog.Web/Features/Search/SearchPage.razor @@ -1,7 +1,7 @@ @page "/search/{searchTerm}" -@using LinkDotNet.Blog.Web.Shared.Services @using LinkDotNet.Blog.Domain @using LinkDotNet.Blog.Infrastructure.Persistence +@using LinkDotNet.Blog.Web.Features.Services @inject IRepository blogPostRepository @inject IUserRecordService userRecordService diff --git a/src/LinkDotNet.Blog.Web/Pages/SearchByTag.razor b/src/LinkDotNet.Blog.Web/Features/SearchByTag/SearchByTagPage.razor similarity index 95% rename from src/LinkDotNet.Blog.Web/Pages/SearchByTag.razor rename to src/LinkDotNet.Blog.Web/Features/SearchByTag/SearchByTagPage.razor index b55f2204..defbfc5a 100644 --- a/src/LinkDotNet.Blog.Web/Pages/SearchByTag.razor +++ b/src/LinkDotNet.Blog.Web/Features/SearchByTag/SearchByTagPage.razor @@ -1,7 +1,7 @@ @page "/searchByTag/{tag}" -@using LinkDotNet.Blog.Web.Shared.Services @using LinkDotNet.Blog.Domain @using LinkDotNet.Blog.Infrastructure.Persistence +@using LinkDotNet.Blog.Web.Features.Services @inject IRepository blogPostRepository @inject IUserRecordService userRecordService diff --git a/src/LinkDotNet.Blog.Web/Shared/Services/ILocalStorageService.cs b/src/LinkDotNet.Blog.Web/Features/Services/ILocalStorageService.cs similarity index 82% rename from src/LinkDotNet.Blog.Web/Shared/Services/ILocalStorageService.cs rename to src/LinkDotNet.Blog.Web/Features/Services/ILocalStorageService.cs index 7b2491a1..1fd4bf40 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Services/ILocalStorageService.cs +++ b/src/LinkDotNet.Blog.Web/Features/Services/ILocalStorageService.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -namespace LinkDotNet.Blog.Web.Shared.Services; +namespace LinkDotNet.Blog.Web.Features.Services; public interface ILocalStorageService { diff --git a/src/LinkDotNet.Blog.Web/Shared/Services/ISortOrderCalculator.cs b/src/LinkDotNet.Blog.Web/Features/Services/ISortOrderCalculator.cs similarity index 80% rename from src/LinkDotNet.Blog.Web/Shared/Services/ISortOrderCalculator.cs rename to src/LinkDotNet.Blog.Web/Features/Services/ISortOrderCalculator.cs index e000635f..ff3e15b4 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Services/ISortOrderCalculator.cs +++ b/src/LinkDotNet.Blog.Web/Features/Services/ISortOrderCalculator.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using LinkDotNet.Blog.Domain; -namespace LinkDotNet.Blog.Web.Shared.Services; +namespace LinkDotNet.Blog.Web.Features.Services; public interface ISortOrderCalculator { int GetSortOrder(ProfileInformationEntry target, IEnumerable all); -} +} \ No newline at end of file diff --git a/src/LinkDotNet.Blog.Web/Shared/Services/IUserRecordService.cs b/src/LinkDotNet.Blog.Web/Features/Services/IUserRecordService.cs similarity index 67% rename from src/LinkDotNet.Blog.Web/Shared/Services/IUserRecordService.cs rename to src/LinkDotNet.Blog.Web/Features/Services/IUserRecordService.cs index d0ca4df6..291c2b51 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Services/IUserRecordService.cs +++ b/src/LinkDotNet.Blog.Web/Features/Services/IUserRecordService.cs @@ -1,8 +1,8 @@ using System.Threading.Tasks; -namespace LinkDotNet.Blog.Web.Shared.Services; +namespace LinkDotNet.Blog.Web.Features.Services; public interface IUserRecordService { Task StoreUserRecordAsync(); -} +} \ No newline at end of file diff --git a/src/LinkDotNet.Blog.Web/Shared/Services/LocalStorageService.cs b/src/LinkDotNet.Blog.Web/Features/Services/LocalStorageService.cs similarity index 93% rename from src/LinkDotNet.Blog.Web/Shared/Services/LocalStorageService.cs rename to src/LinkDotNet.Blog.Web/Features/Services/LocalStorageService.cs index af7ba223..45a0c90d 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Services/LocalStorageService.cs +++ b/src/LinkDotNet.Blog.Web/Features/Services/LocalStorageService.cs @@ -1,7 +1,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage; -namespace LinkDotNet.Blog.Web.Shared.Services; +namespace LinkDotNet.Blog.Web.Features.Services; public class LocalStorageService : ILocalStorageService { @@ -26,4 +26,4 @@ public async ValueTask SetItemAsync(string key, T value) { await localStorage.SetAsync(key, value); } -} +} \ No newline at end of file diff --git a/src/LinkDotNet.Blog.Web/Shared/Services/SortOrderCalculator.cs b/src/LinkDotNet.Blog.Web/Features/Services/SortOrderCalculator.cs similarity index 92% rename from src/LinkDotNet.Blog.Web/Shared/Services/SortOrderCalculator.cs rename to src/LinkDotNet.Blog.Web/Features/Services/SortOrderCalculator.cs index 8b9b5abb..559f1f60 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Services/SortOrderCalculator.cs +++ b/src/LinkDotNet.Blog.Web/Features/Services/SortOrderCalculator.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using LinkDotNet.Blog.Domain; -namespace LinkDotNet.Blog.Web.Shared.Services; +namespace LinkDotNet.Blog.Web.Features.Services; public class SortOrderCalculator : ISortOrderCalculator { diff --git a/src/LinkDotNet.Blog.Web/Shared/Services/UserRecordService.cs b/src/LinkDotNet.Blog.Web/Features/Services/UserRecordService.cs similarity index 98% rename from src/LinkDotNet.Blog.Web/Shared/Services/UserRecordService.cs rename to src/LinkDotNet.Blog.Web/Features/Services/UserRecordService.cs index 037503f9..b28ca496 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Services/UserRecordService.cs +++ b/src/LinkDotNet.Blog.Web/Features/Services/UserRecordService.cs @@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Authorization; -namespace LinkDotNet.Blog.Web.Shared.Services; +namespace LinkDotNet.Blog.Web.Features.Services; public class UserRecordService : IUserRecordService { @@ -100,4 +100,4 @@ private string GetClickedUrl() var queryIndex = basePath.IndexOf('?'); return queryIndex >= 0 ? basePath[..queryIndex] : basePath; } -} +} \ No newline at end of file diff --git a/src/LinkDotNet.Blog.Web/Shared/Admin/BlogPostAdminActions.razor b/src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/BlogPostAdminActions.razor similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/Admin/BlogPostAdminActions.razor rename to src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/BlogPostAdminActions.razor diff --git a/src/LinkDotNet.Blog.Web/Shared/CommentSection.razor b/src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/CommentSection.razor similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/CommentSection.razor rename to src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/CommentSection.razor diff --git a/src/LinkDotNet.Blog.Web/Shared/Disqus.razor b/src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/Disqus.razor similarity index 87% rename from src/LinkDotNet.Blog.Web/Shared/Disqus.razor rename to src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/Disqus.razor index 01df4a92..9e05872d 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Disqus.razor +++ b/src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/Disqus.razor @@ -8,7 +8,7 @@ { if (firstRender && appConfiguration.IsDisqusEnabled) { - await jsRuntime.InvokeAsync("import", "./Shared/Disqus.razor.js"); + await jsRuntime.InvokeAsync("import", "./Features/ShowBlogPost/Components/Disqus.razor.js"); await jsRuntime.InvokeVoidAsync("initDisqus", appConfiguration.DisqusConfiguration); } } diff --git a/src/LinkDotNet.Blog.Web/Shared/Disqus.razor.js b/src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/Disqus.razor.js similarity index 100% rename from src/LinkDotNet.Blog.Web/Shared/Disqus.razor.js rename to src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/Disqus.razor.js diff --git a/src/LinkDotNet.Blog.Web/Shared/Services/DisqusConfiguration.cs b/src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/DisqusConfiguration.cs similarity index 55% rename from src/LinkDotNet.Blog.Web/Shared/Services/DisqusConfiguration.cs rename to src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/DisqusConfiguration.cs index bb3457c0..b2232e8e 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Services/DisqusConfiguration.cs +++ b/src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/DisqusConfiguration.cs @@ -1,4 +1,4 @@ -namespace LinkDotNet.Blog.Web.Shared.Services; +namespace LinkDotNet.Blog.Web.Features.ShowBlogPost.Components; public record DisqusConfiguration { diff --git a/src/LinkDotNet.Blog.Web/Shared/Giscus.razor b/src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/Giscus.razor similarity index 87% rename from src/LinkDotNet.Blog.Web/Shared/Giscus.razor rename to src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/Giscus.razor index b88a2796..ad72d216 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Giscus.razor +++ b/src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/Giscus.razor @@ -8,7 +8,7 @@ { if (firstRender && appConfiguration.IsGiscusEnabled) { - await jsRuntime.InvokeAsync("import", "./Shared/Giscus.razor.js"); + await jsRuntime.InvokeAsync("import", "./Features/ShowBlogPost/Components/Giscus.razor.js"); await jsRuntime.InvokeVoidAsync("initGiscus", "giscus", appConfiguration.GiscusConfiguration); } } diff --git a/src/LinkDotNet.Blog.Web/Shared/Giscus.razor.js b/src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/Giscus.razor.js similarity index 93% rename from src/LinkDotNet.Blog.Web/Shared/Giscus.razor.js rename to src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/Giscus.razor.js index 2ba450e3..f26bf772 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Giscus.razor.js +++ b/src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/Giscus.razor.js @@ -1,4 +1,4 @@ -window.initGiscus = (divClass, giscus) => { +window.initGiscus = (divClass, giscus) => { const script = document.createElement('script'); script.src = 'https://giscus.app/client.js' script.setAttribute('data-repo', giscus.repository) diff --git a/src/LinkDotNet.Blog.Web/Shared/Services/GiscusConfiguration.cs b/src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/GiscusConfiguration.cs similarity index 76% rename from src/LinkDotNet.Blog.Web/Shared/Services/GiscusConfiguration.cs rename to src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/GiscusConfiguration.cs index 00549691..743feb88 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Services/GiscusConfiguration.cs +++ b/src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/GiscusConfiguration.cs @@ -1,4 +1,4 @@ -namespace LinkDotNet.Blog.Web.Shared.Services; +namespace LinkDotNet.Blog.Web.Features.ShowBlogPost.Components; public record GiscusConfiguration { @@ -9,4 +9,4 @@ public record GiscusConfiguration public string Category { get; init; } public string CategoryId { get; init; } -} +} \ No newline at end of file diff --git a/src/LinkDotNet.Blog.Web/Shared/Like.razor b/src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/Like.razor similarity index 94% rename from src/LinkDotNet.Blog.Web/Shared/Like.razor rename to src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/Like.razor index c78d8fdc..00a6f02a 100644 --- a/src/LinkDotNet.Blog.Web/Shared/Like.razor +++ b/src/LinkDotNet.Blog.Web/Features/ShowBlogPost/Components/Like.razor @@ -1,5 +1,5 @@ -@using LinkDotNet.Blog.Web.Shared.Services -@using LinkDotNet.Blog.Domain +@using LinkDotNet.Blog.Domain +@using LinkDotNet.Blog.Web.Features.Services @inject ILocalStorageService localStorage