Added project page
This commit is contained in:
@@ -3,5 +3,3 @@
|
||||
<PageTitle>Portfolio von Leon Hoppe</PageTitle>
|
||||
|
||||
<h1>Hello, world!</h1>
|
||||
|
||||
Welcome to your new app.
|
||||
23
src/Portfolio.Web/Components/Pages/ProjectsPage.razor
Normal file
23
src/Portfolio.Web/Components/Pages/ProjectsPage.razor
Normal 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);
|
||||
}
|
||||
}
|
||||
13
src/Portfolio.Web/Components/Pages/ProjectsPage.razor.css
Normal file
13
src/Portfolio.Web/Components/Pages/ProjectsPage.razor.css
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user