The startpage and navigation bars starting to look well

This commit is contained in:
2019-01-16 22:56:13 +01:00
parent 88641f2a20
commit b6bf2776a8
8 changed files with 101 additions and 35 deletions

View File

@ -1,8 +1,33 @@
@model Vidly.Models.Movie
@model Vidly.ViewModels.RandomMovieViewModel
@{
ViewBag.Title = "Random";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>@Model.Name</h2>
@**
This is a comment
on multiple lines
*@
@{
var className = Model.Customers.Count > 0 ? "popular" : null;
}
<h2 class="@className">@Model.Movie.Name</h2>
@if (Model.Customers.Count == 0)
{
<text>No one has rented this movie before.</text>
}
else
{
<ul>
@foreach (var customer in Model.Customers)
{
<li>@customer.Name</li>
}
</ul>
}