Contoso Crafts Website Converted To Blazor Web Application In .NET 8
Hello,
Thats It!
Here's an upgrade of the Contoso Crafts Website project from ASP.NET Razor Pages to Blazor Web Application. As you remember, Contoso Crafts is the final output of the course ASP.NET Core 101 hosted by Scott Hanselman. To ellaborate this in detail, here's how I migrated the project to Blazor. The project structure illustrates that the razor pages were converted to components specifically the Home.razor, ProductCard.razor and ProductRating.razor. The products.json, Products.cs and the services are located to it's designated folders.
I have copied the styles from the razor pages to the site.css and have referenced the font styles used to the App.razor component
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <base href="/" /> <link rel="stylesheet" href="bootstrap/bootstrap.min.css" /> <link rel="stylesheet" href="app.css" /> <link rel="stylesheet" href="site.css" /> <link rel="icon" type="image/png" href="favicon.png" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <link href="https://fonts.googleapis.com/css?family=Yellowtail&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Nunito&display=swap" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <HeadOutlet /> </head> <body> <Routes /> <script src="_framework/blazor.web.js"></script> </body> </html>
After that, I have now a blazor version of the Contoso Crafts application.
Source code available for download: Contoso Crafts Blazor Website
Thats It!
Comments
Post a Comment