From 1fd4a7e6b1758f1d9718dd6cde3738e22b13701a Mon Sep 17 00:00:00 2001 From: Yuri Dimas Date: Wed, 1 Oct 2025 14:05:54 +0700 Subject: [PATCH] style: slicing page dashboard, sidebar, navbar --- Controllers/DashboardController.cs | 17 ++++ Views/Dashboard/Index.cshtml | 4 + Views/Shared/_Layout.cshtml | 4 +- Views/Shared/_LayoutApp.cshtml | 60 +++++++++++++ Views/Shared/_Navbar.cshtml | 33 +++++++ Views/Shared/_Sidebar.cshtml | 137 +++++++++++++++++++++++++++++ 6 files changed, 253 insertions(+), 2 deletions(-) create mode 100644 Controllers/DashboardController.cs create mode 100644 Views/Dashboard/Index.cshtml create mode 100644 Views/Shared/_LayoutApp.cshtml create mode 100644 Views/Shared/_Navbar.cshtml create mode 100644 Views/Shared/_Sidebar.cshtml diff --git a/Controllers/DashboardController.cs b/Controllers/DashboardController.cs new file mode 100644 index 0000000..6ef89aa --- /dev/null +++ b/Controllers/DashboardController.cs @@ -0,0 +1,17 @@ +using Microsoft.AspNetCore.Mvc; + +namespace BpsRw.Controllers +{ + public class DashboardController : Controller + { + public IActionResult Index() + { + return View(); + } + + public IActionResult Reports() + { + return View(); + } + } +} \ No newline at end of file diff --git a/Views/Dashboard/Index.cshtml b/Views/Dashboard/Index.cshtml new file mode 100644 index 0000000..98f37bb --- /dev/null +++ b/Views/Dashboard/Index.cshtml @@ -0,0 +1,4 @@ +@{ + Layout = "_LayoutApp"; + ViewData["Title"] = "Dashboard"; +} \ No newline at end of file diff --git a/Views/Shared/_Layout.cshtml b/Views/Shared/_Layout.cshtml index ef1ea73..0323f09 100644 --- a/Views/Shared/_Layout.cshtml +++ b/Views/Shared/_Layout.cshtml @@ -57,9 +57,9 @@
- +
diff --git a/Views/Shared/_LayoutApp.cshtml b/Views/Shared/_LayoutApp.cshtml new file mode 100644 index 0000000..890b457 --- /dev/null +++ b/Views/Shared/_LayoutApp.cshtml @@ -0,0 +1,60 @@ + + + + + + + @ViewData["Title"] - BPS RW + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ @await Html.PartialAsync("_Navbar") + +
+ @RenderBody() +
+
+
+ @await Html.PartialAsync("_Sidebar") +
+
+ + + + @await RenderSectionAsync("Scripts", required: false) + + + \ No newline at end of file diff --git a/Views/Shared/_Navbar.cshtml b/Views/Shared/_Navbar.cshtml new file mode 100644 index 0000000..9d7b4bc --- /dev/null +++ b/Views/Shared/_Navbar.cshtml @@ -0,0 +1,33 @@ + \ No newline at end of file diff --git a/Views/Shared/_Sidebar.cshtml b/Views/Shared/_Sidebar.cshtml new file mode 100644 index 0000000..946d4b8 --- /dev/null +++ b/Views/Shared/_Sidebar.cshtml @@ -0,0 +1,137 @@ + + + \ No newline at end of file