mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-01 09:48:37 +00:00
Proper ordering, change trending levels to newest levels
This commit is contained in:
parent
d2b5eaa612
commit
75254ad6eb
2 changed files with 9 additions and 12 deletions
|
@ -45,10 +45,12 @@ else
|
|||
}
|
||||
}
|
||||
|
||||
<br>
|
||||
|
||||
<div class="@(isMobile ? "" : "ui center aligned grid")">
|
||||
<div class="eight wide column">
|
||||
<div class="ui pink segment">
|
||||
<h1>Latest Team Picks</h1>
|
||||
<h1><i class="ribbon icon"></i>Latest Team Picks</h1>
|
||||
<div class="ui divider"></div>
|
||||
<div class="ui left aligned segment">
|
||||
@foreach (Slot slot in Model.LatestTeamPicks)
|
||||
|
@ -64,11 +66,11 @@ else
|
|||
<br>
|
||||
}
|
||||
<div class="eight wide column">
|
||||
<div class="ui orange segment">
|
||||
<h1>Trending Levels</h1>
|
||||
<div class="ui blue segment">
|
||||
<h1><i class="certificate icon"></i>Newest Levels</h1>
|
||||
<div class="ui divider"></div>
|
||||
<div class="ui left aligned segment">
|
||||
@foreach (Slot slot in Model.TrendingLevels)
|
||||
@foreach (Slot slot in Model.NewestLevels)
|
||||
{
|
||||
@await Html.PartialAsync("Partials/SlotCardPartial", slot, Model.GetSlotViewData(slot.SlotId, isMobile))
|
||||
<br>
|
||||
|
|
|
@ -24,7 +24,7 @@ public class LandingPage : BaseLayout
|
|||
public int PlayersOnlineCount;
|
||||
|
||||
public List<Slot> LatestTeamPicks;
|
||||
public List<Slot> TrendingLevels;
|
||||
public List<Slot> NewestLevels;
|
||||
|
||||
[UsedImplicitly]
|
||||
public async Task<IActionResult> 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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue