Initial push before branching.

This commit is contained in:
Kira Jiroux 2025-02-17 11:53:46 -05:00
parent d856543269
commit fc83b60e1d
6 changed files with 78 additions and 4 deletions

View File

@ -5,9 +5,10 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="/" />
<link rel="stylesheet" href="bootstrap/bootstrap-cosmo.css" />
<link rel="stylesheet" href="app.css" />
<link rel="stylesheet" href="bootstrap/bootstrap-cosmo.css" /> <!-- app.css -->
<link rel="stylesheet" href="Portfolio.WebUI.Server.styles.css" />
<link rel="icon" type="image/png" href="favicon.png" />
<HeadOutlet />
</head>

View File

@ -19,6 +19,11 @@
<span class="bi bi-list-nested-nav-menu" aria-hidden="true"></span> Weather
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="pokemonsleep">
<span class="bi bi-p-circle-fill" aria-hidden="true"></span> Pokemon Sleep
</NavLink>
</div>
</nav>
</div>

View File

@ -2,7 +2,7 @@
<PageTitle>Home</PageTitle>
<h1>Hello, world!</h1>
<h1 class="test">Hello, world!</h1>
<p>Ensuring that git is connected properly.</p>
Welcome to your new app.

View File

@ -0,0 +1,64 @@
@page "/pokemonsleep"
@attribute [StreamRendering]
<PageTitle>Pokemon Sleep</PageTitle>
<h1>Pokemon Sleep</h1>
<p>This component will eventually show data from the PokemonSleepAPI. For right now it copies Weather.</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 streaming rendering
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

@ -12,6 +12,10 @@ a, .btn-link {
border-color: #1861ac;
}
.test{
border: 1px dashed hotpink;
}
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

View File

@ -5,7 +5,7 @@ VisualStudioVersion = 17.11.35327.3
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{491A0B76-7D94-42C5-BD6B-F90036F33A04}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Portfolio.WebUI.Server", "Portfolio.WebUI.Server\Portfolio.WebUI.Server.csproj", "{334A4A79-9DF9-4FAD-9B06-B2FA02443620}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Portfolio.WebUI.Server", "Portfolio.WebUI.Server\Portfolio.WebUI.Server.csproj", "{334A4A79-9DF9-4FAD-9B06-B2FA02443620}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution