added hour blocks

This commit is contained in:
Ryan Peters 2023-03-18 15:33:19 +00:00
parent 316cf1bb44
commit 3398dd3695

View File

@ -17,12 +17,18 @@
@foreach (var forecast in Model.Forecast)
{
var displayHours = new[] { 6, 11, 15, 22 };
var hourForecasts = forecast.HourForecasts
.Where(f => displayHours.Contains(f.Time.Value.Hour))
.ToList();
<div class="row day-summary">
<div class="col col-6">@forecast.Summary.ConditionName</div>
<div class="col col-6">@forecast.Summary.HighTemp / @forecast.Summary.LowTemp</div>
</div>
@foreach (var hourForecast in forecast.HourForecasts)
@foreach (var hourForecast in hourForecasts)
{
<div class="row day-detail">
<div class="col">@hourForecast.Time</div>