The startpage and navigation bars starting to look well
This commit is contained in:
@ -4,31 +4,13 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>@ViewBag.Title - My ASP.NET Application</title>
|
||||
|
||||
@Styles.Render("~/Content/css")
|
||||
@Scripts.Render("~/bundles/modernizr")
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
@Html.ActionLink("Application name", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
|
||||
</div>
|
||||
<div class="navbar-collapse collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li>@Html.ActionLink("Home", "Index", "Home")</li>
|
||||
<li>@Html.ActionLink("About", "About", "Home")</li>
|
||||
<li>@Html.ActionLink("Contact", "Contact", "Home")</li>
|
||||
</ul>
|
||||
@Html.Partial("_LoginPartial")
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@Html.Partial("_NavBar")
|
||||
<div class="container body-content">
|
||||
@RenderBody()
|
||||
<hr />
|
||||
|
||||
@ -3,20 +3,17 @@
|
||||
{
|
||||
using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
|
||||
{
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
@Html.ActionLink("Hello " + User.Identity.GetUserName() + "!", "Index", "Manage", routeValues: null, htmlAttributes: new { title = "Manage" })
|
||||
</li>
|
||||
<li><a href="javascript:document.getElementById('logoutForm').submit()">Log off</a></li>
|
||||
</ul>
|
||||
@Html.AntiForgeryToken()
|
||||
<ul class="nav navbar-nav navbar-right mr-auto">
|
||||
<li class="nav-item">@Html.ActionLink("Hello " + User.Identity.GetUserName() + "!", "Index", "Manage", routeValues: null, htmlAttributes: new { title = "Manage" })</li>
|
||||
<li class="nav-item"><a href="javascript:document.getElementById('logoutForm').submit()">Log off</a></li>
|
||||
</ul>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
|
||||
<li>@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
|
||||
<ul class="nav navbar-nav navbar-right mr-auto">
|
||||
<li class="nav-item">@Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink", @class = "nav-link" })</li>
|
||||
<li class="nav-item">@Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink", @class = "nav-link" })</li>
|
||||
</ul>
|
||||
}
|
||||
|
||||
19
Vidly/Views/Shared/_NavBar.cshtml
Normal file
19
Vidly/Views/Shared/_NavBar.cshtml
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
<nav class="navbar navbar-expand-sm navbar-dark fixed-top bg-dark">
|
||||
<div class="container">
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
@Html.ActionLink("My Web Portal", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
|
||||
<div class="navbar-collapse collapse" id="navbarSupportedContent">
|
||||
|
||||
<ul class="nav navbar-nav mr-auto">
|
||||
<li class="nav-item">@Html.ActionLink("Home", "Index", "Home", null, new { @class = "nav-link" })</li>
|
||||
<li class="nav-item">@Html.ActionLink("About", "About", "Home", null, new { @class = "nav-link" })</li>
|
||||
<li class="nav-item">@Html.ActionLink("Contact", "Contact", "Home", null, new { @class = "nav-link" })</li>
|
||||
</ul>
|
||||
@Html.Partial("_LoginPartial")
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user