recuperation push

pull/18/head^2
kentin.brongniart 4 months ago
parent 069c587cde
commit 415257342c

@ -1,4 +1,6 @@
using Microsoft.AspNetCore.Components; using Blazored.LocalStorage;
using Blazorise.DataGrid;
using Microsoft.AspNetCore.Components;
using WF_WebAdmin.Model; using WF_WebAdmin.Model;

@ -5,35 +5,40 @@
<h1>Accueil</h1> <h1>Accueil</h1>
<h2>Sitation du jour</h2>
@*
<div class="QuoteDiv">
<img class="imgQuote" src="@quote.ImgPath" />
<p class="idQuote"><strong>Identifiant de la citation :</strong>@quote.Id </p>
<p class="contentQuote"><strong>Citation:</strong>@quote.Content</p>
<p class="CaracterQuote"><strong>Personnage :</strong> @quote.Charac</p>
<p class="SourceQuote"><strong>Source :</strong> @quote.TitleSrc</p>
<p class="langueQuote"><strong>Langue :</strong> @quote.Langue</p>
<p class="UserPropositionQuote">@quote.UserProposition a proposé cette citation</p>
<button>Suprimé la citation</button>
</div>
*@
<button>Mettre une citation aléatoire</button> <button>Mettre une citation aléatoire</button>
@if (quotes != null) @if (quotes != null)
{ {
<table class="table"> <h3>Citations non validées</h3>
<thead> <p>Citations en attente de validation:</p>
<tr>
<th>Id</th> @foreach (var quote in quotes)
<th>Content</th> {
<th>Charactére</th> <div class="QuoteDiv">
<th>Title Source</th> <img class="imgQuote" src="@quote.ImgPath" />
<th>Like</th> <p class="idQuote"><strong>Identifiant de la citation :</strong>@quote.Id </p>
<th>Langue</th> <p class="contentQuote"><strong>Citation:</strong>@quote.Content</p>
<th>Date Source</th> <p class="CaracterQuote"><strong>Personnage :</strong> @quote.Charac</p>
</tr> <p class="SourceQuote"><strong>Source :</strong> @quote.TitleSrc</p>
</thead> <p class="langueQuote"><strong>Langue :</strong> @quote.Langue</p>
<tbody> <p class="UserPropositionQuote">@quote.UserProposition a proposé cette citation</p>
@foreach (var quote in quotes) <button>Suprimé la citation</button>
{ </div>
<tr> }
<td>@quote.Id</td>
<td>@quote.Content</td>
<td>@quote.Charac</td>
<td>@quote.TitleSrc</td>
<td>@quote.Like</td>
<td>@quote.Langue</td>
<td>@quote.DateSrc.ToShortDateString()</td>
</tr>
}
</tbody>
</table>
} }

@ -28,5 +28,6 @@
</div> </div>
<script src="_framework/blazor.server.js"></script> <script src="_framework/blazor.server.js"></script>
</body> </body>
</html> </html>

@ -1,3 +1,4 @@
using Blazored.LocalStorage;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.Web;
using WF_WebAdmin.Data; using WF_WebAdmin.Data;
@ -11,6 +12,8 @@ builder.Services.AddSingleton<WeatherForecastService>();
builder.Services.AddHttpClient(); builder.Services.AddHttpClient();
builder.Services.AddBlazoredLocalStorage();
var app = builder.Build(); var app = builder.Build();
// Configure the HTTP request pipeline. // Configure the HTTP request pipeline.

@ -7,4 +7,11 @@
<RootNamespace>WF_WebAdmin</RootNamespace> <RootNamespace>WF_WebAdmin</RootNamespace>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="Blazored.LocalStorage" Version="4.5.0" />
<PackageReference Include="Blazorise.Bootstrap" Version="1.7.2" />
<PackageReference Include="Blazorise.DataGrid" Version="1.7.2" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.7.2" />
</ItemGroup>
</Project> </Project>

@ -7,4 +7,4 @@
@using Microsoft.AspNetCore.Components.Web.Virtualization @using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop @using Microsoft.JSInterop
@using WF_WebAdmin @using WF_WebAdmin
@using WF_WebAdmin.Shared @using WF_WebAdmin.Shared

@ -1,20 +1,20 @@
[ [
{ {
"Id": 1, "Id": 1,
"Content": "coucou", "Content": "'Dans le monde il ny a pas dun côté le bien et le mal, il y a une part de lumière et dombre en chacun de nous. Ce qui compte cest celle que lon choisit de montrer dans nos actes, ça cest ce que lon est vraiment.'",
"Charac": "moi", "Charac": "Sirius Black",
"ImgPath": "img", "ImgPath": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137&h=195&c=7&r=0&o=5&pid=1.7",
"TitleSrc": "G4", "TitleSrc": "Harry Potter et Lordre du Phoenix",
"DateSrc": "2001-01-01", "DateSrc": "2001-01-01",
"Like": 20, "Like": 20,
"Langue": "fr" "Langue": "fr"
}, },
{ {
"Id": 2, "Id": 2,
"Content": "boujour", "Content": "'Une autre citation'",
"Charac": "toi", "Charac": "Un personnage",
"ImgPath": "img", "ImgPath": "https://tse2.mm.bing.net/th/id/OIP.zR4rzkK7q2wCcNwZd6jjegHaIC?w=163&h=180&c=7&r=0&o=5&pid=1.7",
"TitleSrc": "G4", "TitleSrc": "Un super film",
"DateSrc": "2002-02-02", "DateSrc": "2002-02-02",
"Like": 0, "Like": 0,
"Langue": "fr" "Langue": "fr"

Loading…
Cancel
Save