2023-08-06 02:29:10 +01:00
|
|
|
@page
|
2023-09-24 14:36:36 +01:00
|
|
|
@using OliverBooth.Data.Web
|
|
|
|
@using OliverBooth.Services
|
|
|
|
@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))
|
|
|
|
.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">
|
|
|
|
<div class="ribbon ribbon-top-left green">
|
|
|
|
<a asp-page="Project" asp-route-slug="@project.Slug">
|
|
|
|
<span>Ongoing</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<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">
|
2023-12-22 14:49:16 +00:00
|
|
|
</a>
|
2023-12-24 12:20:03 +00:00
|
|
|
</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">
|
|
|
|
<div class="ribbon ribbon-top-left blue">
|
|
|
|
<a asp-page="Project" asp-route-slug="@project.Slug">
|
|
|
|
<span>Past Work</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<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">
|
2023-12-22 14:49:16 +00:00
|
|
|
</a>
|
2023-12-24 12:20:03 +00:00
|
|
|
</div>
|
|
|
|
break;
|
2023-08-06 02:29:10 +01:00
|
|
|
|
2023-12-24 12:20:03 +00:00
|
|
|
case ProjectStatus.Hiatus:
|
|
|
|
<div class="border-danger project-card">
|
|
|
|
<div class="ribbon ribbon-top-left red">
|
|
|
|
|
|
|
|
<a asp-page="Project" asp-route-slug="@project.Slug">
|
|
|
|
<span>On Hiatus</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
<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">
|
2023-12-22 14:49:16 +00:00
|
|
|
</a>
|
2023-12-24 12:20:03 +00:00
|
|
|
</div>
|
|
|
|
break;
|
|
|
|
}
|
2023-09-24 14:36:36 +01:00
|
|
|
</div>
|
2023-12-22 14:49:16 +00:00
|
|
|
}
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
</main>
|