Repository navigation
Expand file tree
/
Copy paththeme-layout.html
More file actions
267 lines (248 loc) · 16.5 KB
/
Copy paththeme-layout.html
File metadata and controls
267 lines (248 loc) · 16.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<!DOCTYPE html>
<html data-page="docs" lang="en">
<head>
<!-- Basic SEO -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- SEO and social previews -->
<meta name="description" content="Customize NahaAdmin CSS variables, fixed navigation, mini sidebar, and saved sidebar state in the Bootstrap 5 admin template." />
<meta name="author" content="NahaAdmin" />
<meta name="robots" content="index, follow, max-image-preview:large" />
<meta property="og:title" content="Bootstrap 5 Theme and Layout Guide | NahaAdmin" />
<meta property="og:description" content="Customize NahaAdmin CSS variables, fixed navigation, mini sidebar, and saved sidebar state in the Bootstrap 5 admin template." />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="NahaAdmin" />
<meta property="og:url" content="https://naha-admin.vercel.app/docs/theme-layout.html" />
<meta property="og:image" content="https://naha-admin.vercel.app/assets/images/banner.png" />
<meta property="og:image:width" content="1440" />
<meta property="og:image:height" content="900" />
<meta property="og:image:alt" content="NahaAdmin Bootstrap 5 admin dashboard preview" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Bootstrap 5 Theme and Layout Guide | NahaAdmin" />
<meta name="twitter:description" content="Customize NahaAdmin CSS variables, fixed navigation, mini sidebar, and saved sidebar state in the Bootstrap 5 admin template." />
<meta name="twitter:image" content="https://naha-admin.vercel.app/assets/images/banner.png" />
<meta name="twitter:image:alt" content="NahaAdmin Bootstrap 5 admin dashboard preview" />
<link rel="canonical" href="https://naha-admin.vercel.app/docs/theme-layout.html" />
<title>Bootstrap 5 Theme and Layout Guide | NahaAdmin</title>
<!-- Favicon -->
<link rel="icon" href="../assets/images/favicon.ico" type="image/x-icon" />
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap" />
<!-- Styles -->
<link rel="stylesheet" href="../assets/plugins/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" href="../assets/plugins/nprogress/nprogress.min.css" />
<link rel="stylesheet" href="../assets/styles/naha-admin.min.css" />
<link rel="stylesheet" href="../assets/plugins/animate/animate.min.css" />
<link rel="stylesheet" href="../assets/plugins/simplebar/simplebar.min.css" />
<link rel="stylesheet" href="../assets/plugins/phosphor/bold/style.css" />
<link rel="stylesheet" href="../assets/plugins/phosphor/regular/style.css" />
<link rel="stylesheet" href="../assets/plugins/phosphor/fill/style.css" />
<link rel="stylesheet" href="../assets/styles/custom.css" />
</head>
<body class="nd-nav-fixed">
<header>
<nav class="nd-topnav navbar navbar-expand navbar-light">
<a class="navbar-brand ps-3 d-flex align-items-center" href="index.html" aria-label="Naha Admin">
<svg class="logo-navbar" viewBox="0 0 48 36" fill="currentColor" stroke="currentColor" stroke-width="3" stroke-dasharray="5 5" stroke-linecap="round" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false"><rect x="10" y="4" width="28" height="28" rx="3" fill-opacity="0.15"/></svg>
<span class="ms-2 fw-semibold">Naha Admin</span>
</a>
<button class="btn btn-light" id="sidebarToggle" aria-label="Toggle sidebar">
<i class="ph-bold ph-sidebar-simple"></i>
</button>
<div class="d-none d-sm-flex align-items-center ms-3">
<span class="badge bg-primary-subtle text-primary fw-semibold px-2.5 py-2 rounded-pill">
<i class="ph-bold ph-book me-1"></i> Documentation
</span>
</div>
<div class="ms-auto d-flex align-items-center pe-3">
<a href="../demo/index.html" class="btn btn-light border ms-lg-2 px-3 py-2 text-dark fw-medium">
<i class="ph-bold ph-monitor-play me-1 text-primary"></i> Live Preview
</a>
</div>
</nav>
</header>
<div id="layoutSidenav">
<aside id="layoutSidenav_nav">
<nav class="nd-sidenav accordion nd-sidenav-light" id="sidenavAccordion">
<div class="nd-sidenav-menu" data-simplebar>
<div class="nav">
<h2 class="nd-sidenav-menu-heading">Documentation</h2>
<a class="nav-link" href="index.html">
<div class="nd-nav-link-icon"><i class="ph-bold ph-book-open"></i></div>
<span>Introduction</span>
</a>
<a class="nav-link" href="getting-started.html">
<div class="nd-nav-link-icon"><i class="ph-bold ph-rocket-launch"></i></div>
<span>Getting Started</span>
</a>
<a class="nav-link active" href="theme-layout.html">
<div class="nd-nav-link-icon"><i class="ph-bold ph-palette"></i></div>
<span>Theme & Layout</span>
</a>
<a class="nav-link" href="browser-support.html">
<div class="nd-nav-link-icon"><i class="ph-bold ph-globe"></i></div>
<span>Browser Support</span>
</a>
<h2 class="nd-sidenav-menu-heading">Resources</h2>
<a class="nav-link" href="faq.html">
<div class="nd-nav-link-icon"><i class="ph-bold ph-question"></i></div>
<span>FAQ</span>
</a>
<a class="nav-link" href="support.html">
<div class="nd-nav-link-icon"><i class="ph-bold ph-headset"></i></div>
<span>Support</span>
</a>
<a class="nav-link" href="license.html">
<div class="nd-nav-link-icon"><i class="ph-bold ph-seal-check"></i></div>
<span>License</span>
</a>
<a class="nav-link" href="https://github.com/sepsu-dev/naha-admin/releases" target="_blank">
<div class="nd-nav-link-icon"><i class="ph-bold ph-download-simple"></i></div>
<span>Download</span>
<i class="ph-bold ph-arrow-up-right ms-auto extra-small opacity-50"></i>
</a>
<a class="nav-link" href="https://github.com/sepsu-dev/naha-admin" target="_blank">
<div class="nd-nav-link-icon"><i class="ph-bold ph-github-logo"></i></div>
<span>GitHub</span>
<i class="ph-bold ph-arrow-up-right ms-auto extra-small opacity-50"></i>
</a>
</div>
</div>
<footer class="nd-sidenav-footer">
<div class="user-info-footer overflow-hidden w-100">
<small class="text-muted text-user-footer text-truncate d-block"
style="font-size: 0.75rem; line-height: 1.4;">© 2026 Naha Admin</small>
</div>
</footer>
</nav>
</aside>
<main id="layoutSidenav_content">
<section class="container-fluid px-4 py-4 pb-5">
<div>
<!-- Theme & Layout Card -->
<div class="docs-article mb-4">
<div class="docs-body">
<header class="docs-page-heading">
<h1>Theme & Layout</h1>
<p class="text-muted mb-0">CSS variables, custom color tokens, and layout modes.</p>
</header>
<h2 class="docs-section-title fw-semibold small text-dark mb-2">1. Global CSS Custom Properties</h2>
<p class="text-muted mb-3">NahaAdmin uses CSS Custom Properties defined in
<code>assets/styles/naha-admin.css</code> for global theming. After editing, copy its contents to
<code>assets/styles/naha-admin.min.css</code>, the compatibility copy loaded by the examples.
The soft light palette combines cool neutral surfaces,
charcoal text, and a muted teal accent.
Semantic tokens such as <code>--background</code>, <code>--foreground</code>, <code>--primary</code>,
<code>--secondary</code>, <code>--muted</code>, <code>--accent</code>, <code>--destructive</code>,
<code>--border</code>, <code>--input</code>, and <code>--ring</code> feed the NahaAdmin and Bootstrap aliases.
</p>
<div class="table-responsive mb-4">
<table class="table table-bordered align-middle small mb-0">
<thead class="table-light">
<tr>
<th class="fw-semibold text-dark" style="width: 30%;">Variable</th>
<th class="fw-semibold text-dark" style="width: 25%;">Default Value</th>
<th class="fw-semibold text-dark">Description</th>
</tr>
</thead>
<tbody class="text-muted">
<tr>
<td><code>--nd-primary</code></td>
<td><code>#386b65</code></td>
<td>Primary actions; focus uses the separate ring token</td>
</tr>
<tr>
<td><code>--nd-bg-light</code></td>
<td><span class="badge bg-light text-dark border">#f5f7f8</span></td>
<td>Global dashboard background color</td>
</tr>
<tr>
<td><code>--nd-surface</code></td>
<td><span class="badge bg-white text-dark border">#ffffff</span></td>
<td>Card and navbar background color</td>
</tr>
<tr>
<td><code>--nd-border</code></td>
<td><code>#dfe6e7</code></td>
<td>Border color for dividers, tables, and card outlines</td>
</tr>
<tr>
<td><code>--nd-text</code></td>
<td><code>#293638</code></td>
<td>Base primary heading and typography color</td>
</tr>
</tbody>
</table>
</div>
<pre class="bg-light border rounded p-3 small"><code>:root {
--primary: #386b65;
--primary-foreground: #ffffff;
--ring: #648d87;
--radius: 0.625rem;
--nd-primary: var(--primary);
--nd-primary-rgb: 56, 107, 101;
--nd-primary-light: #56877f;
--nd-primary-dark: #2e5954;
}</code></pre>
<p class="text-muted">Bootstrap utilities, buttons, and links use these tokens. Dashboard charts keep a separate categorical palette.
Primary and destructive badges use solid fills; secondary uses a neutral fill.
Status colors retain their meaning, with pale backgrounds and readable foregrounds.
Categorical charts use six muted colors rather than status colors for unrelated data.
Outfit is shared across the landing page, documentation, dashboards, and charts, with
system fonts as a fallback. Keep brand hex values and their RGB aliases in sync.
Vendor themes may need separate edits. This template
ships a light theme; a complete dark theme is not included.</p>
<h2 class="docs-section-title fw-semibold small text-dark mb-2">2. Layout Modes & Classes (Apply to
<code><body></code>)
</h2>
<div class="row g-3 mb-4">
<div class="col-md-6">
<div class="docs-note">
<h3 class="fw-semibold small text-dark mb-1">Fixed Navbar
(<code>nd-nav-fixed</code>)</h3>
<p class="text-muted extra-small mb-0">Pins top navigation bar to the top of the
viewport during scrolling with smooth shadow separation.</p>
</div>
</div>
<div class="col-md-6">
<div class="docs-note">
<h3 class="fw-semibold small text-dark mb-1">Mini Sidebar
(<code>nd-sidebar-mini nd-sidenav-toggled</code>)</h3>
<p class="text-muted extra-small mb-0">Collapses the sidebar to an icon-only
rail (70px) on desktop. It expands on hover or keyboard focus without shifting
content. Without <code>nd-sidebar-mini</code>, toggling hides the sidebar.</p>
</div>
</div>
</div>
<h2 class="docs-section-title fw-semibold small text-dark mb-2">3. Sidebar State Persistence</h2>
<p class="text-muted mb-0">Desktop sidebar state is saved in <code>localStorage</code>
under <code>nd|sidebar-toggle</code>. If storage is blocked, toggling still works without
persistence. On mobile, the sidebar starts closed; Escape closes it and returns focus
to the toggle. Crossing the desktop breakpoint resets the visible state.
</p>
</div>
</div>
<!-- Navigation Footer -->
<div class="d-flex justify-content-between align-items-center mt-4">
<a href="getting-started.html" class="btn btn-outline-secondary px-3 py-2">
<i class="ph-bold ph-arrow-left me-1"></i> Getting Started
</a>
<a href="browser-support.html" class="btn btn-outline-primary px-3 py-2">
Browser Support <i class="ph-bold ph-arrow-right ms-1"></i>
</a>
</div>
</div>
</section>
</main>
</div>
<!-- Scripts -->
<script src="../assets/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="../assets/plugins/jquery/jquery.min.js"></script>
<script src="../assets/plugins/simplebar/simplebar.min.js"></script>
<script src="../assets/plugins/nprogress/nprogress.min.js"></script>
<script src="../assets/scripts/naha-admin.min.js"></script>
</body>
</html>