Commit 97bdc612 authored by Roberts Ivanovs's avatar Roberts Ivanovs
Browse files

01-completed

parent d053349a
@page "/"
@inject HttpClient HttpClient
<h1>Blazing Pizzas</h1>
<div class="main">
<ul class="pizza-cards">
@if (specials != null) {
@foreach (var special in specials) {
<li style="background-image: url('@special.ImageUrl')">
<div class="pizza-info">
<span class="title">@special.Name</span>
@special.Description
<span class="price">@special.GetFormattedBasePrice()</span>
</div>
</li>
}
}
</ul>
</div>
@code {
List<PizzaSpecial> specials;
protected override async Task OnInitializedAsync()
{
specials = await HttpClient.GetFromJsonAsync<List<PizzaSpecial>>("specials");
}
}
@inherits LayoutComponentBase
<div class="top-bar">
<a class="logo" href="">
<img src="img/logo.svg" />
</a>
<NavLink href="" class="nav-tab" Match="NavLinkMatch.All">
<img src="img/pizza-slice.svg" />
<div>Get Pizza</div>
</NavLink>
</div>
<div class="content">
@Body
</div>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment