feat: Actualizar las rutas de inclusión en las vistas del panel de control para mejorar la estructura del código

This commit is contained in:
Shni
2025-10-15 09:28:14 -05:00
parent aad5c7b111
commit 0ab59bf6a8
2 changed files with 11 additions and 18 deletions

View File

@@ -2,19 +2,19 @@
<div class="max-w-7xl mx-auto p-6">
<div class="relative">
<% if (!selectedGuild) { %>
<!-- When no guild selected show centered card -->
<%- include('partials/dashboard/dashboard_noguild_card') %>
<!-- When no guild selected show centered card -->
<%- include('../partials/dashboard/dashboard_noguild_card') %>
<% } else { %>
<!-- When a guild is selected render sidebar + content layout -->
<div class="w-full max-w-7xl mx-auto mt-6 px-4">
<div class="flex items-start gap-8">
<%- include('partials/dashboard/dashboard_sidebar') %>
<%- include('../partials/dashboard/dashboard_sidebar') %>
<div id="dashContent" class="flex-1">
<!-- initial fragment content will be rendered inside #dashMain by partials -->
<% if (typeof page !== 'undefined' && page === 'overview') { %>
<%- include('partials/dashboard/dashboard_overview') %>
<% } else if (typeof page !== 'undefined' && page === 'settings') { %>
<div id="dashMain"><%- include('partials/dashboard/dashboard_settings') %></div>
<% if (typeof page !== 'undefined' && page === 'overview') { %>
<%- include('../partials/dashboard/dashboard_overview') %>
<% } else if (typeof page !== 'undefined' && page === 'settings') { %>
<div id="dashMain"><%- include('../partials/dashboard/dashboard_settings') %></div>
<% } else { %>
<div id="dashMain"><!-- empty main placeholder --></div>
<% } %>

View File

@@ -1,13 +1,6 @@
<div class="w-full max-w-7xl mx-auto mt-6 px-4">
<div class="flex gap-8">
<%- include('partials/dashboard/dashboard_sidebar') %>
<!-- Main column -->
<main id="dashMain" class="flex-1 mx-auto">
<div class="mb-6">
<h1 class="text-4xl font-bold text-white">Welcome <span class="text-blue-400"><%= user?.username || 'Admin' %></span>,</h1>
</div>
<!-- overview content can expand here -->
</main>
<div id="dashMain">
<div class="mb-6">
<h1 class="text-4xl font-bold text-white">Welcome <span class="text-blue-400"><%= user?.username || 'Admin' %></span>,</h1>
</div>
<!-- overview content can expand here -->
</div>