Initial commit
This commit is contained in:
16
Template.Shared/Components/Pages/Counter.razor
Normal file
16
Template.Shared/Components/Pages/Counter.razor
Normal file
@@ -0,0 +1,16 @@
|
||||
@page "/counter"
|
||||
|
||||
<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++;
|
||||
}
|
||||
}
|
||||
23
Template.Shared/Components/Pages/DeviceFormFactor.razor
Normal file
23
Template.Shared/Components/Pages/DeviceFormFactor.razor
Normal file
@@ -0,0 +1,23 @@
|
||||
@page "/device-form-factor"
|
||||
@using Template.Shared.Interfaces
|
||||
@inject IFormFactor FormFactor
|
||||
|
||||
<PageTitle>Form Factor</PageTitle>
|
||||
|
||||
<h1>Device Form Factor</h1>
|
||||
|
||||
<p>You are running on:</p>
|
||||
|
||||
<ul>
|
||||
<li>Form Factor: @factor</li>
|
||||
<li>Platform: @platform</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
<em>This component is defined in the Template.Shared library.</em>
|
||||
</p>
|
||||
|
||||
@code {
|
||||
private string factor => FormFactor.GetFormFactor();
|
||||
private string platform => FormFactor.GetPlatform();
|
||||
}
|
||||
15
Template.Shared/Components/Pages/Home.razor
Normal file
15
Template.Shared/Components/Pages/Home.razor
Normal file
@@ -0,0 +1,15 @@
|
||||
@page "/"
|
||||
|
||||
<h1>Hello, world!</h1>
|
||||
|
||||
Welcome to your new app.
|
||||
|
||||
<Modal @ref="modal" title="Full screen" Fullscreen="ModalFullscreen.Always">
|
||||
<BodyTemplate>...</BodyTemplate>
|
||||
</Modal>
|
||||
|
||||
<Button Color="ButtonColor.Primary" @onclick="() => modal.ShowAsync()">Full screen</Button>
|
||||
|
||||
@code {
|
||||
private Modal modal = default!;
|
||||
}
|
||||
6
Template.Shared/Components/Pages/Impostazioni.razor
Normal file
6
Template.Shared/Components/Pages/Impostazioni.razor
Normal file
@@ -0,0 +1,6 @@
|
||||
@page "/settings"
|
||||
<h3>Impostazioni</h3>
|
||||
|
||||
@code {
|
||||
|
||||
}
|
||||
10
Template.Shared/Components/Pages/Log Book.razor
Normal file
10
Template.Shared/Components/Pages/Log Book.razor
Normal file
@@ -0,0 +1,10 @@
|
||||
@page "/logbook"
|
||||
@using Template.Shared.Components.SingleElements
|
||||
<h3 class="page-title">Log book</h3>
|
||||
|
||||
<NoDataAvailable ImageSource="_content/Template.Shared/images/log-book.svg"
|
||||
Text="Nessun log book memorizzato"/>
|
||||
|
||||
@code {
|
||||
|
||||
}
|
||||
61
Template.Shared/Components/Pages/Weather.razor
Normal file
61
Template.Shared/Components/Pages/Weather.razor
Normal file
@@ -0,0 +1,61 @@
|
||||
@page "/weather"
|
||||
|
||||
<h1>Weather</h1>
|
||||
|
||||
<p>This component demonstrates showing data.</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()
|
||||
{
|
||||
// Simulate asynchronous loading to demonstrate a loading indicator
|
||||
await Task.Delay(500);
|
||||
|
||||
var startDate = DateOnly.FromDateTime(DateTime.Now);
|
||||
var summaries = new[] { "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" };
|
||||
forecasts = Enumerable.Range(1, 5).Select(index => new WeatherForecast
|
||||
{
|
||||
Date = startDate.AddDays(index),
|
||||
TemperatureC = Random.Shared.Next(-20, 55),
|
||||
Summary = summaries[Random.Shared.Next(summaries.Length)]
|
||||
}).ToArray();
|
||||
}
|
||||
|
||||
private class WeatherForecast
|
||||
{
|
||||
public DateOnly Date { get; set; }
|
||||
public int TemperatureC { get; set; }
|
||||
public string? Summary { get; set; }
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
}
|
||||
}
|
||||
12
Template.Shared/Components/Pages/Workout.razor
Normal file
12
Template.Shared/Components/Pages/Workout.razor
Normal file
@@ -0,0 +1,12 @@
|
||||
@page "/workout"
|
||||
@using Template.Shared.Components.SingleElements
|
||||
<h3 class="page-title">Workout</h3>
|
||||
|
||||
<NoDataAvailable ImageSource="_content/Template.Shared/images/man-doing-squats.svg"
|
||||
Text="Nessun workout disponibile"/>
|
||||
|
||||
@code {
|
||||
|
||||
|
||||
|
||||
}
|
||||
0
Template.Shared/Components/Pages/Workout.razor.css
Normal file
0
Template.Shared/Components/Pages/Workout.razor.css
Normal file
Reference in New Issue
Block a user