From 6cf118f8b2ad04d731b7cfe5eaaa0bd3642f2b9d Mon Sep 17 00:00:00 2001 From: Kevin MONDEJAR Date: Wed, 8 Jan 2025 11:34:45 +0100 Subject: [PATCH] debut modif citation --- .../WF-WebAdmin/Pages/ModifQuote.razor | 45 +++++++++++++++++++ .../WF-WebAdmin/Pages/ModifQuote.razor.cs | 21 +++++++++ WF-WebAdmin/WF-WebAdmin/Shared/NavMenu.razor | 7 +++ WF-WebAdmin/WF-WebAdmin/wwwroot/css/site.css | 8 ++++ .../wwwroot/fake-dataModifQuote.json | 24 ++++++++++ 5 files changed, 105 insertions(+) create mode 100644 WF-WebAdmin/WF-WebAdmin/Pages/ModifQuote.razor create mode 100644 WF-WebAdmin/WF-WebAdmin/Pages/ModifQuote.razor.cs create mode 100644 WF-WebAdmin/WF-WebAdmin/wwwroot/fake-dataModifQuote.json diff --git a/WF-WebAdmin/WF-WebAdmin/Pages/ModifQuote.razor b/WF-WebAdmin/WF-WebAdmin/Pages/ModifQuote.razor new file mode 100644 index 0000000..85dbd8b --- /dev/null +++ b/WF-WebAdmin/WF-WebAdmin/Pages/ModifQuote.razor @@ -0,0 +1,45 @@ +@page "/modifquote" + +Corection des citation + +

Corection des citation

+ +

Ajouter une recherche

+ +@if (quotes != null) +{ + + + + + + + + + + + + + + + @foreach (var quote in quotes) + { + + + + + + + + + + + } + + +
ImageIdContenuPersonageTitre SourceLikesLangueDate Source
@quote.Id + + @quote.Charac@quote.TitleSrc@quote.Like@quote.Langue@quote.DateSrc.ToShortDateString()
+} \ No newline at end of file diff --git a/WF-WebAdmin/WF-WebAdmin/Pages/ModifQuote.razor.cs b/WF-WebAdmin/WF-WebAdmin/Pages/ModifQuote.razor.cs new file mode 100644 index 0000000..4abe969 --- /dev/null +++ b/WF-WebAdmin/WF-WebAdmin/Pages/ModifQuote.razor.cs @@ -0,0 +1,21 @@ +using Microsoft.AspNetCore.Components; +using WF_WebAdmin.Model; + +namespace WF_WebAdmin.Pages +{ + public partial class ModifQuote + { + private Quote[] quotes; + + [Inject] + public HttpClient Http { get; set; } + + [Inject] + public NavigationManager NavigationManager { get; set; } + + protected override async Task OnInitializedAsync() + { + quotes = await Http.GetFromJsonAsync($"{NavigationManager.BaseUri}fake-dataModifQuote.json"); + } + } +} diff --git a/WF-WebAdmin/WF-WebAdmin/Shared/NavMenu.razor b/WF-WebAdmin/WF-WebAdmin/Shared/NavMenu.razor index 2e82fc0..5464a8c 100644 --- a/WF-WebAdmin/WF-WebAdmin/Shared/NavMenu.razor +++ b/WF-WebAdmin/WF-WebAdmin/Shared/NavMenu.razor @@ -31,6 +31,13 @@ + + + diff --git a/WF-WebAdmin/WF-WebAdmin/wwwroot/css/site.css b/WF-WebAdmin/WF-WebAdmin/wwwroot/css/site.css index d91bb8d..8246181 100644 --- a/WF-WebAdmin/WF-WebAdmin/wwwroot/css/site.css +++ b/WF-WebAdmin/WF-WebAdmin/wwwroot/css/site.css @@ -88,4 +88,12 @@ button { .pseudo, .mail, .idUser, .dateCrea, .idQuote, .contentQuote, .CaracterQuote, .SourceQuote, .langueQuote, .UserPropositionQuote { margin-left: 10px; +} + +/*ModifQuote*/ + +.imgTab{ + width: 5vw; + height: 5vw; + object-fit: contain; } \ No newline at end of file diff --git a/WF-WebAdmin/WF-WebAdmin/wwwroot/fake-dataModifQuote.json b/WF-WebAdmin/WF-WebAdmin/wwwroot/fake-dataModifQuote.json new file mode 100644 index 0000000..61477e9 --- /dev/null +++ b/WF-WebAdmin/WF-WebAdmin/wwwroot/fake-dataModifQuote.json @@ -0,0 +1,24 @@ +[ + { + "Id": 1, + "ImgPath": "https://tse2.mm.bing.net/th/id/OIP.MMpXBB5RDRYQm05FJmevGAHaKl?w=137&h=195&c=7&r=0&o=5&pid=1.7", + "Content": "Harry POTTER JE SUIS TON PERE", + "Charac": "Sirius Black", + "TitleSrc": "Harry Potter", + "Langue": "fr", + "UserProposition": "demo", + "DateSrc": "2001-01-01", + "Like": 20 + }, + { + "Id": 2, + "ImgPath": "https://tse2.mm.bing.net/th/id/OIP.zR4rzkK7q2wCcNwZd6jjegHaIC?w=163&h=180&c=7&r=0&o=5&pid=1.7", + "Content": "'Une autre citation'", + "Charac": "Un personnage", + "TitleSrc": "Un super film", + "Langue": "fr", + "DateSrc": "2002-02-02", + "Like": 0, + "UserProposition": "exploit" + } +] \ No newline at end of file