Added project page

This commit is contained in:
2025-01-21 18:32:33 +01:00
parent 21e45a8bf7
commit e36c576b79
9 changed files with 211 additions and 2 deletions

View File

@@ -3,5 +3,3 @@
<PageTitle>Portfolio von Leon Hoppe</PageTitle>
<h1>Hello, world!</h1>
Welcome to your new app.

View File

@@ -0,0 +1,23 @@
@page "/projects"
@using Portfolio.Shared.Models
@using Portfolio.Shared.Services
@using Portfolio.Web.Components.Components
<h2>Alle Projekte</h2>
<div class="project-container">
@foreach (var project in _projects) {
<ProjectView Project="project" />
}
</div>
@inherits CancellableComponent
@inject IProjectRepository ProjectRepo
@code {
private IEnumerable<Project> _projects = [];
protected override async Task OnInitializedAsync() {
_projects = await ProjectRepo.GetProjects(TokenSource.Token);
}
}

View File

@@ -0,0 +1,13 @@
.project-container {
display: flex;
flex-wrap: wrap;
gap: 100px;
justify-content: space-evenly;
}
h2 {
margin-top: 3rem;
margin-bottom: 5rem;
font-size: 2rem;
font-weight: 600;
}