10.2.1 Creating a Responsive Header; Listing 10-2. Adding Responsive Content to the Summary.cshtml File

This commit is contained in:
Jason Zhu 2021-09-22 22:36:56 +10:00
parent fa611c9e3b
commit 17c5e9e391

View File

@ -1,13 +1,20 @@
@model SportsStore.Domain.Entities.Cart
<div class="navbar-right">
<div class="navbar-right hidden-xs">
@Html.ActionLink("Checkout", "Index", "Cart",
new { returnUrl = Request.Url.PathAndQuery },
new { @class = "btn btn-default navbar-btn" } )
</div>
<div class="navbar-right visible-xs">
<a href=@Url.Action("Index", "Cart", new { returnUrl = Request.Url.PathAndQuery })
class="btn btn-default navbar-btn">
<span class="glyphicon glyphicon-shopping-cart"></span>
</a>
</div>
<div class="navbar-text navbar-right">
<b>Your cart:</b>
<b class="hidden-xs">Your cart:</b>
@Model.Lines.Sum(x => x.Quantity) item(s),
@Model.ComputeTotalValue().ToString("c")
</div>