Refactor code structure for improved readability and maintainability
This commit is contained in:
11
src/server/public/assets/css/_fonts.css
Normal file
11
src/server/public/assets/css/_fonts.css
Normal file
@@ -0,0 +1,11 @@
|
||||
@font-face {
|
||||
font-family: 'BoldPixels';
|
||||
src: url('/assets/fonts/BoldPixels.ttf') format('truetype');
|
||||
font-weight: 700;
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
.bold-pixels {
|
||||
font-family: 'BoldPixels', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
|
||||
}
|
||||
BIN
src/server/public/assets/fonts/BoldPixels.ttf
Normal file
BIN
src/server/public/assets/fonts/BoldPixels.ttf
Normal file
Binary file not shown.
@@ -15,6 +15,7 @@
|
||||
<link rel="stylesheet" href="/assets/css/modern-pixel.css?v=<%= version || '2.0.0' %>">
|
||||
<link rel="stylesheet" href="/assets/css/modern-sections.css?v=<%= version || '2.0.0' %>">
|
||||
<link rel="stylesheet" href="/assets/css/styles.css?v=<%= version || '2.0.0' %>">
|
||||
<link rel="stylesheet" href="/assets/css/_fonts.css?v=<%= version || '2.0.0' %>">
|
||||
<% if (typeof head !== 'undefined' && head) { %>
|
||||
<%= head %>
|
||||
<% } %>
|
||||
@@ -26,13 +27,13 @@
|
||||
<% if (typeof dashboardNav !== 'undefined' && dashboardNav) { %>
|
||||
<%- dashboardNav %>
|
||||
<% } else { %>
|
||||
<%- include('../partials/dashboard_nav') %>
|
||||
<%- await include('../partials/dashboard_nav') %>
|
||||
<% } %>
|
||||
<% } else if (!hideNavbar) { %>
|
||||
<% if (typeof navbar !== 'undefined' && navbar) { %>
|
||||
<%- navbar %>
|
||||
<% } else { %>
|
||||
<%- include('../partials/navbar', { appName }) %>
|
||||
<%- await include('../partials/navbar', { appName }) %>
|
||||
<% } %>
|
||||
<% } %>
|
||||
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
<div class="relative">
|
||||
<% if (!selectedGuild) { %>
|
||||
<!-- When no guild selected show centered card -->
|
||||
<%- include('../partials/dashboard/dashboard_noguild_card') %>
|
||||
<%- await 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') %>
|
||||
<%- await 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') %>
|
||||
<%- await include('../partials/dashboard/dashboard_overview') %>
|
||||
<% } else if (typeof page !== 'undefined' && page === 'settings') { %>
|
||||
<div id="dashMain"><%- include('../partials/dashboard/dashboard_settings') %></div>
|
||||
<div id="dashMain"><%- await include('../partials/dashboard/dashboard_settings') %></div>
|
||||
<% } else { %>
|
||||
<div id="dashMain"><!-- empty main placeholder --></div>
|
||||
<% } %>
|
||||
@@ -23,16 +23,7 @@
|
||||
</div>
|
||||
<% } %>
|
||||
|
||||
<div id="dashContent">
|
||||
<!-- The dashContent keeps the outer layout; dashMain inside will be swapped by fragments -->
|
||||
<% if (typeof page !== 'undefined' && page === 'overview' && selectedGuild) { %>
|
||||
<%- include('partials/dashboard/dashboard_overview') %>
|
||||
<% } %>
|
||||
|
||||
<% if (typeof page !== 'undefined' && page === 'settings' && selectedGuild) { %>
|
||||
<%- include('partials/dashboard/dashboard_settings') %>
|
||||
<% } %>
|
||||
</div>
|
||||
<!-- dashContent is rendered above inside the selectedGuild block to ensure includes use await -->
|
||||
|
||||
<script>
|
||||
// Simple fragment navigation for a SPA-like feel inside /dashboard
|
||||
|
||||
Reference in New Issue
Block a user