Initial commit

This commit is contained in:
2024-10-11 11:06:37 +02:00
commit 04e52b67ec
183 changed files with 10760 additions and 0 deletions

View 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++;
}
}

View 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();
}

View 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!;
}

View File

@@ -0,0 +1,6 @@
@page "/settings"
<h3>Impostazioni</h3>
@code {
}

View 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 {
}

View 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);
}
}

View 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 {
}