From ec36bb8a34fca44b0efe0d04ac17889fddc6e855 Mon Sep 17 00:00:00 2001 From: JByfordRew Date: Mon, 4 Apr 2022 13:39:54 +0100 Subject: [PATCH] add WeatherDetail and inline z-index style (not needed for instructional commit) --- .../Pages/FetchData.razor | 3 +++ .../Pages/WeatherDetail.razor | 18 ++++++++++++++++++ .../Shared/MainLayout.razor | 4 ++-- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Pages/WeatherDetail.razor diff --git a/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Pages/FetchData.razor b/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Pages/FetchData.razor index 90b528b..99eee63 100644 --- a/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Pages/FetchData.razor +++ b/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Pages/FetchData.razor @@ -22,16 +22,19 @@ else Temp. (C) Temp. (F) Summary + Detail @foreach (var forecast in forecasts) { + var detailUrl = $"weatherdetail/{forecast.Date.ToString("yyyy-MM-dd HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture)}/{forecast.TemperatureC}/{forecast.Summary}"; @forecast.Date.ToShortDateString() @forecast.TemperatureC @forecast.TemperatureF @forecast.Summary + Detail } diff --git a/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Pages/WeatherDetail.razor b/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Pages/WeatherDetail.razor new file mode 100644 index 0000000..d578ac0 --- /dev/null +++ b/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Pages/WeatherDetail.razor @@ -0,0 +1,18 @@ +@page "/weatherdetail/{Date}/{Temp}/{Summary}" + +

WeatherDetail

+ +

Date: @Date

+

Temp: @Temp

+

Summary: @Summary

+ +@code { + [Parameter] + public string Date { get; set; } + + [Parameter] + public string Temp { get; set; } + + [Parameter] + public string Summary { get; set; } +} diff --git a/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Shared/MainLayout.razor b/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Shared/MainLayout.razor index 108574d..e00faf1 100644 --- a/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Shared/MainLayout.razor +++ b/demo/aspnetcore6.0/v4/BlazorTransitionableRouteDemoServer/Shared/MainLayout.razor @@ -3,12 +3,12 @@ BlazorTransitionableRouteDemoServer
-