diff --git a/Controllers/HomeController.cs b/Controllers/HomeController.cs new file mode 100644 index 0000000..30395ec --- /dev/null +++ b/Controllers/HomeController.cs @@ -0,0 +1,13 @@ +using System; +using Microsoft.AspNetCore.Mvc; + +namespace QuickCHAT.Controllers { + [Controller] + public class HomeController : Controller + { + public ActionResult Index() + { + return View(); + } + } +} \ No newline at end of file diff --git a/Pages/Index.cshtml b/Pages/Index.cshtml deleted file mode 100644 index 49de0f2..0000000 --- a/Pages/Index.cshtml +++ /dev/null @@ -1,2 +0,0 @@ -@page -

Hello, World!

\ No newline at end of file diff --git a/Pages/_Layout.cshtml b/Pages/_Layout.cshtml deleted file mode 100644 index ae7c714..0000000 --- a/Pages/_Layout.cshtml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - @ViewData["Title"] - QuickCHAT - - - - - - -
- @RenderBody() -
- \ No newline at end of file diff --git a/Source/Startup.cs b/Source/Startup.cs index e29980f..c287d3e 100644 --- a/Source/Startup.cs +++ b/Source/Startup.cs @@ -50,7 +50,10 @@ namespace QuickCHAT app.UseHttpsRedirection(); } app.UseAuthentication(); - app.UseMvc(); + app.UseMvc(routes => + { + routes.MapRoute("default", "{controller=Home}/{action=Index}"); + }); } } } diff --git a/Views/Home/Index.cshtml b/Views/Home/Index.cshtml new file mode 100644 index 0000000..a00358f --- /dev/null +++ b/Views/Home/Index.cshtml @@ -0,0 +1,5 @@ +@page +@{ + ViewBag.Title = "Index"; +} +

QuickCHAT

\ No newline at end of file diff --git a/Views/Shared/_Layout.cshtml b/Views/Shared/_Layout.cshtml new file mode 100644 index 0000000..38d5300 --- /dev/null +++ b/Views/Shared/_Layout.cshtml @@ -0,0 +1,56 @@ + + + + + @ViewData["Title"] - QuickCHAT + + + + + + + @if(ViewData["HideNavbar"] == null) + { + + } +
+ @RenderBody() +
+ \ No newline at end of file diff --git a/Pages/_ViewImports.cshtml b/Views/_ViewImports.cshtml similarity index 100% rename from Pages/_ViewImports.cshtml rename to Views/_ViewImports.cshtml diff --git a/Pages/_ViewStart.cshtml b/Views/_ViewStart.cshtml similarity index 100% rename from Pages/_ViewStart.cshtml rename to Views/_ViewStart.cshtml