diff --git a/client/js/admin/init.js b/client/js/admin/init.js index 7e450d4..005f837 100644 --- a/client/js/admin/init.js +++ b/client/js/admin/init.js @@ -50,35 +50,44 @@ function loadOverview() {

Welcome to the Admin Dashboard

-

Select a section from the sidebar to manage different aspects of the website.

+

Select a section from the sidebar or click on a panel below to manage different aspects of the website.

-
+
-

Forum Posts

+

Forum Posts

Manage and moderate forum discussions.

+
-
+
-

Users

+

Users

View and manage user accounts.

+
-
+
-

Games

+

Games

Oversee and manage game listings.

+
@@ -86,6 +95,24 @@ function loadOverview() {
`); + + // Add click event listeners to the panels + $('.clickable-panel').on('click', function() { + const section = $(this).data('section'); + $('.nav-sidebar li').removeClass('active'); + $(`.nav-sidebar a[data-section="${section}"]`).parent().addClass('active'); + loadSection(section); + }); + + // Add custom CSS for underline + $('