From 6e3f8ee9388a45a87ebbc16ecc61d99e1f457d66 Mon Sep 17 00:00:00 2001 From: Nick Rirush Date: Sun, 17 Feb 2019 10:41:46 +0800 Subject: [PATCH] Add Authorize and Register pages --- Controllers/HomeController.cs | 14 ++++++++++++++ Views/Shared/_Layout.cshtml | 17 +++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/Controllers/HomeController.cs b/Controllers/HomeController.cs index 30395ec..c7d5b87 100644 --- a/Controllers/HomeController.cs +++ b/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(); + } } } \ No newline at end of file diff --git a/Views/Shared/_Layout.cshtml b/Views/Shared/_Layout.cshtml index 38d5300..823ae5a 100644 --- a/Views/Shared/_Layout.cshtml +++ b/Views/Shared/_Layout.cshtml @@ -7,6 +7,14 @@ + @if(ViewData["HideNavbar"] == null) @@ -50,7 +58,16 @@ } + @if(ViewData["UseFluidContainer"] == null) + {
@RenderBody()
+ } + else + { +
+ @RenderBody() +
+ } \ No newline at end of file