oliverbooth.dev/OliverBooth/Pages/Projects/Project.cshtml.cs
Oliver Booth cbfdefae71
style: redesign projects page
This change separates the project logo and details into separate pages and makes the list more visually striking.
2023-12-24 12:20:03 +00:00

25 lines
578 B
C#

using Microsoft.AspNetCore.Mvc.RazorPages;
using OliverBooth.Data.Web;
using OliverBooth.Services;
namespace OliverBooth.Pages.Projects;
public class Project : PageModel
{
private readonly IProjectService _projectService;
public Project(IProjectService projectService)
{
_projectService = projectService;
}
public IProject? SelectedProject { get; private set; }
public void OnGet(string slug)
{
if (_projectService.TryGetProject(slug, out IProject? project))
{
SelectedProject = project;
}
}
}