feat : modif composant
continuous-integration/drone/push Build is passing Details

Multiplayer_Php
Yvan CALATAYUD 1 year ago
parent df6b0d6046
commit e98baf9966

@ -1,6 +1,29 @@

<div class="card text-center">
@CardHeader
@CardBody
@CardFooter
<BackButton RedirectionPage="/questions"></BackButton>
<div class="text-center pb-2">
<h3>Question n°@Question.Id</h3>
</div>
<div class="text-center pb-5 mt-3">
<h5>@Question.Content</h5>
</div>
<div class="container-fluid text-center justify-content-center row card-body">
@foreach (var answer in Answers)
{
<div class="col-3 text-center">
@if (answer.Id == Question.IdAnswerGood)
{
<p class="text-success"><strong>@answer.Content</strong></p>
}
else
{
<p class="text-danger">@answer.Content</p>
}
</div>
}
</div>
<div class="card-footer text-center text-muted">
Chapitre : @Question.ChapterName
</div>

@ -1,16 +1,15 @@
using Microsoft.AspNetCore.Components;
using Blazor.Pages;
using Blazor.ViewClasses;
using Microsoft.AspNetCore.Components;
namespace Blazor.Components
{
public partial class CardViewQuestion
{
[Parameter]
public RenderFragment CardBody { get; set; }
public Question Question { get; set; }
[Parameter]
public RenderFragment CardFooter { get; set; }
[Parameter]
public RenderFragment CardHeader { get; set; }
public List<Answer> Answers { get; set; }
}
}

@ -2,36 +2,4 @@
@using Blazor.Components;
<CardViewQuestion>
<CardHeader>
<div class="text-center pb-2">
<h3>Question n°@question.Id</h3>
</div>
<div class="text-center pb-5 mt-3">
<h5>@question.Content</h5>
</div>
</CardHeader>
<CardBody>
<div class="container-fluid text-center justify-content-center row">
@foreach (var answer in answers)
{
<div class="col-3 text-center">
@if (answer.Id == question.IdAnswerGood)
{
<p class="text-success"><strong>@answer.Content</strong></p>
}
else
{
<p class="text-danger">@answer.Content</p>
}
</div>
}
</div>
</CardBody>
<CardFooter>
<div class="card-footer text-muted">
Chapitre : @question.ChapterName
</div>
<BackButton RedirectionPage="/questions"></BackButton>
</CardFooter>
</CardViewQuestion>
<CardViewQuestion Question="@question" Answers="@answers"></CardViewQuestion>

Loading…
Cancel
Save