Browse Source

Add Authorize and Register pages

master
Nick Rirush 5 years ago
parent
commit
6e3f8ee938
  1. 14
      Controllers/HomeController.cs
  2. 17
      Views/Shared/_Layout.cshtml

14
Controllers/HomeController.cs

@ -5,9 +5,23 @@ namespace QuickCHAT.Controllers {
[Controller]
public class HomeController : Controller
{
[HttpGet("/")]
public ActionResult Index()
{
return View();
}
[HttpGet("/authorize")]
public ActionResult Authorize()
{
ViewData["HideNavbar"] = true;
return View();
}
[HttpGet("/register")]
public ActionResult Register()
{
return View();
}
}
}

17
Views/Shared/_Layout.cshtml

@ -7,6 +7,14 @@
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
<style>
.centered-box {
display: flex;
justify-content: center;
align-items: center;
margin-top: 10%;
}
</style>
</head>
<body>
@if(ViewData["HideNavbar"] == null)
@ -50,7 +58,16 @@
</div>
</nav>
}
@if(ViewData["UseFluidContainer"] == null)
{
<div class="container">
@RenderBody()
</div>
}
else
{
<div class="container-fluid">
@RenderBody()
</div>
}
</body>
Loading…
Cancel
Save