parent
0c924c61f4
commit
9600e3243b
@ -0,0 +1,38 @@
|
||||
@page "/"
|
||||
|
||||
|
||||
<PageTitle>Accueil</PageTitle>
|
||||
|
||||
<h1>Accueil</h1>
|
||||
|
||||
|
||||
@if (quotes != null)
|
||||
{
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Content</th>
|
||||
<th>Charactére</th>
|
||||
<th>Title Source</th>
|
||||
<th>Like</th>
|
||||
<th>Langue</th>
|
||||
<th>Date Source</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var quote in quotes)
|
||||
{
|
||||
<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>
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
@page "/counter"
|
||||
|
||||
<PageTitle>Counter</PageTitle>
|
||||
|
||||
<h1>Counter</h1>
|
||||
|
||||
<p role="status">Current count: @currentCount</p>
|
||||
|
||||
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
|
||||
|
||||
@code {
|
||||
private int currentCount = 0;
|
||||
|
||||
private void IncrementCount()
|
||||
{
|
||||
currentCount++;
|
||||
}
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
@page "/fetchdata"
|
||||
|
||||
<PageTitle>Weather forecast</PageTitle>
|
||||
|
||||
@using WF_WebAdmin.Data
|
||||
@inject WeatherForecastService ForecastService
|
||||
|
||||
<h1>Weather forecast</h1>
|
||||
|
||||
<p>This component demonstrates fetching data from a service.</p>
|
||||
|
||||
@if (forecasts == null)
|
||||
{
|
||||
<p><em>Loading...</em></p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Temp. (C)</th>
|
||||
<th>Temp. (F)</th>
|
||||
<th>Summary</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var forecast in forecasts)
|
||||
{
|
||||
<tr>
|
||||
<td>@forecast.Date.ToShortDateString()</td>
|
||||
<td>@forecast.TemperatureC</td>
|
||||
<td>@forecast.TemperatureF</td>
|
||||
<td>@forecast.Summary</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
|
||||
@code {
|
||||
private WeatherForecast[]? forecasts;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
forecasts = await ForecastService.GetForecastAsync(DateTime.Now);
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
@page "/"
|
||||
|
||||
<PageTitle>Index</PageTitle>
|
||||
|
||||
<h1>Hello, world!</h1>
|
||||
|
||||
Welcome to your new app.
|
||||
|
||||
<SurveyPrompt Title="How is Blazor working for you?" />
|
@ -0,0 +1,4 @@
|
||||
@page "/Quiz"
|
||||
|
||||
|
||||
<h3>Quiz</h3>
|
@ -0,0 +1,5 @@
|
||||
@page "/ValidQuote"
|
||||
|
||||
|
||||
<h3>ValidQuote</h3>
|
||||
|
@ -1,16 +0,0 @@
|
||||
<div class="alert alert-secondary mt-4">
|
||||
<span class="oi oi-pencil me-2" aria-hidden="true"></span>
|
||||
<strong>@Title</strong>
|
||||
|
||||
<span class="text-nowrap">
|
||||
Please take our
|
||||
<a target="_blank" class="font-weight-bold link-dark" href="https://go.microsoft.com/fwlink/?linkid=2149017">brief survey</a>
|
||||
</span>
|
||||
and tell us what you think.
|
||||
</div>
|
||||
|
||||
@code {
|
||||
// Demonstrates how a parent component can supply parameters
|
||||
[Parameter]
|
||||
public string? Title { get; set; }
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
[
|
||||
{
|
||||
"Id": 1,
|
||||
"Content": "coucou",
|
||||
"Charac": "moi",
|
||||
"ImgPath": "img",
|
||||
"TitleSrc": "G4",
|
||||
"DateSrc": "2001-01-01",
|
||||
"Like": 20,
|
||||
"Langue": "fr"
|
||||
},
|
||||
{
|
||||
"Id": 2,
|
||||
"Content": "boujour",
|
||||
"Charac": "toi",
|
||||
"ImgPath": "img",
|
||||
"TitleSrc": "G4",
|
||||
"DateSrc": "2002-02-02",
|
||||
"Like": 0,
|
||||
"Langue": "fr"
|
||||
}
|
||||
]
|
Loading…
Reference in new issue