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,488 @@
|
|
|
1
|
+
<div class="view-header">
|
|
2
|
+
<h1><span data-icon="sparkles"></span> Domma Effects</h1>
|
|
3
|
+
<div>
|
|
4
|
+
<button id="save-settings-btn" class="btn btn-primary">
|
|
5
|
+
<span data-icon="save"></span> Save
|
|
6
|
+
</button>
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<!-- Settings Card -->
|
|
11
|
+
<div class="card mb-4">
|
|
12
|
+
<div class="card-header"><h2>Settings</h2></div>
|
|
13
|
+
<div class="card-body">
|
|
14
|
+
<div class="row mb-3">
|
|
15
|
+
<div class="col">
|
|
16
|
+
<label class="form-check-label">
|
|
17
|
+
<input id="field-respect-motion" type="checkbox">
|
|
18
|
+
Respect <code>prefers-reduced-motion</code>
|
|
19
|
+
</label>
|
|
20
|
+
<span class="form-hint">When enabled, JS effects are skipped for users who prefer reduced motion. Content remains visible.</span>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="row mb-3">
|
|
24
|
+
<div class="col-6">
|
|
25
|
+
<label class="form-label">Default animation duration (ms)</label>
|
|
26
|
+
<input id="field-default-duration" type="number" class="form-input" min="0" max="10000" placeholder="600">
|
|
27
|
+
<span class="form-hint">Used by reveal when no <code>duration</code> attribute is specified.</span>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="col-6">
|
|
30
|
+
<label class="form-label">Default reveal animation</label>
|
|
31
|
+
<select id="field-default-animation" class="form-select">
|
|
32
|
+
<option value="fade">Fade</option>
|
|
33
|
+
<option value="slide-up">Slide up</option>
|
|
34
|
+
<option value="slide-down">Slide down</option>
|
|
35
|
+
<option value="zoom">Zoom</option>
|
|
36
|
+
<option value="flip">Flip</option>
|
|
37
|
+
</select>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="row">
|
|
41
|
+
<div class="col-6">
|
|
42
|
+
<label class="form-label">Default scroll threshold</label>
|
|
43
|
+
<input id="field-default-threshold" type="number" class="form-input" min="0" max="1" step="0.05"
|
|
44
|
+
placeholder="0.1">
|
|
45
|
+
<span class="form-hint">Fraction of element visible before reveal fires (0.0–1.0).</span>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<!-- Shortcode Reference Card -->
|
|
52
|
+
<div class="card mb-4">
|
|
53
|
+
<div class="card-header"><h2>Shortcode Reference</h2></div>
|
|
54
|
+
<div class="card-body">
|
|
55
|
+
<p class="text-muted mb-3">Use these shortcodes in any page's Markdown content. The <strong>Effects</strong> toolbar
|
|
56
|
+
button in the editor inserts them automatically.</p>
|
|
57
|
+
|
|
58
|
+
<!-- Tabs -->
|
|
59
|
+
<div class="mb-3" style="display:flex;gap:6px;flex-wrap:wrap;">
|
|
60
|
+
<button class="btn btn-sm effects-tab-btn active" data-tab="entrance">Entrance</button>
|
|
61
|
+
<button class="btn btn-sm effects-tab-btn" data-tab="animation">Animation</button>
|
|
62
|
+
<button class="btn btn-sm effects-tab-btn" data-tab="text">Text</button>
|
|
63
|
+
<button class="btn btn-sm effects-tab-btn" data-tab="visual">Visual</button>
|
|
64
|
+
<button class="btn btn-sm effects-tab-btn" data-tab="examples">Examples</button>
|
|
65
|
+
<button class="btn btn-sm effects-tab-btn" data-tab="celebrations">Celebrations</button>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<!-- Entrance tab -->
|
|
69
|
+
<div id="tab-entrance" class="effects-tab-panel">
|
|
70
|
+
<h3 class="mb-2">Reveal</h3>
|
|
71
|
+
<p class="text-muted mb-2">Triggers a scroll-activated entrance animation when the element enters the viewport.
|
|
72
|
+
Great for headers, cards, and feature sections.</p>
|
|
73
|
+
<pre class="code-block mb-2">[reveal animation="fade" duration="600" delay="0" threshold="0.1" once="true"]
|
|
74
|
+
## Your heading or content
|
|
75
|
+
|
|
76
|
+
Markdown **works** inside.
|
|
77
|
+
[/reveal]</pre>
|
|
78
|
+
<table class="table mb-3">
|
|
79
|
+
<thead>
|
|
80
|
+
<tr>
|
|
81
|
+
<th>Attribute</th>
|
|
82
|
+
<th>Default</th>
|
|
83
|
+
<th>Description</th>
|
|
84
|
+
</tr>
|
|
85
|
+
</thead>
|
|
86
|
+
<tbody>
|
|
87
|
+
<tr>
|
|
88
|
+
<td><code>animation</code></td>
|
|
89
|
+
<td>fade</td>
|
|
90
|
+
<td>fade, slide-up, slide-down, zoom, flip</td>
|
|
91
|
+
</tr>
|
|
92
|
+
<tr>
|
|
93
|
+
<td><code>duration</code></td>
|
|
94
|
+
<td>600</td>
|
|
95
|
+
<td>Animation duration in milliseconds</td>
|
|
96
|
+
</tr>
|
|
97
|
+
<tr>
|
|
98
|
+
<td><code>delay</code></td>
|
|
99
|
+
<td>0</td>
|
|
100
|
+
<td>Delay before animation starts (ms)</td>
|
|
101
|
+
</tr>
|
|
102
|
+
<tr>
|
|
103
|
+
<td><code>threshold</code></td>
|
|
104
|
+
<td>0.1</td>
|
|
105
|
+
<td>Fraction visible before triggering (0–1)</td>
|
|
106
|
+
</tr>
|
|
107
|
+
<tr>
|
|
108
|
+
<td><code>once</code></td>
|
|
109
|
+
<td>true</td>
|
|
110
|
+
<td>Only animate once (true/false)</td>
|
|
111
|
+
</tr>
|
|
112
|
+
</tbody>
|
|
113
|
+
</table>
|
|
114
|
+
<p class="text-muted" style="font-size:.85rem;"><strong>Tip:</strong> Use <code>delay</code> to stagger multiple
|
|
115
|
+
reveal blocks for a cascade effect.</p>
|
|
116
|
+
</div>
|
|
117
|
+
|
|
118
|
+
<!-- Animation tab -->
|
|
119
|
+
<div id="tab-animation" class="effects-tab-panel">
|
|
120
|
+
<h3 class="mb-2">Breathe</h3>
|
|
121
|
+
<p class="text-muted mb-2">Continuous gentle scaling — makes elements feel alive. Ideal for hero images or
|
|
122
|
+
call-to-action buttons.</p>
|
|
123
|
+
<pre class="code-block mb-3">[breathe amplitude="8" duration="3000"]
|
|
124
|
+
Content that breathes.
|
|
125
|
+
[/breathe]</pre>
|
|
126
|
+
|
|
127
|
+
<h3 class="mb-2">Pulse</h3>
|
|
128
|
+
<p class="text-muted mb-2">A repeating scale pulse — stronger than breathe, good for alerts or badges.</p>
|
|
129
|
+
<pre class="code-block mb-3">[pulse scale="1.05" duration="1000"]
|
|
130
|
+
Pulsing content.
|
|
131
|
+
[/pulse]</pre>
|
|
132
|
+
|
|
133
|
+
<h3 class="mb-2">Shake</h3>
|
|
134
|
+
<p class="text-muted mb-2">One-shot horizontal or vertical shake. Use for error states or attention-grabbing
|
|
135
|
+
elements.</p>
|
|
136
|
+
<pre class="code-block mb-3">[shake intensity="5" duration="500" direction="horizontal"]
|
|
137
|
+
This will shake.
|
|
138
|
+
[/shake]</pre>
|
|
139
|
+
|
|
140
|
+
<h3 class="mb-2">CSS Animate</h3>
|
|
141
|
+
<p class="text-muted mb-2">Applies Domma CSS animation utility classes — no JavaScript required. Works without the
|
|
142
|
+
plugin enabled.</p>
|
|
143
|
+
<pre class="code-block mb-2">[animate type="fade-in-up" duration="normal" delay="200" repeat="once"]
|
|
144
|
+
Content here.
|
|
145
|
+
[/animate]</pre>
|
|
146
|
+
<table class="table mb-3">
|
|
147
|
+
<thead>
|
|
148
|
+
<tr>
|
|
149
|
+
<th>Attribute</th>
|
|
150
|
+
<th>Values</th>
|
|
151
|
+
</tr>
|
|
152
|
+
</thead>
|
|
153
|
+
<tbody>
|
|
154
|
+
<tr>
|
|
155
|
+
<td><code>type</code></td>
|
|
156
|
+
<td>fade-in, fade-out, fade-in-up, fade-in-down, fade-in-left, fade-in-right, slide-in-up, slide-in-down,
|
|
157
|
+
slide-in-left, slide-in-right, zoom-in, zoom-out, bounce, pulse, shake, spin, rotate-in, flip
|
|
158
|
+
</td>
|
|
159
|
+
</tr>
|
|
160
|
+
<tr>
|
|
161
|
+
<td><code>duration</code></td>
|
|
162
|
+
<td>fast, normal, slow, slower</td>
|
|
163
|
+
</tr>
|
|
164
|
+
<tr>
|
|
165
|
+
<td><code>delay</code></td>
|
|
166
|
+
<td>100, 200, 300, 500, 1000</td>
|
|
167
|
+
</tr>
|
|
168
|
+
<tr>
|
|
169
|
+
<td><code>repeat</code></td>
|
|
170
|
+
<td>once, infinite, repeat-2, repeat-3</td>
|
|
171
|
+
</tr>
|
|
172
|
+
</tbody>
|
|
173
|
+
</table>
|
|
174
|
+
</div>
|
|
175
|
+
|
|
176
|
+
<!-- Text tab -->
|
|
177
|
+
<div id="tab-text" class="effects-tab-panel">
|
|
178
|
+
<h3 class="mb-2">Typewriter (Scribe)</h3>
|
|
179
|
+
<p class="text-muted mb-2">Types text character by character. Perfect for hero taglines or code
|
|
180
|
+
demonstrations.</p>
|
|
181
|
+
<pre class="code-block mb-3">[scribe speed="50" cursor="true" loop="false"]
|
|
182
|
+
Your text appears letter by letter.
|
|
183
|
+
[/scribe]</pre>
|
|
184
|
+
|
|
185
|
+
<h3 class="mb-2">Scramble</h3>
|
|
186
|
+
<p class="text-muted mb-2">Reveals text through a character-scramble animation. Great for tech/data
|
|
187
|
+
aesthetics.</p>
|
|
188
|
+
<pre class="code-block mb-3">[scramble speed="50" loop="false"]
|
|
189
|
+
Scrambled reveal text.
|
|
190
|
+
[/scramble]</pre>
|
|
191
|
+
|
|
192
|
+
<h3 class="mb-2">Counter</h3>
|
|
193
|
+
<p class="text-muted mb-2">Animates a number from <code>from</code> to <code>to</code>. Use in stat sections. This
|
|
194
|
+
shortcode is self-closing.</p>
|
|
195
|
+
<pre class="code-block mb-2">[counter to="100" from="0" prefix="$" suffix="+" duration="2000" /]</pre>
|
|
196
|
+
<table class="table mb-3">
|
|
197
|
+
<thead>
|
|
198
|
+
<tr>
|
|
199
|
+
<th>Attribute</th>
|
|
200
|
+
<th>Default</th>
|
|
201
|
+
<th>Description</th>
|
|
202
|
+
</tr>
|
|
203
|
+
</thead>
|
|
204
|
+
<tbody>
|
|
205
|
+
<tr>
|
|
206
|
+
<td><code>to</code></td>
|
|
207
|
+
<td>0</td>
|
|
208
|
+
<td>Target number</td>
|
|
209
|
+
</tr>
|
|
210
|
+
<tr>
|
|
211
|
+
<td><code>from</code></td>
|
|
212
|
+
<td>0</td>
|
|
213
|
+
<td>Starting number</td>
|
|
214
|
+
</tr>
|
|
215
|
+
<tr>
|
|
216
|
+
<td><code>duration</code></td>
|
|
217
|
+
<td>2000</td>
|
|
218
|
+
<td>Animation duration (ms)</td>
|
|
219
|
+
</tr>
|
|
220
|
+
<tr>
|
|
221
|
+
<td><code>prefix</code></td>
|
|
222
|
+
<td>—</td>
|
|
223
|
+
<td>Text before the number (e.g. $)</td>
|
|
224
|
+
</tr>
|
|
225
|
+
<tr>
|
|
226
|
+
<td><code>suffix</code></td>
|
|
227
|
+
<td>—</td>
|
|
228
|
+
<td>Text after the number (e.g. +)</td>
|
|
229
|
+
</tr>
|
|
230
|
+
<tr>
|
|
231
|
+
<td><code>decimals</code></td>
|
|
232
|
+
<td>0</td>
|
|
233
|
+
<td>Decimal places to display</td>
|
|
234
|
+
</tr>
|
|
235
|
+
<tr>
|
|
236
|
+
<td><code>separator</code></td>
|
|
237
|
+
<td>—</td>
|
|
238
|
+
<td>Thousands separator (e.g. ,)</td>
|
|
239
|
+
</tr>
|
|
240
|
+
</tbody>
|
|
241
|
+
</table>
|
|
242
|
+
<p class="text-muted" style="font-size:.85rem;"><strong>Tip:</strong> Counters work great in a grid — place 3–4
|
|
243
|
+
counter spans in a <code>[grid cols="4"]</code> for a stats section.</p>
|
|
244
|
+
</div>
|
|
245
|
+
|
|
246
|
+
<!-- Visual tab -->
|
|
247
|
+
<div id="tab-visual" class="effects-tab-panel">
|
|
248
|
+
<h3 class="mb-2">Ripple</h3>
|
|
249
|
+
<p class="text-muted mb-2">Click-triggered ripple effect on the element. Good for interactive content blocks.</p>
|
|
250
|
+
<pre class="code-block mb-3">[ripple colour="#7c6af7" duration="600" opacity="0.3"]
|
|
251
|
+
Click this area for a ripple.
|
|
252
|
+
[/ripple]</pre>
|
|
253
|
+
|
|
254
|
+
<h3 class="mb-2">Twinkle</h3>
|
|
255
|
+
<p class="text-muted mb-2">Generates animated particle effects inside the element. Use for hero sections or
|
|
256
|
+
decorative areas.</p>
|
|
257
|
+
<pre class="code-block mb-3">[twinkle count="80" shape="star" colour="#fff" min-size="2" max-size="6"]
|
|
258
|
+
Content beneath the particles.
|
|
259
|
+
[/twinkle]</pre>
|
|
260
|
+
|
|
261
|
+
<h3 class="mb-2">Ambient Background</h3>
|
|
262
|
+
<p class="text-muted mb-2">Applies animated CSS background classes — no JavaScript needed. Works without the
|
|
263
|
+
plugin.</p>
|
|
264
|
+
<pre class="code-block mb-2">[ambient type="float-blobs" speed="slow" intensity="subtle"]
|
|
265
|
+
Content on animated background.
|
|
266
|
+
[/ambient]</pre>
|
|
267
|
+
<table class="table mb-3">
|
|
268
|
+
<thead>
|
|
269
|
+
<tr>
|
|
270
|
+
<th>Attribute</th>
|
|
271
|
+
<th>Values</th>
|
|
272
|
+
</tr>
|
|
273
|
+
</thead>
|
|
274
|
+
<tbody>
|
|
275
|
+
<tr>
|
|
276
|
+
<td><code>type</code></td>
|
|
277
|
+
<td>rotate-glow, rotate-dual, rotate-spotlight, float-blobs, float-orbs, float-particles, wave, ripple,
|
|
278
|
+
aurora
|
|
279
|
+
</td>
|
|
280
|
+
</tr>
|
|
281
|
+
<tr>
|
|
282
|
+
<td><code>speed</code></td>
|
|
283
|
+
<td>slow, normal, fast</td>
|
|
284
|
+
</tr>
|
|
285
|
+
<tr>
|
|
286
|
+
<td><code>intensity</code></td>
|
|
287
|
+
<td>subtle, intense</td>
|
|
288
|
+
</tr>
|
|
289
|
+
</tbody>
|
|
290
|
+
</table>
|
|
291
|
+
</div>
|
|
292
|
+
|
|
293
|
+
<!-- Examples tab -->
|
|
294
|
+
<div id="tab-examples" class="effects-tab-panel">
|
|
295
|
+
<h3 class="mb-2">Hero section with typewriter</h3>
|
|
296
|
+
<pre class="code-block mb-3">[reveal animation="fade"]
|
|
297
|
+
# Welcome to our site
|
|
298
|
+
|
|
299
|
+
[scribe speed="40" cursor="true"]
|
|
300
|
+
We build things that matter.
|
|
301
|
+
[/scribe]
|
|
302
|
+
[/reveal]</pre>
|
|
303
|
+
|
|
304
|
+
<h3 class="mb-2">Stats row with counters</h3>
|
|
305
|
+
<pre class="code-block mb-3">[reveal animation="slide-up"]
|
|
306
|
+
[grid cols="3" gap="4"]
|
|
307
|
+
[col]
|
|
308
|
+
## [counter to="500" suffix="+" /]
|
|
309
|
+
Happy clients
|
|
310
|
+
[/col]
|
|
311
|
+
[col]
|
|
312
|
+
## [counter to="12" suffix=" years" /]
|
|
313
|
+
In business
|
|
314
|
+
[/col]
|
|
315
|
+
[col]
|
|
316
|
+
## [counter to="98" suffix="%" /]
|
|
317
|
+
Satisfaction
|
|
318
|
+
[/col]
|
|
319
|
+
[/grid]
|
|
320
|
+
[/reveal]</pre>
|
|
321
|
+
|
|
322
|
+
<h3 class="mb-2">Staggered card reveal</h3>
|
|
323
|
+
<pre class="code-block mb-3">[reveal animation="fade-in-up" delay="0"]
|
|
324
|
+
[card title="Feature One"]First card content.[/card]
|
|
325
|
+
[/reveal]
|
|
326
|
+
|
|
327
|
+
[reveal animation="fade-in-up" delay="150"]
|
|
328
|
+
[card title="Feature Two"]Second card content.[/card]
|
|
329
|
+
[/reveal]
|
|
330
|
+
|
|
331
|
+
[reveal animation="fade-in-up" delay="300"]
|
|
332
|
+
[card title="Feature Three"]Third card content.[/card]
|
|
333
|
+
[/reveal]</pre>
|
|
334
|
+
|
|
335
|
+
<h3 class="mb-2">Hero with ambient background</h3>
|
|
336
|
+
<pre class="code-block mb-3">[ambient type="aurora" speed="slow" intensity="subtle"]
|
|
337
|
+
[reveal animation="zoom"]
|
|
338
|
+
# Your headline here
|
|
339
|
+
|
|
340
|
+
A compelling subheading that draws users in.
|
|
341
|
+
[/reveal]
|
|
342
|
+
[/ambient]</pre>
|
|
343
|
+
|
|
344
|
+
<h3 class="mb-2">Christmas page with fireworks</h3>
|
|
345
|
+
<pre class="code-block mb-3">[celebrate theme="christmas" intensity="medium" /]
|
|
346
|
+
|
|
347
|
+
[fireworks]
|
|
348
|
+
[firework type="burst" colour="rainbow" /]
|
|
349
|
+
[firework type="sparkle" colour="primary" /]
|
|
350
|
+
[/fireworks]
|
|
351
|
+
|
|
352
|
+
[reveal animation="fade"]
|
|
353
|
+
# Merry Christmas!
|
|
354
|
+
[/reveal]</pre>
|
|
355
|
+
</div>
|
|
356
|
+
|
|
357
|
+
<!-- Celebrations tab -->
|
|
358
|
+
<div id="tab-celebrations" class="effects-tab-panel">
|
|
359
|
+
<h3 class="mb-2">Firework <span class="badge badge-info">CSS only</span></h3>
|
|
360
|
+
<p class="text-muted mb-2">Pure CSS particle effect — no JavaScript required. Works even without the plugin
|
|
361
|
+
enabled. Use self-closing for standalone particles, or wrapping to apply the firework classes to content.</p>
|
|
362
|
+
<pre class="code-block mb-2">[firework type="burst" colour="rainbow" size="lg" continuous="true" /]</pre>
|
|
363
|
+
<pre class="code-block mb-2">[firework type="sparkle" colour="primary"]
|
|
364
|
+
Click me for a burst!
|
|
365
|
+
[/firework]</pre>
|
|
366
|
+
<table class="table mb-3">
|
|
367
|
+
<thead>
|
|
368
|
+
<tr>
|
|
369
|
+
<th>Attribute</th>
|
|
370
|
+
<th>Values</th>
|
|
371
|
+
<th>Description</th>
|
|
372
|
+
</tr>
|
|
373
|
+
</thead>
|
|
374
|
+
<tbody>
|
|
375
|
+
<tr>
|
|
376
|
+
<td><code>type</code></td>
|
|
377
|
+
<td>burst, sparkle, trail</td>
|
|
378
|
+
<td>Firework particle shape</td>
|
|
379
|
+
</tr>
|
|
380
|
+
<tr>
|
|
381
|
+
<td><code>colour</code></td>
|
|
382
|
+
<td>rainbow, primary, info, success, warning, danger</td>
|
|
383
|
+
<td>Particle colour theme</td>
|
|
384
|
+
</tr>
|
|
385
|
+
<tr>
|
|
386
|
+
<td><code>size</code></td>
|
|
387
|
+
<td>sm, md, lg</td>
|
|
388
|
+
<td>Particle size (default: md)</td>
|
|
389
|
+
</tr>
|
|
390
|
+
<tr>
|
|
391
|
+
<td><code>continuous</code></td>
|
|
392
|
+
<td>true / false</td>
|
|
393
|
+
<td>Loop the animation continuously</td>
|
|
394
|
+
</tr>
|
|
395
|
+
<tr>
|
|
396
|
+
<td><code>hover</code></td>
|
|
397
|
+
<td>true / false</td>
|
|
398
|
+
<td>Only animate on mouse hover</td>
|
|
399
|
+
</tr>
|
|
400
|
+
</tbody>
|
|
401
|
+
</table>
|
|
402
|
+
|
|
403
|
+
<h3 class="mb-2">Fireworks Container <span class="badge badge-info">CSS only</span></h3>
|
|
404
|
+
<p class="text-muted mb-2">Groups multiple firework elements into a positioned overlay container.</p>
|
|
405
|
+
<pre class="code-block mb-3">[fireworks]
|
|
406
|
+
[firework type="burst" colour="rainbow" /]
|
|
407
|
+
[firework type="sparkle" colour="primary" /]
|
|
408
|
+
[firework type="trail" colour="warning" /]
|
|
409
|
+
[/fireworks]</pre>
|
|
410
|
+
|
|
411
|
+
<h3 class="mb-2">Celebrate <span class="badge badge-warning">Requires plugin JS</span></h3>
|
|
412
|
+
<p class="text-muted mb-2">Canvas-based seasonal particle system. Auto-detects the active celebration based on
|
|
413
|
+
today's date, or specify a theme manually. Skipped automatically when
|
|
414
|
+
<code>prefers-reduced-motion</code> is active.</p>
|
|
415
|
+
<pre class="code-block mb-2">[celebrate theme="auto" intensity="medium" /]</pre>
|
|
416
|
+
<pre class="code-block mb-2">[celebrate theme="christmas" intensity="heavy" /]</pre>
|
|
417
|
+
<table class="table mb-3">
|
|
418
|
+
<thead>
|
|
419
|
+
<tr>
|
|
420
|
+
<th>Theme</th>
|
|
421
|
+
<th>Active dates</th>
|
|
422
|
+
</tr>
|
|
423
|
+
</thead>
|
|
424
|
+
<tbody>
|
|
425
|
+
<tr>
|
|
426
|
+
<td><code>auto</code></td>
|
|
427
|
+
<td>Detects automatically from the table below</td>
|
|
428
|
+
</tr>
|
|
429
|
+
<tr>
|
|
430
|
+
<td><code>christmas</code></td>
|
|
431
|
+
<td>1 Dec – 1 Jan (snowflakes)</td>
|
|
432
|
+
</tr>
|
|
433
|
+
<tr>
|
|
434
|
+
<td><code>halloween</code></td>
|
|
435
|
+
<td>26 Oct – 31 Oct (bats & pumpkins)</td>
|
|
436
|
+
</tr>
|
|
437
|
+
<tr>
|
|
438
|
+
<td><code>valentines</code></td>
|
|
439
|
+
<td>9 Feb – 14 Feb (hearts)</td>
|
|
440
|
+
</tr>
|
|
441
|
+
<tr>
|
|
442
|
+
<td><code>guy-fawkes</code></td>
|
|
443
|
+
<td>1 Nov – 5 Nov (fireworks)</td>
|
|
444
|
+
</tr>
|
|
445
|
+
<tr>
|
|
446
|
+
<td><code>st-patricks</code></td>
|
|
447
|
+
<td>12 Mar – 17 Mar (shamrocks)</td>
|
|
448
|
+
</tr>
|
|
449
|
+
<tr>
|
|
450
|
+
<td><code>st-davids</code></td>
|
|
451
|
+
<td>24 Feb – 1 Mar (daffodils)</td>
|
|
452
|
+
</tr>
|
|
453
|
+
<tr>
|
|
454
|
+
<td><code>st-georges</code></td>
|
|
455
|
+
<td>18 Apr – 23 Apr (roses)</td>
|
|
456
|
+
</tr>
|
|
457
|
+
<tr>
|
|
458
|
+
<td><code>st-andrews</code></td>
|
|
459
|
+
<td>25 Nov – 30 Nov (thistles)</td>
|
|
460
|
+
</tr>
|
|
461
|
+
</tbody>
|
|
462
|
+
</table>
|
|
463
|
+
<table class="table mb-3">
|
|
464
|
+
<thead>
|
|
465
|
+
<tr>
|
|
466
|
+
<th>Attribute</th>
|
|
467
|
+
<th>Values</th>
|
|
468
|
+
<th>Description</th>
|
|
469
|
+
</tr>
|
|
470
|
+
</thead>
|
|
471
|
+
<tbody>
|
|
472
|
+
<tr>
|
|
473
|
+
<td><code>theme</code></td>
|
|
474
|
+
<td>auto, christmas, halloween, valentines, guy-fawkes, st-patricks, st-davids, st-georges, st-andrews</td>
|
|
475
|
+
<td>Theme to use (default: auto)</td>
|
|
476
|
+
</tr>
|
|
477
|
+
<tr>
|
|
478
|
+
<td><code>intensity</code></td>
|
|
479
|
+
<td>light, medium, heavy</td>
|
|
480
|
+
<td>Particle density (default: medium)</td>
|
|
481
|
+
</tr>
|
|
482
|
+
</tbody>
|
|
483
|
+
</table>
|
|
484
|
+
<p class="text-muted"><strong>Tip:</strong> CSS fireworks (<code>[firework]</code>) render instantly with no JS.
|
|
485
|
+
Canvas celebrations (<code>[celebrate]</code>) load the JS module on demand and degrade silently if unavailable.</p>
|
|
486
|
+
</div>
|
|
487
|
+
</div>
|
|
488
|
+
</div>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Domma Effects Plugin — Admin View
|
|
3
|
+
* Settings + full shortcode reference.
|
|
4
|
+
*/
|
|
5
|
+
import {apiRequest} from '/admin/js/api.js';
|
|
6
|
+
|
|
7
|
+
export const dommaEffectsView = {
|
|
8
|
+
templateUrl: '/plugins/domma-effects/admin/templates/domma-effects.html',
|
|
9
|
+
|
|
10
|
+
async onMount($container) {
|
|
11
|
+
let settings = {};
|
|
12
|
+
try {
|
|
13
|
+
settings = await apiRequest('/plugins/domma-effects/settings');
|
|
14
|
+
} catch {
|
|
15
|
+
E.toast('Could not load settings.', {type: 'error'});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
$container.find('#field-respect-motion').prop('checked', settings.respectMotion !== false);
|
|
19
|
+
$container.find('#field-default-duration').val(settings.defaultDuration ?? 600);
|
|
20
|
+
$container.find('#field-default-animation').val(settings.defaultAnimation || 'fade');
|
|
21
|
+
$container.find('#field-default-threshold').val(settings.defaultThreshold ?? 0.1);
|
|
22
|
+
|
|
23
|
+
$container.find('#save-settings-btn').off('click').on('click', async () => {
|
|
24
|
+
const data = {
|
|
25
|
+
respectMotion: $container.find('#field-respect-motion').prop('checked'),
|
|
26
|
+
defaultDuration: parseInt($container.find('#field-default-duration').val(), 10) || 600,
|
|
27
|
+
defaultAnimation: $container.find('#field-default-animation').val(),
|
|
28
|
+
defaultThreshold: parseFloat($container.find('#field-default-threshold').val()) || 0.1
|
|
29
|
+
};
|
|
30
|
+
try {
|
|
31
|
+
await apiRequest('/plugins/domma-effects/settings', {
|
|
32
|
+
method: 'PUT',
|
|
33
|
+
body: JSON.stringify(data)
|
|
34
|
+
});
|
|
35
|
+
E.toast('Settings saved.', {type: 'success'});
|
|
36
|
+
} catch {
|
|
37
|
+
E.toast('Failed to save settings.', {type: 'error'});
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// Tab switching
|
|
42
|
+
$container.find('.effects-tab-btn').on('click', function () {
|
|
43
|
+
const tab = $(this).data('tab');
|
|
44
|
+
$container.find('.effects-tab-btn').removeClass('active');
|
|
45
|
+
$(this).addClass('active');
|
|
46
|
+
$container.find('.effects-tab-panel').hide();
|
|
47
|
+
$container.find(`#tab-${tab}`).show();
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// Show first tab by default
|
|
51
|
+
$container.find('.effects-tab-panel').hide();
|
|
52
|
+
$container.find('#tab-entrance').show();
|
|
53
|
+
|
|
54
|
+
Domma.icons.scan();
|
|
55
|
+
}
|
|
56
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Domma Effects Plugin — Server
|
|
3
|
+
*
|
|
4
|
+
* Endpoints (prefix: /api/plugins/domma-effects):
|
|
5
|
+
* GET /settings — public (called from public site IIFE)
|
|
6
|
+
* PUT /settings — admin-auth — saves user overrides
|
|
7
|
+
*/
|
|
8
|
+
import {getPluginSettings, savePluginState} from '../../server/services/plugins.js';
|
|
9
|
+
|
|
10
|
+
export default async function dommaEffectsPlugin(fastify, options) {
|
|
11
|
+
const {authenticate, requireAdmin} = options.auth;
|
|
12
|
+
|
|
13
|
+
fastify.get('/settings', async () => {
|
|
14
|
+
return getPluginSettings('domma-effects');
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
fastify.put('/settings', {preHandler: [authenticate, requireAdmin]}, async (request) => {
|
|
18
|
+
const body = request.body || {};
|
|
19
|
+
savePluginState('domma-effects', {settings: body});
|
|
20
|
+
return {ok: true};
|
|
21
|
+
});
|
|
22
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "domma-effects",
|
|
3
|
+
"displayName": "Domma Effects",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Initialises Domma Effects shortcodes on public pages with scroll-triggered reveals, animations, typewriter text, counters, and more.",
|
|
6
|
+
"author": "Darryl Waterhouse",
|
|
7
|
+
"date": "2026-03-03",
|
|
8
|
+
"icon": "sparkles",
|
|
9
|
+
"admin": {
|
|
10
|
+
"sidebar": [
|
|
11
|
+
{
|
|
12
|
+
"id": "domma-effects",
|
|
13
|
+
"text": "Domma Effects",
|
|
14
|
+
"icon": "sparkles",
|
|
15
|
+
"url": "#/plugins/domma-effects",
|
|
16
|
+
"section": "#/plugins/domma-effects"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"routes": [
|
|
20
|
+
{
|
|
21
|
+
"path": "/plugins/domma-effects",
|
|
22
|
+
"view": "plugin-domma-effects",
|
|
23
|
+
"title": "Domma Effects - Domma CMS"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"views": {
|
|
27
|
+
"plugin-domma-effects": {
|
|
28
|
+
"entry": "domma-effects/admin/views/domma-effects.js",
|
|
29
|
+
"exportName": "dommaEffectsView"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"inject": {
|
|
34
|
+
"bodyEnd": "public/inject-body.html"
|
|
35
|
+
}
|
|
36
|
+
}
|