Skip to content

Commit

Permalink
Update desserts style
Browse files Browse the repository at this point in the history
  • Loading branch information
kuro-vale committed Aug 27, 2022
1 parent e8afa99 commit 7e46627
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
12 changes: 12 additions & 0 deletions Data/SeedData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@ public static void Initialize(Context db)
Name = "Cake Pop",
Price = 38,
Image = "https://cdn.pixabay.com/photo/2015/03/26/23/09/cake-pops-693645_960_720.jpg"
},
new()
{
Name = "Brownie",
Price = 20,
Image = "https://cdn.pixabay.com/photo/2014/11/28/08/03/brownie-548591_960_720.jpg"
},
new()
{
Name = "Trifle",
Price = 30,
Image = "https://cdn.pixabay.com/photo/2019/11/23/20/04/coffee-4648041_960_720.jpg"
}
};
db.Desserts?.AddRange(desserts);
Expand Down
4 changes: 2 additions & 2 deletions Pages/Desserts.razor
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
@using kuro_desserts.Models
<PageTitle>Desserts</PageTitle>

<div class="overflow-auto m-2 rounded-3">
<div class="overflow-auto m-2">
@if (_desserts != null)
{
@foreach (var dessertChunk in _desserts.Chunk(3))
{
<ul class="list-group list-group-horizontal">
@foreach (var dessert in dessertChunk)
{
<li class="list-group-item list-group-item-light list-group-item-action" style="@(dessertChunk.Length == 1 ? "width: 23vw; margin: auto;" : "")">
<li class="list-group-item list-group-item-warning list-group-item-action rounded m-1" style="@(dessertChunk.Length == 1 ? "width: 30vw;" : "")">
<img class="img-fluid rounded-3" src="@dessert.Image" alt="@dessert.Name"/>
@dessert.Name
<span class="badge text-bg-success">$@dessert.Price</span>
Expand Down
1 change: 1 addition & 0 deletions Shared/NavMenu.razor
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<NavLink class="nav-link fw-bold py-1 px-0" Match="NavLinkMatch.All" href="/">Home</NavLink>
<NavLink class="nav-link fw-bold py-1 px-0" href="/desserts">Desserts</NavLink>
<NavLink class="nav-link fw-bold py-1 px-0" href="#">Register</NavLink>
<NavLink class="nav-link fw-bold py-1 px-0" href="#">Login</NavLink>
</nav>
</div>
</header>
2 changes: 1 addition & 1 deletion wwwroot/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ body {
}

.cover-container {
max-width: 42em;
max-width: 80em;
}


Expand Down

0 comments on commit 7e46627

Please sign in to comment.