2023-08-06 02:29:10 +01:00
|
|
|
@page
|
2024-03-02 00:43:56 +00:00
|
|
|
@using OliverBooth.Common.Data.Web.Projects
|
|
|
|
@using OliverBooth.Common.Services
|
2023-09-24 14:36:36 +01:00
|
|
|
@inject IProjectService ProjectService
|
2023-08-06 02:29:10 +01:00
|
|
|
@{
|
|
|
|
ViewData["Title"] = "Projects";
|
2023-12-24 12:20:03 +00:00
|
|
|
|
|
|
|
IEnumerable<IProject> projects = ProjectService.GetProjects(ProjectStatus.Ongoing).OrderBy(p => p.Rank)
|
|
|
|
.Concat(ProjectService.GetProjects(ProjectStatus.Past).OrderBy(p => p.Rank))
|
2023-12-26 20:59:18 +00:00
|
|
|
.Concat(ProjectService.GetProjects(ProjectStatus.Retired).OrderBy(p => p.Rank))
|
2023-12-24 12:20:03 +00:00
|
|
|
.Concat(ProjectService.GetProjects(ProjectStatus.Hiatus).OrderBy(p => p.Rank));
|
2023-08-06 02:29:10 +01:00
|
|
|
}
|
|
|
|
|
2023-12-22 14:49:16 +00:00
|
|
|
<main class="container">
|
|
|
|
<h1 class="display-4">Projects</h1>
|
2023-09-20 17:20:41 +01:00
|
|
|
|
2023-12-24 12:20:03 +00:00
|
|
|
@foreach (IProject[] chunk in projects.Chunk(2))
|
2023-12-22 14:49:16 +00:00
|
|
|
{
|
|
|
|
<div class="card-group row" style="margin-top: 20px;">
|
|
|
|
@foreach (IProject project in chunk)
|
|
|
|
{
|
|
|
|
<div class="col-xs-1 col-md-6 col-lg-6 d-flex align-items-stretch">
|
2023-12-24 12:20:03 +00:00
|
|
|
@switch (project.Status)
|
|
|
|
{
|
|
|
|
case ProjectStatus.Ongoing:
|
|
|
|
<div class="project-card">
|
2023-12-26 15:35:27 +00:00
|
|
|
<div class="project-image">
|
|
|
|
<a asp-page="Project" asp-route-slug="@project.Slug">
|
|
|
|
<img src="https://cdn.olivr.me/projects/hero/@project.HeroUrl" class="card-img-top" alt="@project.Name">
|
|
|
|
</a>
|
2023-12-24 12:20:03 +00:00
|
|
|
<a asp-page="Project" asp-route-slug="@project.Slug">
|
2023-12-26 15:35:27 +00:00
|
|
|
<p class="project-title">@project.Name</p>
|
2023-12-24 12:20:03 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
break;
|
2023-08-06 02:29:10 +01:00
|
|
|
|
2023-12-24 12:20:03 +00:00
|
|
|
case ProjectStatus.Past:
|
|
|
|
<div class="border-info project-card">
|
2023-12-26 15:35:27 +00:00
|
|
|
<div class="project-image">
|
|
|
|
<a asp-page="Project" asp-route-slug="@project.Slug">
|
|
|
|
<img src="https://cdn.olivr.me/projects/hero/@project.HeroUrl" class="card-img-top" alt="@project.Name">
|
|
|
|
</a>
|
2023-12-24 12:20:03 +00:00
|
|
|
<a asp-page="Project" asp-route-slug="@project.Slug">
|
2023-12-26 15:35:27 +00:00
|
|
|
<p class="project-title">@project.Name</p>
|
2023-12-24 12:20:03 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
break;
|
2023-08-06 02:29:10 +01:00
|
|
|
|
2023-12-26 20:55:32 +00:00
|
|
|
case ProjectStatus.Retired:
|
2023-12-24 12:20:03 +00:00
|
|
|
<div class="border-danger project-card">
|
2023-12-26 15:35:27 +00:00
|
|
|
<div class="project-image">
|
|
|
|
<a asp-page="Project" asp-route-slug="@project.Slug">
|
|
|
|
<img src="https://cdn.olivr.me/projects/hero/@project.HeroUrl" class="card-img-top" alt="@project.Name">
|
|
|
|
</a>
|
2023-12-24 12:20:03 +00:00
|
|
|
<a asp-page="Project" asp-route-slug="@project.Slug">
|
2023-12-26 15:35:27 +00:00
|
|
|
<p class="project-title">@project.Name</p>
|
2023-12-24 12:20:03 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
break;
|
2023-12-26 20:55:32 +00:00
|
|
|
|
|
|
|
case ProjectStatus.Hiatus:
|
|
|
|
<div class="border-warning project-card">
|
|
|
|
<div class="project-image">
|
|
|
|
<a asp-page="Project" asp-route-slug="@project.Slug">
|
|
|
|
<img src="https://cdn.olivr.me/projects/hero/@project.HeroUrl" class="card-img-top" alt="@project.Name">
|
|
|
|
</a>
|
|
|
|
<a asp-page="Project" asp-route-slug="@project.Slug">
|
|
|
|
<p class="project-title">@project.Name</p>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
break;
|
2023-12-24 12:20:03 +00:00
|
|
|
}
|
2023-09-24 14:36:36 +01:00
|
|
|
</div>
|
2023-12-22 14:49:16 +00:00
|
|
|
}
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
</main>
|