Create prime pagine
This commit is contained in:
55
Template.Shared/Components/Pages/Calendar.razor
Normal file
55
Template.Shared/Components/Pages/Calendar.razor
Normal file
@@ -0,0 +1,55 @@
|
||||
@page "/Calendar"
|
||||
@using Template.Shared.Components.Layout
|
||||
|
||||
<HeaderLayout Title="Agenda" />
|
||||
|
||||
<div class="content">
|
||||
<MudButtonGroup Size="Size.Small" Color="Color.Surface" OverrideStyles="true" Variant="Variant.Filled">
|
||||
<MudButton>Giorno</MudButton>
|
||||
<MudButton Disabled="true">Settimana</MudButton>
|
||||
<MudButton Disabled="true">Mese</MudButton>
|
||||
</MudButtonGroup>
|
||||
|
||||
<div class="activity-filter">
|
||||
<div class="date-controller">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.ChevronLeft" @onclick="() => DateFilter = DateFilter.AddDays(-1)" Color="Color.Surface"/>
|
||||
<MudButton Variant="Variant.Text" Color="Color.Surface" OnClick="OpenCalendar">
|
||||
@($"{DateFilter:M}")
|
||||
</MudButton>
|
||||
<MudIconButton Icon="@Icons.Material.Filled.ChevronRight" @onclick="() => DateFilter = DateFilter.AddDays(1)" Color="Color.Surface" />
|
||||
</div>
|
||||
|
||||
<MudOverlay @bind-Visible="_isVisible" DarkBackground="true" AutoClose="true">
|
||||
<MudDatePicker PickerVariant="PickerVariant.Static" Date="DateFilter" />
|
||||
</MudOverlay>
|
||||
</div>
|
||||
|
||||
<div class="card-container">
|
||||
<ActivityCard Type="memo" />
|
||||
<ActivityCard Type="commessa"/>
|
||||
<ActivityCard Type="interna"/>
|
||||
</div>
|
||||
|
||||
<MudMenu PopoverClass="custom_popover" Class="custom-mudfab" AnchorOrigin="Origin.TopLeft" TransformOrigin="Origin.BottomRight">
|
||||
<ActivatorContent>
|
||||
<MudFab Color="Color.Primary" Size="Size.Small" StartIcon="@Icons.Material.Filled.Add" />
|
||||
</ActivatorContent>
|
||||
<ChildContent>
|
||||
<MudMenuItem>Nuovo contatto</MudMenuItem>
|
||||
<MudMenuItem>Nuova attivit<69></MudMenuItem>
|
||||
</ChildContent>
|
||||
</MudMenu>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
private DateTime DateFilter { get; set; } = DateTime.Today;
|
||||
|
||||
private bool _isVisible;
|
||||
|
||||
public void OpenCalendar()
|
||||
{
|
||||
_isVisible = true;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
}
|
||||
17
Template.Shared/Components/Pages/Calendar.razor.css
Normal file
17
Template.Shared/Components/Pages/Calendar.razor.css
Normal file
@@ -0,0 +1,17 @@
|
||||
.activity-filter {
|
||||
margin-top: .5rem;
|
||||
}
|
||||
|
||||
.card-container {
|
||||
margin-top: .5rem;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: nowrap;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.date-controller {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
@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++;
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
@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();
|
||||
}
|
||||
@@ -1,5 +1,10 @@
|
||||
@page "/"
|
||||
|
||||
<h1>Hello, world!</h1>
|
||||
|
||||
Welcome to your new app.
|
||||
@code
|
||||
{
|
||||
protected override Task OnInitializedAsync()
|
||||
{
|
||||
NavigationManager.NavigateTo("/Calendar");
|
||||
return base.OnInitializedAsync();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
@page "/settings"
|
||||
<h3>Impostazioni</h3>
|
||||
|
||||
@code {
|
||||
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
@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 {
|
||||
|
||||
}
|
||||
8
Template.Shared/Components/Pages/PersonalInfo.razor
Normal file
8
Template.Shared/Components/Pages/PersonalInfo.razor
Normal file
@@ -0,0 +1,8 @@
|
||||
@page "/PersonalInfo"
|
||||
@using Template.Shared.Components.Layout
|
||||
|
||||
<HeaderLayout Title="Profilo" />
|
||||
|
||||
@code {
|
||||
|
||||
}
|
||||
8
Template.Shared/Components/Pages/Users.razor
Normal file
8
Template.Shared/Components/Pages/Users.razor
Normal file
@@ -0,0 +1,8 @@
|
||||
@page "/Users"
|
||||
@using Template.Shared.Components.Layout
|
||||
|
||||
<HeaderLayout Title="Contatti" />
|
||||
|
||||
@code {
|
||||
|
||||
}
|
||||
0
Template.Shared/Components/Pages/Users.razor.css
Normal file
0
Template.Shared/Components/Pages/Users.razor.css
Normal file
@@ -1,61 +0,0 @@
|
||||
@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);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
@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 {
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user