File tree Expand file tree Collapse file tree 2 files changed +1
-35
lines changed
ProjectLighthouse.Servers.Website/Pages Expand file tree Collapse file tree 2 files changed +1
-35
lines changed Original file line number Diff line number Diff line change 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" >
Original file line number Diff line number Diff line change 55using LBPUnion . ProjectLighthouse . Servers . Website . Pages . Layouts ;
66using LBPUnion . ProjectLighthouse . Types . Entities . Level ;
77using LBPUnion . ProjectLighthouse . Types . Entities . Profile ;
8- using LBPUnion . ProjectLighthouse . Types . Entities . Website ;
98using LBPUnion . ProjectLighthouse . Types . Levels ;
109using Microsoft . AspNetCore . Mvc ;
1110using 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}
You can’t perform that action at this time.
0 commit comments