diff --git a/ProjectLighthouse.Servers.Website/Pages/LandingPage.cshtml.cs b/ProjectLighthouse.Servers.Website/Pages/LandingPage.cshtml.cs
index f866557b3..37edf44bd 100644
--- a/ProjectLighthouse.Servers.Website/Pages/LandingPage.cshtml.cs
+++ b/ProjectLighthouse.Servers.Website/Pages/LandingPage.cshtml.cs
@@ -5,6 +5,7 @@
using LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts;
using LBPUnion.ProjectLighthouse.Types.Entities.Level;
using LBPUnion.ProjectLighthouse.Types.Entities.Profile;
+using LBPUnion.ProjectLighthouse.Types.Entities.Website;
using LBPUnion.ProjectLighthouse.Types.Levels;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
@@ -19,6 +20,8 @@ public class LandingPage : BaseLayout
public int PendingAuthAttempts;
public List PlayersOnline = new();
+ public WebsiteAnnouncementEntity? LatestAnnouncement;
+
public LandingPage(DatabaseContext database) : base(database)
{ }
@@ -54,6 +57,10 @@ public async Task OnGet()
.Include(s => s.Creator)
.ToListAsync();
+ this.LatestAnnouncement = await this.Database.WebsiteAnnouncements.Include(a => a.Publisher)
+ .OrderByDescending(a => a.AnnouncementId)
+ .FirstOrDefaultAsync();
+
return this.Page();
}
}
\ No newline at end of file
diff --git a/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml b/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml
index 5de98aa34..14f147822 100644
--- a/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml
+++ b/ProjectLighthouse.Servers.Website/Pages/Layouts/BaseLayout.cshtml
@@ -178,6 +178,18 @@
}
+ @if (ServerConfiguration.Instance.UserGeneratedContentLimits.ReadOnlyMode)
+ {
+
diff --git a/ProjectLighthouse.Servers.Website/Pages/Partials/CommentsPartial.cshtml b/ProjectLighthouse.Servers.Website/Pages/Partials/CommentsPartial.cshtml
index 4a2a98691..cbab2fdbb 100644
--- a/ProjectLighthouse.Servers.Website/Pages/Partials/CommentsPartial.cshtml
+++ b/ProjectLighthouse.Servers.Website/Pages/Partials/CommentsPartial.cshtml
@@ -1,4 +1,5 @@
@using System.Web
+@using LBPUnion.ProjectLighthouse.Configuration
@using LBPUnion.ProjectLighthouse.Database
@using LBPUnion.ProjectLighthouse.Localization
@using LBPUnion.ProjectLighthouse.Servers.Website.Extensions
@@ -31,18 +32,32 @@
@if (Model.CommentsEnabled && Model.User != null)
{
-