Skip to content

Commit 975fcab

Browse files
committed
Revert "Display the latest announcement (if any) on the landing page"
This reverts commit a5ba584. Commit was intended for the `read-only` branch and was pushed to `main` in error.
1 parent a5ba584 commit 975fcab

File tree

2 files changed

+1
-35
lines changed

2 files changed

+1
-35
lines changed

ProjectLighthouse.Servers.Website/Pages/LandingPage.cshtml

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -60,34 +60,7 @@
6060
}
6161
}
6262

63-
@if (Model.LatestAnnouncement != null)
64-
{
65-
<div class="ui blue segment" style="position: relative;">
66-
<div>
67-
<h3>@Model.LatestAnnouncement.Title</h3>
68-
<div style="padding-bottom: 2em;">
69-
<span style="white-space: pre-line">
70-
@(Model.LatestAnnouncement.Content.Length > 250
71-
? Model.LatestAnnouncement.Content[..250] + $"... [read more]({ServerConfiguration.Instance.ExternalUrl}/notifications)"
72-
: Model.LatestAnnouncement.Content)
73-
</span>
74-
</div>
75-
@if (Model.LatestAnnouncement.Publisher != null)
76-
{
77-
<div class="ui tiny bottom left attached label">
78-
Posted by
79-
<a style="color: black" href="~/user/@Model.LatestAnnouncement.Publisher.UserId">
80-
@Model.LatestAnnouncement.Publisher.Username
81-
</a>
82-
</div>
83-
}
84-
</div>
85-
</div>
86-
}
87-
else
88-
{
89-
<br /><br />
90-
}
63+
<br><br>
9164

9265
<div class="@(isMobile ? "" : "ui center aligned grid")">
9366
<div class="eight wide column">

ProjectLighthouse.Servers.Website/Pages/LandingPage.cshtml.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using LBPUnion.ProjectLighthouse.Servers.Website.Pages.Layouts;
66
using LBPUnion.ProjectLighthouse.Types.Entities.Level;
77
using LBPUnion.ProjectLighthouse.Types.Entities.Profile;
8-
using LBPUnion.ProjectLighthouse.Types.Entities.Website;
98
using LBPUnion.ProjectLighthouse.Types.Levels;
109
using Microsoft.AspNetCore.Mvc;
1110
using Microsoft.EntityFrameworkCore;
@@ -20,8 +19,6 @@ public class LandingPage : BaseLayout
2019
public int PendingAuthAttempts;
2120
public List<UserEntity> PlayersOnline = new();
2221

23-
public WebsiteAnnouncementEntity? LatestAnnouncement;
24-
2522
public LandingPage(DatabaseContext database) : base(database)
2623
{ }
2724

@@ -57,10 +54,6 @@ public async Task<IActionResult> OnGet()
5754
.Include(s => s.Creator)
5855
.ToListAsync();
5956

60-
this.LatestAnnouncement = await this.Database.WebsiteAnnouncements.Include(a => a.Publisher)
61-
.OrderByDescending(a => a.AnnouncementId)
62-
.FirstOrDefaultAsync();
63-
6457
return this.Page();
6558
}
6659
}

0 commit comments

Comments
 (0)