domma-cms 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +469 -0
- package/admin/css/admin.css +1123 -0
- package/admin/index.html +72 -0
- package/admin/js/api.js +210 -0
- package/admin/js/app.js +270 -0
- package/admin/js/config/sidebar-config.js +107 -0
- package/admin/js/lib/card.js +63 -0
- package/admin/js/lib/image-editor.js +869 -0
- package/admin/js/lib/markdown-toolbar.js +421 -0
- package/admin/js/templates/dashboard.html +50 -0
- package/admin/js/templates/documentation.html +237 -0
- package/admin/js/templates/layouts.html +11 -0
- package/admin/js/templates/login.html +58 -0
- package/admin/js/templates/media.html +16 -0
- package/admin/js/templates/navigation.html +50 -0
- package/admin/js/templates/page-editor.html +126 -0
- package/admin/js/templates/pages.html +18 -0
- package/admin/js/templates/plugins.html +12 -0
- package/admin/js/templates/settings.html +190 -0
- package/admin/js/templates/tutorials.html +233 -0
- package/admin/js/templates/user-editor.html +12 -0
- package/admin/js/templates/users.html +10 -0
- package/admin/js/views/dashboard.js +48 -0
- package/admin/js/views/documentation.js +12 -0
- package/admin/js/views/index.js +33 -0
- package/admin/js/views/layouts.js +49 -0
- package/admin/js/views/login.js +254 -0
- package/admin/js/views/media.js +240 -0
- package/admin/js/views/navigation.js +152 -0
- package/admin/js/views/page-editor.js +479 -0
- package/admin/js/views/pages.js +64 -0
- package/admin/js/views/plugins.js +100 -0
- package/admin/js/views/settings.js +64 -0
- package/admin/js/views/tutorials.js +12 -0
- package/admin/js/views/user-editor.js +88 -0
- package/admin/js/views/users.js +73 -0
- package/bin/cli.js +334 -0
- package/config/auth.json +20 -0
- package/config/content.json +10 -0
- package/config/navigation.json +63 -0
- package/config/plugins.json +47 -0
- package/config/presets.json +34 -0
- package/config/server.json +6 -0
- package/config/site.json +33 -0
- package/package.json +67 -0
- package/plugins/back-to-top/admin/templates/back-to-top-settings.html +55 -0
- package/plugins/back-to-top/admin/views/back-to-top-settings.js +44 -0
- package/plugins/back-to-top/config.js +10 -0
- package/plugins/back-to-top/plugin.js +24 -0
- package/plugins/back-to-top/plugin.json +36 -0
- package/plugins/back-to-top/public/inject-body.html +105 -0
- package/plugins/cookie-consent/admin/templates/cookie-consent-settings.html +113 -0
- package/plugins/cookie-consent/admin/views/cookie-consent-settings.js +73 -0
- package/plugins/cookie-consent/config.js +30 -0
- package/plugins/cookie-consent/plugin.js +24 -0
- package/plugins/cookie-consent/plugin.json +36 -0
- package/plugins/cookie-consent/public/inject-body.html +69 -0
- package/plugins/custom-css/admin/templates/custom-css.html +17 -0
- package/plugins/custom-css/admin/views/custom-css.js +35 -0
- package/plugins/custom-css/config.js +1 -0
- package/plugins/custom-css/data/custom.css +0 -0
- package/plugins/custom-css/plugin.js +63 -0
- package/plugins/custom-css/plugin.json +32 -0
- package/plugins/custom-css/public/inject-head.html +1 -0
- package/plugins/domma-effects/admin/templates/domma-effects.html +488 -0
- package/plugins/domma-effects/admin/views/domma-effects.js +56 -0
- package/plugins/domma-effects/config.js +9 -0
- package/plugins/domma-effects/plugin.js +22 -0
- package/plugins/domma-effects/plugin.json +36 -0
- package/plugins/domma-effects/public/celebrations/core/canvas.js +111 -0
- package/plugins/domma-effects/public/celebrations/core/particles.js +144 -0
- package/plugins/domma-effects/public/celebrations/core/physics.js +166 -0
- package/plugins/domma-effects/public/celebrations/index.js +535 -0
- package/plugins/domma-effects/public/celebrations/themes/christmas.js +1805 -0
- package/plugins/domma-effects/public/celebrations/themes/guy-fawkes.js +1477 -0
- package/plugins/domma-effects/public/celebrations/themes/halloween.js +1837 -0
- package/plugins/domma-effects/public/celebrations/themes/st-andrews.js +1175 -0
- package/plugins/domma-effects/public/celebrations/themes/st-davids.js +1258 -0
- package/plugins/domma-effects/public/celebrations/themes/st-georges.js +1754 -0
- package/plugins/domma-effects/public/celebrations/themes/st-patricks.js +1290 -0
- package/plugins/domma-effects/public/celebrations/themes/valentines.js +1361 -0
- package/plugins/domma-effects/public/inject-body.html +268 -0
- package/plugins/example-analytics/admin/templates/analytics.html +10 -0
- package/plugins/example-analytics/admin/views/analytics.js +51 -0
- package/plugins/example-analytics/config.js +6 -0
- package/plugins/example-analytics/plugin.js +58 -0
- package/plugins/example-analytics/plugin.json +27 -0
- package/plugins/example-analytics/public/inject-body.html +13 -0
- package/plugins/example-analytics/public/inject-head.html +1 -0
- package/plugins/example-analytics/stats.json +1 -0
- package/plugins/form-builder/admin/templates/form-editor.html +158 -0
- package/plugins/form-builder/admin/templates/form-settings.html +29 -0
- package/plugins/form-builder/admin/templates/form-submissions.html +30 -0
- package/plugins/form-builder/admin/templates/forms-list.html +17 -0
- package/plugins/form-builder/admin/views/form-editor.js +817 -0
- package/plugins/form-builder/admin/views/form-settings.js +38 -0
- package/plugins/form-builder/admin/views/form-submissions.js +295 -0
- package/plugins/form-builder/admin/views/forms-list.js +164 -0
- package/plugins/form-builder/config.js +9 -0
- package/plugins/form-builder/data/forms/contact-details.json +63 -0
- package/plugins/form-builder/data/forms/contact.json +52 -0
- package/plugins/form-builder/data/submissions/contact-details.json +1 -0
- package/plugins/form-builder/data/submissions/contact.json +14 -0
- package/plugins/form-builder/email.js +103 -0
- package/plugins/form-builder/plugin.js +454 -0
- package/plugins/form-builder/plugin.json +56 -0
- package/plugins/form-builder/public/inject-body.html +270 -0
- package/plugins/form-builder/public/inject-head.html +42 -0
- package/public/css/site.css +189 -0
- package/public/js/site.js +109 -0
- package/scripts/copy-domma.js +48 -0
- package/scripts/fresh.js +41 -0
- package/scripts/reset.js +124 -0
- package/scripts/seed.js +666 -0
- package/scripts/setup.js +263 -0
- package/server/config.js +56 -0
- package/server/middleware/auth.js +97 -0
- package/server/routes/api/auth.js +116 -0
- package/server/routes/api/layouts.js +25 -0
- package/server/routes/api/media.js +93 -0
- package/server/routes/api/navigation.js +37 -0
- package/server/routes/api/pages.js +118 -0
- package/server/routes/api/plugins.js +46 -0
- package/server/routes/api/settings.js +25 -0
- package/server/routes/api/users.js +110 -0
- package/server/routes/public.js +108 -0
- package/server/server.js +169 -0
- package/server/services/content.js +298 -0
- package/server/services/images.js +334 -0
- package/server/services/markdown.js +297 -0
- package/server/services/plugins.js +246 -0
- package/server/services/renderer.js +80 -0
- package/server/services/users.js +212 -0
- package/server/templates/page.html +78 -0
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
<div class="view-header">
|
|
2
|
+
<h1><span data-icon="book"></span> Usage</h1>
|
|
3
|
+
</div>
|
|
4
|
+
|
|
5
|
+
<div class="row">
|
|
6
|
+
<div class="col-12">
|
|
7
|
+
|
|
8
|
+
<!-- Pages -->
|
|
9
|
+
<div class="card card-collapsible mb-4">
|
|
10
|
+
<div class="card-header" role="button" tabindex="0">
|
|
11
|
+
<div class="card-header-content"><h2><span data-icon="file-text"></span> Pages</h2></div>
|
|
12
|
+
<span class="card-collapse-icon" data-icon="chevron-down"></span>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="card-body docs-body">
|
|
15
|
+
<p>Pages are stored as Markdown files in <code>content/pages/</code>. Each file has a YAML frontmatter block at
|
|
16
|
+
the top followed by the page body in Markdown.</p>
|
|
17
|
+
|
|
18
|
+
<h3>URL mapping</h3>
|
|
19
|
+
<table class="table table-sm">
|
|
20
|
+
<thead>
|
|
21
|
+
<tr>
|
|
22
|
+
<th>File path</th>
|
|
23
|
+
<th>Public URL</th>
|
|
24
|
+
</tr>
|
|
25
|
+
</thead>
|
|
26
|
+
<tbody>
|
|
27
|
+
<tr>
|
|
28
|
+
<td><code>content/pages/index.md</code></td>
|
|
29
|
+
<td><code>/</code></td>
|
|
30
|
+
</tr>
|
|
31
|
+
<tr>
|
|
32
|
+
<td><code>content/pages/about.md</code></td>
|
|
33
|
+
<td><code>/about</code></td>
|
|
34
|
+
</tr>
|
|
35
|
+
<tr>
|
|
36
|
+
<td><code>content/pages/blog/index.md</code></td>
|
|
37
|
+
<td><code>/blog</code></td>
|
|
38
|
+
</tr>
|
|
39
|
+
<tr>
|
|
40
|
+
<td><code>content/pages/blog/hello-world.md</code></td>
|
|
41
|
+
<td><code>/blog/hello-world</code></td>
|
|
42
|
+
</tr>
|
|
43
|
+
</tbody>
|
|
44
|
+
</table>
|
|
45
|
+
|
|
46
|
+
<h3>Frontmatter reference</h3>
|
|
47
|
+
<pre class="code-block"><code>---
|
|
48
|
+
title: My Page
|
|
49
|
+
description: A short description for SEO meta tags.
|
|
50
|
+
status: published # published | draft (draft pages return 404)
|
|
51
|
+
layout: default # layout name from config/presets.json
|
|
52
|
+
tags: [one, two] # optional taxonomy
|
|
53
|
+
updatedAt: 2026-03-01 # auto-set on save
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
# Page heading
|
|
57
|
+
|
|
58
|
+
Your Markdown content goes here.</code></pre>
|
|
59
|
+
|
|
60
|
+
<h3>Drafts</h3>
|
|
61
|
+
<p>Pages with <code>status: draft</code> are never served on the public site — they return a 404. Toggle status
|
|
62
|
+
in the Page Editor to publish.</p>
|
|
63
|
+
|
|
64
|
+
<h3>Layouts</h3>
|
|
65
|
+
<p>Layouts are defined in <code>config/presets.json</code> and apply CSS class wrappers around page content.
|
|
66
|
+
Select a layout per-page in the editor, or change the default in Site Settings.</p>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<!-- Media -->
|
|
71
|
+
<div class="card card-collapsible mb-4">
|
|
72
|
+
<div class="card-header" role="button" tabindex="0">
|
|
73
|
+
<div class="card-header-content"><h2><span data-icon="image"></span> Media</h2></div>
|
|
74
|
+
<span class="card-collapse-icon" data-icon="chevron-down"></span>
|
|
75
|
+
</div>
|
|
76
|
+
<div class="card-body docs-body">
|
|
77
|
+
<p>Media files are stored in <code>content/media/</code> and served publicly at <code>/media/{filename}</code>.
|
|
78
|
+
</p>
|
|
79
|
+
|
|
80
|
+
<h3>Using media in pages</h3>
|
|
81
|
+
<p>Reference uploaded files by their public URL in Markdown:</p>
|
|
82
|
+
<pre class="code-block"><code>
|
|
83
|
+
|
|
84
|
+
<img src="/media/my-image.jpg" alt="Alt text"></code></pre>
|
|
85
|
+
|
|
86
|
+
<h3>Upload limits</h3>
|
|
87
|
+
<p>The maximum file size is configured in <code>config/server.json</code> under <code>uploads.maxFileSize</code>
|
|
88
|
+
(bytes). Default is 10 MB.</p>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<!-- Navigation -->
|
|
93
|
+
<div class="card card-collapsible mb-4">
|
|
94
|
+
<div class="card-header" role="button" tabindex="0">
|
|
95
|
+
<div class="card-header-content"><h2><span data-icon="menu"></span> Navigation</h2></div>
|
|
96
|
+
<span class="card-collapse-icon" data-icon="chevron-down"></span>
|
|
97
|
+
</div>
|
|
98
|
+
<div class="card-body docs-body">
|
|
99
|
+
<p>The navigation tree is stored in <code>config/navigation.json</code> and injected into every public page as
|
|
100
|
+
<code>window.__CMS_NAV__</code>.</p>
|
|
101
|
+
|
|
102
|
+
<h3>Dropdowns</h3>
|
|
103
|
+
<p>Nest items under a parent using the drag-and-drop tree in the Navigation editor. Child items are stored under
|
|
104
|
+
the <code>items</code> key — the public navbar renders them as a dropdown.</p>
|
|
105
|
+
|
|
106
|
+
<h3>External links</h3>
|
|
107
|
+
<p>Set the URL to a full <code>https://</code> address to link outside the site. Leave blank for section
|
|
108
|
+
headings.</p>
|
|
109
|
+
|
|
110
|
+
<h3>Icons</h3>
|
|
111
|
+
<p>Set the <code>icon</code> field to any registered icon name. Icons appear in the navbar link alongside the
|
|
112
|
+
label.</p>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
|
|
116
|
+
<!-- Settings -->
|
|
117
|
+
<div class="card card-collapsible mb-4">
|
|
118
|
+
<div class="card-header" role="button" tabindex="0">
|
|
119
|
+
<div class="card-header-content"><h2><span data-icon="settings"></span> Site Settings</h2></div>
|
|
120
|
+
<span class="card-collapse-icon" data-icon="chevron-down"></span>
|
|
121
|
+
</div>
|
|
122
|
+
<div class="card-body docs-body">
|
|
123
|
+
<p>Site Settings are stored in <code>config/site.json</code> and editable from the Settings page in the admin
|
|
124
|
+
panel.</p>
|
|
125
|
+
|
|
126
|
+
<table class="table table-sm">
|
|
127
|
+
<thead>
|
|
128
|
+
<tr>
|
|
129
|
+
<th>Field</th>
|
|
130
|
+
<th>Description</th>
|
|
131
|
+
</tr>
|
|
132
|
+
</thead>
|
|
133
|
+
<tbody>
|
|
134
|
+
<tr>
|
|
135
|
+
<td><code>siteName</code></td>
|
|
136
|
+
<td>Site title used in the public navbar and browser tab.</td>
|
|
137
|
+
</tr>
|
|
138
|
+
<tr>
|
|
139
|
+
<td><code>tagline</code></td>
|
|
140
|
+
<td>Subtitle shown in the public site footer.</td>
|
|
141
|
+
</tr>
|
|
142
|
+
<tr>
|
|
143
|
+
<td><code>adminTheme</code></td>
|
|
144
|
+
<td>Admin panel colour theme (e.g. <code>charcoal-dark</code>, <code>ocean-light</code>).</td>
|
|
145
|
+
</tr>
|
|
146
|
+
<tr>
|
|
147
|
+
<td><code>publicTheme</code></td>
|
|
148
|
+
<td>Public site theme applied to <code><html data-theme></code>.</td>
|
|
149
|
+
</tr>
|
|
150
|
+
<tr>
|
|
151
|
+
<td><code>defaultLayout</code></td>
|
|
152
|
+
<td>Fallback layout for pages that don't specify one.</td>
|
|
153
|
+
</tr>
|
|
154
|
+
</tbody>
|
|
155
|
+
</table>
|
|
156
|
+
|
|
157
|
+
<h3>Server configuration</h3>
|
|
158
|
+
<p>Low-level settings (port, CORS, upload size) live in <code>config/server.json</code> and require a server
|
|
159
|
+
restart to take effect. These are not editable from the admin panel.</p>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
|
|
163
|
+
<!-- Plugins -->
|
|
164
|
+
<div class="card card-collapsible mb-4">
|
|
165
|
+
<div class="card-header" role="button" tabindex="0">
|
|
166
|
+
<div class="card-header-content"><h2><span data-icon="package"></span> Plugins</h2></div>
|
|
167
|
+
<span class="card-collapse-icon" data-icon="chevron-down"></span>
|
|
168
|
+
</div>
|
|
169
|
+
<div class="card-body docs-body">
|
|
170
|
+
<p>Plugins extend the CMS with new server routes, admin views, and public-site injection snippets. Each plugin
|
|
171
|
+
is a directory under <code>plugins/</code>.</p>
|
|
172
|
+
|
|
173
|
+
<h3>Enabling and disabling</h3>
|
|
174
|
+
<p>Use the Plugins page in the admin to toggle plugins on or off. State is saved to
|
|
175
|
+
<code>config/plugins.json</code>. <strong>A server restart is required for changes to take effect.</strong>
|
|
176
|
+
</p>
|
|
177
|
+
|
|
178
|
+
<h3>Plugin settings</h3>
|
|
179
|
+
<p>Plugins that expose a settings page will appear as a link in the sidebar under the Plugins section. Settings
|
|
180
|
+
are merged with the plugin's defaults from <code>config.js</code> and saved to
|
|
181
|
+
<code>config/plugins.json</code>.</p>
|
|
182
|
+
|
|
183
|
+
<h3>Security</h3>
|
|
184
|
+
<p>Only files inside a plugin's <code>admin/</code> and <code>public/</code> subdirectories are served
|
|
185
|
+
statically. Server files (<code>plugin.js</code>, <code>config.js</code>, <code>data/</code>) are blocked and
|
|
186
|
+
return 404.</p>
|
|
187
|
+
|
|
188
|
+
<p>See the <a href="#/tutorials">Tutorials</a> section for a guide to writing your own plugin.</p>
|
|
189
|
+
</div>
|
|
190
|
+
</div>
|
|
191
|
+
|
|
192
|
+
<!-- Users -->
|
|
193
|
+
<div class="card card-collapsible mb-4">
|
|
194
|
+
<div class="card-header" role="button" tabindex="0">
|
|
195
|
+
<div class="card-header-content"><h2><span data-icon="users"></span> Users & Roles</h2></div>
|
|
196
|
+
<span class="card-collapse-icon" data-icon="chevron-down"></span>
|
|
197
|
+
</div>
|
|
198
|
+
<div class="card-body docs-body">
|
|
199
|
+
<p>Users are stored as individual JSON files in <code>content/users/</code>. Passwords are hashed with bcrypt
|
|
200
|
+
and never returned by the API.</p>
|
|
201
|
+
|
|
202
|
+
<h3>Roles</h3>
|
|
203
|
+
<table class="table table-sm">
|
|
204
|
+
<thead>
|
|
205
|
+
<tr>
|
|
206
|
+
<th>Role</th>
|
|
207
|
+
<th>Access</th>
|
|
208
|
+
</tr>
|
|
209
|
+
</thead>
|
|
210
|
+
<tbody>
|
|
211
|
+
<tr>
|
|
212
|
+
<td><strong>Admin</strong></td>
|
|
213
|
+
<td>Full access — users, plugins, settings, all content.</td>
|
|
214
|
+
</tr>
|
|
215
|
+
<tr>
|
|
216
|
+
<td><strong>Manager</strong></td>
|
|
217
|
+
<td>Content + structure (navigation, layouts). No users or plugins.</td>
|
|
218
|
+
</tr>
|
|
219
|
+
<tr>
|
|
220
|
+
<td><strong>Editor</strong></td>
|
|
221
|
+
<td>Pages and media only.</td>
|
|
222
|
+
</tr>
|
|
223
|
+
<tr>
|
|
224
|
+
<td><strong>Subscriber</strong></td>
|
|
225
|
+
<td>Read-only access to the API.</td>
|
|
226
|
+
</tr>
|
|
227
|
+
</tbody>
|
|
228
|
+
</table>
|
|
229
|
+
|
|
230
|
+
<h3>Authentication</h3>
|
|
231
|
+
<p>The admin panel uses JWT Bearer tokens. Tokens are stored in the browser and automatically refreshed.
|
|
232
|
+
Sessions expire according to <code>config/auth.json</code> — default is 24 hours.</p>
|
|
233
|
+
</div>
|
|
234
|
+
</div>
|
|
235
|
+
|
|
236
|
+
</div>
|
|
237
|
+
</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<div class="view-header">
|
|
2
|
+
<h1><span data-icon="layout"></span> Layout Presets</h1>
|
|
3
|
+
<button id="save-layouts-btn" class="btn btn-primary"><span data-icon="save"></span> Save</button>
|
|
4
|
+
</div>
|
|
5
|
+
|
|
6
|
+
<p class="text-muted mb-4">
|
|
7
|
+
Layout presets define which structural elements appear on pages using that layout.
|
|
8
|
+
Assign a layout to each page via the page editor.
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<div id="presets-grid" class="presets-grid"></div>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<div class="login-wrap">
|
|
2
|
+
<div class="login-card card">
|
|
3
|
+
<div class="card-body">
|
|
4
|
+
<div class="login-logo">
|
|
5
|
+
<span data-icon="layout"></span>
|
|
6
|
+
<h1>Domma CMS</h1>
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<!-- ── Step 1: Setup (first-time — no users exist) ── -->
|
|
10
|
+
<div id="setup-panel" style="display:none">
|
|
11
|
+
<h2 class="login-heading">Welcome — create your admin account</h2>
|
|
12
|
+
<p class="text-muted mb-4">This is a first-time setup. Set up your administrator account to get started.</p>
|
|
13
|
+
<div id="setup-form-container"></div>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<!-- ── Step 2: Onboarding — Site Identity ── -->
|
|
17
|
+
<div id="onboarding-site-panel" style="display:none">
|
|
18
|
+
<h2 class="login-heading">Name your site</h2>
|
|
19
|
+
<p class="text-muted mb-4">You can change these any time from Settings.</p>
|
|
20
|
+
<div class="form-group mb-3">
|
|
21
|
+
<label class="form-label" for="ob-title">Site title</label>
|
|
22
|
+
<input type="text" id="ob-title" class="form-control" placeholder="My Blog">
|
|
23
|
+
</div>
|
|
24
|
+
<div class="form-group mb-4">
|
|
25
|
+
<label class="form-label" for="ob-tagline">Tagline <span class="text-muted">(optional)</span></label>
|
|
26
|
+
<input type="text" id="ob-tagline" class="form-control" placeholder="A short description of your site">
|
|
27
|
+
</div>
|
|
28
|
+
<div id="ob-site-error" class="alert alert-danger mb-3" style="display:none"></div>
|
|
29
|
+
<button id="ob-site-btn" class="btn btn-primary btn-block">Continue</button>
|
|
30
|
+
<a href="#" id="ob-site-skip" class="btn-skip">Skip this step</a>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<!-- ── Step 3: Onboarding — Theme Picker ── -->
|
|
34
|
+
<div id="onboarding-theme-panel" style="display:none">
|
|
35
|
+
<h2 class="login-heading">Choose a theme</h2>
|
|
36
|
+
<p class="text-muted mb-3">Pick the colour scheme for your site. You can change it later.</p>
|
|
37
|
+
<div class="theme-grid" id="theme-grid"></div>
|
|
38
|
+
<div id="ob-theme-error" class="alert alert-danger mb-3" style="display:none"></div>
|
|
39
|
+
<button id="ob-theme-btn" class="btn btn-primary btn-block mt-3">Apply theme</button>
|
|
40
|
+
<a href="#" id="ob-theme-skip" class="btn-skip">Skip this step</a>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<!-- ── Step 4: Onboarding — Done ── -->
|
|
44
|
+
<div id="onboarding-done-panel" style="display:none">
|
|
45
|
+
<div class="ob-done-icon"><span data-icon="check-circle"></span></div>
|
|
46
|
+
<h2 class="login-heading">You're all set!</h2>
|
|
47
|
+
<p class="text-muted mb-4">Your site is ready. Head to the dashboard to start creating content.</p>
|
|
48
|
+
<a href="#/" id="ob-go-btn" class="btn btn-primary btn-block">Go to dashboard</a>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<!-- ── Login mode ── -->
|
|
52
|
+
<div id="login-panel" style="display:none">
|
|
53
|
+
<h2 class="login-heading">Sign in</h2>
|
|
54
|
+
<div id="login-form-container"></div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<div class="view-header">
|
|
2
|
+
<h1><span data-icon="image"></span> Media</h1>
|
|
3
|
+
<div class="view-header-actions">
|
|
4
|
+
<input id="file-input" type="file" multiple accept="image/*,video/*,.pdf,.svg" style="display:none">
|
|
5
|
+
<button id="upload-btn" class="btn btn-primary"><span data-icon="upload"></span> Upload</button>
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<p class="text-muted mb-4">
|
|
10
|
+
Uploaded files are stored in <code>content/media/</code>.
|
|
11
|
+
Use the copy button to get a URL you can embed in your pages.
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
<div id="media-grid" class="media-grid">
|
|
15
|
+
<p class="text-muted">Loading…</p>
|
|
16
|
+
</div>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<div class="view-header">
|
|
2
|
+
<h1><span data-icon="menu"></span> Navigation</h1>
|
|
3
|
+
<button id="save-nav-btn" class="btn btn-primary"><span data-icon="save"></span> Save</button>
|
|
4
|
+
</div>
|
|
5
|
+
|
|
6
|
+
<div class="card card-collapsible mb-4">
|
|
7
|
+
<div class="card-header" role="button" tabindex="0">
|
|
8
|
+
<div class="card-header-content"><h2>Brand</h2></div>
|
|
9
|
+
<span class="card-collapse-icon" data-icon="chevron-down"></span>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="card-body">
|
|
12
|
+
<div class="row">
|
|
13
|
+
<div class="col-5">
|
|
14
|
+
<label class="form-label">Site Name</label>
|
|
15
|
+
<input id="field-brand-text" type="text" class="form-input" placeholder="My Site">
|
|
16
|
+
</div>
|
|
17
|
+
<div class="col-4">
|
|
18
|
+
<label class="form-label">Brand URL</label>
|
|
19
|
+
<input id="field-brand-url" type="text" class="form-input" value="/">
|
|
20
|
+
</div>
|
|
21
|
+
<div class="col-3">
|
|
22
|
+
<label class="form-label">Variant</label>
|
|
23
|
+
<select id="field-nav-variant" class="form-select">
|
|
24
|
+
<option value="dark">Dark</option>
|
|
25
|
+
<option value="light">Light</option>
|
|
26
|
+
<option value="transparent">Transparent</option>
|
|
27
|
+
</select>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<div class="card card-collapsible">
|
|
34
|
+
<div class="card-header" role="button" tabindex="0">
|
|
35
|
+
<div class="card-header-content"><h2>Menu Items</h2></div>
|
|
36
|
+
<button id="add-nav-item" class="btn btn-sm btn-outline"><span data-icon="plus"></span> Add Item</button>
|
|
37
|
+
<span class="card-collapse-icon" data-icon="chevron-down"></span>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="card-body p-0">
|
|
40
|
+
<div class="nav-items-header">
|
|
41
|
+
<span class="nav-col-indent"></span>
|
|
42
|
+
<span class="nav-col-main text-muted"><small>Label</small></span>
|
|
43
|
+
<span class="nav-col-main text-muted"><small>URL</small></span>
|
|
44
|
+
<span class="nav-col-icon text-muted"><small>Icon</small></span>
|
|
45
|
+
<span class="nav-col-parent text-muted"><small>Parent</small></span>
|
|
46
|
+
<span class="nav-col-action"></span>
|
|
47
|
+
</div>
|
|
48
|
+
<div id="nav-items-list"></div>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
<div class="view-header">
|
|
2
|
+
<h1 id="editor-title"><span data-icon="edit"></span> Page Editor</h1>
|
|
3
|
+
<div class="view-header-actions">
|
|
4
|
+
<button id="cancel-btn" class="btn btn-ghost">Cancel</button>
|
|
5
|
+
<button id="save-btn" class="btn btn-primary"><span data-icon="save"></span> Save</button>
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<!-- URL path (only editable when creating) -->
|
|
10
|
+
<div class="card mb-3">
|
|
11
|
+
<div class="card-body">
|
|
12
|
+
<div class="row">
|
|
13
|
+
<div class="col">
|
|
14
|
+
<label class="form-label">URL Path</label>
|
|
15
|
+
<input id="page-url-path" type="text" class="form-input" placeholder="/about or /services/web-dev">
|
|
16
|
+
<small class="form-hint">The URL where this page will live. Changing this will update any navigation links pointing to the old URL.</small>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<!-- Frontmatter fields -->
|
|
23
|
+
<div class="card card-collapsible mb-3">
|
|
24
|
+
<div class="card-header" role="button" tabindex="0">
|
|
25
|
+
<div class="card-header-content"><h2>Page Details</h2></div>
|
|
26
|
+
<span class="card-collapse-icon" data-icon="chevron-down"></span>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="card-body">
|
|
29
|
+
<div class="row mb-3">
|
|
30
|
+
<div class="col-6">
|
|
31
|
+
<label class="form-label">Title *</label>
|
|
32
|
+
<input id="field-title" type="text" class="form-input" placeholder="Page title">
|
|
33
|
+
</div>
|
|
34
|
+
<div class="col-3">
|
|
35
|
+
<label class="form-label">Layout</label>
|
|
36
|
+
<select id="field-layout" class="form-select"></select>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="col-3">
|
|
39
|
+
<label class="form-label">Status</label>
|
|
40
|
+
<select id="field-status" class="form-select">
|
|
41
|
+
<option value="draft">Draft</option>
|
|
42
|
+
<option value="published">Published</option>
|
|
43
|
+
</select>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="row mb-3">
|
|
47
|
+
<div class="col-8">
|
|
48
|
+
<label class="form-label">Description</label>
|
|
49
|
+
<input id="field-description" type="text" class="form-input" placeholder="Short description">
|
|
50
|
+
</div>
|
|
51
|
+
<div class="col-4">
|
|
52
|
+
<label class="form-label">Sort Order</label>
|
|
53
|
+
<input id="field-sort-order" type="number" class="form-input" value="99" min="0">
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
<div class="row mb-3">
|
|
57
|
+
<div class="col-6">
|
|
58
|
+
<label class="form-label">Category</label>
|
|
59
|
+
<input id="field-category" type="text" class="form-input" placeholder="e.g. news, docs, products">
|
|
60
|
+
</div>
|
|
61
|
+
<div class="col-6">
|
|
62
|
+
<label class="form-label">Visibility</label>
|
|
63
|
+
<select id="field-visibility" class="form-select">
|
|
64
|
+
<option value="public">Public — everyone</option>
|
|
65
|
+
<option value="subscriber">Subscribers & above</option>
|
|
66
|
+
<option value="editor">Editors & above</option>
|
|
67
|
+
<option value="manager">Managers & above</option>
|
|
68
|
+
<option value="admin">Admins only</option>
|
|
69
|
+
</select>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
<div class="row">
|
|
73
|
+
<div class="col-auto">
|
|
74
|
+
<label class="form-check-label">
|
|
75
|
+
<input id="field-show-in-nav" type="checkbox" class="form-check"> Show in Navigation
|
|
76
|
+
</label>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="col-auto">
|
|
79
|
+
<label class="form-check-label">
|
|
80
|
+
<input id="field-sidebar" type="checkbox" class="form-check"> Show Sidebar
|
|
81
|
+
</label>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<!-- SEO fields -->
|
|
88
|
+
<div class="card card-collapsible mb-3">
|
|
89
|
+
<div class="card-header" role="button" tabindex="0">
|
|
90
|
+
<div class="card-header-content"><h2>SEO</h2></div>
|
|
91
|
+
<span class="card-collapse-icon" data-icon="chevron-down"></span>
|
|
92
|
+
</div>
|
|
93
|
+
<div class="card-body">
|
|
94
|
+
<div class="row mb-3">
|
|
95
|
+
<div class="col">
|
|
96
|
+
<label class="form-label">SEO Title</label>
|
|
97
|
+
<input id="field-seo-title" type="text" class="form-input" placeholder="Overrides default title">
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
<div class="row">
|
|
101
|
+
<div class="col">
|
|
102
|
+
<label class="form-label">SEO Description</label>
|
|
103
|
+
<input id="field-seo-desc" type="text" class="form-input" placeholder="Overrides default description">
|
|
104
|
+
</div>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
<!-- Markdown editor + preview -->
|
|
110
|
+
<div class="card editor-card">
|
|
111
|
+
<div class="card-body p-0">
|
|
112
|
+
<div class="editor-toolbar" id="editor-toolbar"></div>
|
|
113
|
+
<div class="editor-body" id="editor-body">
|
|
114
|
+
<div class="editor-pane editor-pane--write">
|
|
115
|
+
<textarea id="markdown-editor" class="editor-textarea"
|
|
116
|
+
placeholder="Write your page content in Markdown..."></textarea>
|
|
117
|
+
</div>
|
|
118
|
+
<div class="editor-divider"></div>
|
|
119
|
+
<div class="editor-pane editor-pane--preview">
|
|
120
|
+
<div id="markdown-preview" class="editor-preview"></div>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
|
|
126
|
+
<div id="media-picker-modal"></div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<div class="view-header">
|
|
2
|
+
<h1><span data-icon="file-text"></span> Pages</h1>
|
|
3
|
+
<a href="#/pages/new" class="btn btn-primary"><span data-icon="plus"></span> New Page</a>
|
|
4
|
+
</div>
|
|
5
|
+
|
|
6
|
+
<div class="toolbar mb-3">
|
|
7
|
+
<select id="status-filter" class="form-select form-select-sm" style="width:auto">
|
|
8
|
+
<option value="">All statuses</option>
|
|
9
|
+
<option value="published">Published</option>
|
|
10
|
+
<option value="draft">Draft</option>
|
|
11
|
+
</select>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<div class="card">
|
|
15
|
+
<div class="card-body">
|
|
16
|
+
<div id="pages-table"></div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<div class="view-header">
|
|
2
|
+
<h1><span data-icon="package"></span> Plugins</h1>
|
|
3
|
+
<p class="text-muted" style="margin:0;font-size:.875rem">Plugins extend the CMS with new features. Changes take effect after a server restart.</p>
|
|
4
|
+
</div>
|
|
5
|
+
|
|
6
|
+
<div id="plugins-empty" class="card" style="display:none">
|
|
7
|
+
<div class="card-body text-muted">
|
|
8
|
+
No plugins found. Drop a plugin folder into the <code>plugins/</code> directory to get started.
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<div id="plugins-grid" class="plugins-grid"></div>
|