From 8a8431f329bb35bd30ae0407647b2756f160d59f Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 9 Jun 2025 22:43:31 +0100 Subject: [PATCH] Save --- .../Components/BlogCommentComponent.cs | 2 ++ .../Controllers/PreviewController.cs | 13 ------------- .../Controllers/SitemapController.cs | 5 +++++ .../Middleware/IpqsBlockMiddleware.cs | 3 ++- CatherineLynwood/Views/Discovery/Epilogue.cshtml | 2 +- .../Views/Discovery/MaggiesDesigns.cshtml | 4 +++- .../Views/Discovery/ScrapBook.cshtml | 4 +++- CatherineLynwood/Views/Home/Index.cshtml | 2 +- CatherineLynwood/Views/Home/Privacy.cshtml | 6 +++++- CatherineLynwood/Views/Preview/Index.cshtml | 5 ----- .../BlogCommentComponent/Default.cshtml | 16 ++++++++++++++-- .../Views/TheAlphaFlame/Chapter1.cshtml | 2 +- .../Views/TheAlphaFlame/Chapter13.cshtml | 2 +- .../Views/TheAlphaFlame/Chapter2.cshtml | 2 +- .../Views/TheAlphaFlame/Index.cshtml | 2 +- CatherineLynwood/wwwroot/css/site.css | 6 +++++- CatherineLynwood/wwwroot/css/site.min.css | 2 +- 17 files changed, 46 insertions(+), 32 deletions(-) delete mode 100644 CatherineLynwood/Controllers/PreviewController.cs delete mode 100644 CatherineLynwood/Views/Preview/Index.cshtml diff --git a/CatherineLynwood/Components/BlogCommentComponent.cs b/CatherineLynwood/Components/BlogCommentComponent.cs index b735915..118a58d 100644 --- a/CatherineLynwood/Components/BlogCommentComponent.cs +++ b/CatherineLynwood/Components/BlogCommentComponent.cs @@ -18,6 +18,8 @@ namespace CatherineLynwood.Components public async Task InvokeAsync(int blogID) { + ViewData["VpnWarning"] = HttpContext.Items.ContainsKey("IsVpn") && (bool)HttpContext.Items["IsVpn"]; + BlogComments blogComments = await _dataAccess.GetBlogCommentsAsync(blogID); PreFillContact preFillContact = Request.Cookies["PreFill"] != null ? JsonConvert.DeserializeObject(Request.Cookies["PreFill"]) : new PreFillContact(); diff --git a/CatherineLynwood/Controllers/PreviewController.cs b/CatherineLynwood/Controllers/PreviewController.cs deleted file mode 100644 index f229b8f..0000000 --- a/CatherineLynwood/Controllers/PreviewController.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Microsoft.AspNetCore.Mvc; - -namespace CatherineLynwood.Controllers -{ - [Route("preview-group")] - public class PreviewController : Controller - { - public IActionResult Index() - { - return View(); - } - } -} diff --git a/CatherineLynwood/Controllers/SitemapController.cs b/CatherineLynwood/Controllers/SitemapController.cs index 4ad1bea..b9707a3 100644 --- a/CatherineLynwood/Controllers/SitemapController.cs +++ b/CatherineLynwood/Controllers/SitemapController.cs @@ -41,6 +41,11 @@ namespace CatherineLynwood.Controllers new SitemapEntry { Url = Url.Action("Blog", "TheAlphaFlame", null, Request.Scheme).TrimEnd('/'), LastModified = DateTime.UtcNow }, new SitemapEntry { Url = Url.Action("Characters", "TheAlphaFlame", null, Request.Scheme).TrimEnd('/'), LastModified = DateTime.UtcNow }, new SitemapEntry { Url = Url.Action("Discovery", "TheAlphaFlame", null, Request.Scheme).TrimEnd('/'), LastModified = DateTime.UtcNow }, + new SitemapEntry { Url = Url.Action("Index", "Publishing", null, Request.Scheme).TrimEnd('/'), LastModified = DateTime.UtcNow }, + new SitemapEntry { Url = Url.Action("Privacy", "Home", null, Request.Scheme).TrimEnd('/'), LastModified = DateTime.UtcNow }, + new SitemapEntry { Url = Url.Action("Chapter1", "TheAlphaFlame", null, Request.Scheme).TrimEnd('/'), LastModified = DateTime.UtcNow }, + new SitemapEntry { Url = Url.Action("Chapter2", "TheAlphaFlame", null, Request.Scheme).TrimEnd('/'), LastModified = DateTime.UtcNow }, + new SitemapEntry { Url = Url.Action("Chapter13", "TheAlphaFlame", null, Request.Scheme).TrimEnd('/'), LastModified = DateTime.UtcNow }, // Additional static pages }; diff --git a/CatherineLynwood/Middleware/IpqsBlockMiddleware.cs b/CatherineLynwood/Middleware/IpqsBlockMiddleware.cs index 5370bdf..cae6f88 100644 --- a/CatherineLynwood/Middleware/IpqsBlockMiddleware.cs +++ b/CatherineLynwood/Middleware/IpqsBlockMiddleware.cs @@ -12,7 +12,8 @@ namespace CatherineLynwood.Middleware private static readonly string[] ProtectedPaths = new[] { "/ask-a-question", - "/contact-catherine" + "/contact-catherine", + "/the-alpha-flame/blog/" }; public IpqsBlockMiddleware(RequestDelegate next, IHttpClientFactory httpClientFactory, ILogger logger) diff --git a/CatherineLynwood/Views/Discovery/Epilogue.cshtml b/CatherineLynwood/Views/Discovery/Epilogue.cshtml index ad18cc7..034953f 100644 --- a/CatherineLynwood/Views/Discovery/Epilogue.cshtml +++ b/CatherineLynwood/Views/Discovery/Epilogue.cshtml @@ -1,5 +1,5 @@ @{ - ViewData["Title"] = "The Alpha Flame | Chapter 1 Excerpt"; + ViewData["Title"] = "The Alpha Flame: Discovery Epilogue"; }
diff --git a/CatherineLynwood/Views/Discovery/MaggiesDesigns.cshtml b/CatherineLynwood/Views/Discovery/MaggiesDesigns.cshtml index 8166993..3c60609 100644 --- a/CatherineLynwood/Views/Discovery/MaggiesDesigns.cshtml +++ b/CatherineLynwood/Views/Discovery/MaggiesDesigns.cshtml @@ -1,4 +1,6 @@ - +@{ + ViewData["Title"] = "The Alpha Flame: Discovery Maggie's Designs"; +}