diff --git a/ProjectLighthouse/Pages/LandingPage.cshtml b/ProjectLighthouse/Pages/LandingPage.cshtml index d48da0f5..bc09fccb 100644 --- a/ProjectLighthouse/Pages/LandingPage.cshtml +++ b/ProjectLighthouse/Pages/LandingPage.cshtml @@ -45,10 +45,12 @@ else } } +
+
-

Latest Team Picks

+

Latest Team Picks

@foreach (Slot slot in Model.LatestTeamPicks) @@ -64,11 +66,11 @@ else
}
-
-

Trending Levels

+
+

Newest Levels

- @foreach (Slot slot in Model.TrendingLevels) + @foreach (Slot slot in Model.NewestLevels) { @await Html.PartialAsync("Partials/SlotCardPartial", slot, Model.GetSlotViewData(slot.SlotId, isMobile))
diff --git a/ProjectLighthouse/Pages/LandingPage.cshtml.cs b/ProjectLighthouse/Pages/LandingPage.cshtml.cs index 8cd35a1d..dab09ea4 100644 --- a/ProjectLighthouse/Pages/LandingPage.cshtml.cs +++ b/ProjectLighthouse/Pages/LandingPage.cshtml.cs @@ -24,7 +24,7 @@ public class LandingPage : BaseLayout public int PlayersOnlineCount; public List LatestTeamPicks; - public List TrendingLevels; + public List NewestLevels; [UsedImplicitly] public async Task OnGet() @@ -47,17 +47,12 @@ public class LandingPage : BaseLayout this.LatestTeamPicks = await this.Database.Slots.Where (s => s.TeamPick) - .OrderBy(s => s.FirstUploaded) + .OrderByDescending(s => s.FirstUploaded) .Take(maxShownLevels) .Include(s => s.Creator) .ToListAsync(); - this.TrendingLevels = await this.Database.Slots.OrderByDescending - (s => s.PlaysLBP1Unique + s.PlaysLBP2Unique + s.PlaysLBP3Unique + s.PlaysLBPVitaUnique) - .ThenBy(s => s.FirstUploaded) - .Take(maxShownLevels) - .Include(s => s.Creator) - .ToListAsync(); + this.NewestLevels = await this.Database.Slots.OrderByDescending(s => s.FirstUploaded).Take(maxShownLevels).Include(s => s.Creator).ToListAsync(); return this.Page(); }