domma-cms 1.21.0 → 1.22.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/CHANGELOG.md +7 -0
- package/admin/css/site-settings.css +1 -0
- package/admin/js/app.js +3 -3
- package/admin/js/lib/context-menu-action-help.js +1 -1
- package/admin/js/lib/effects-builder.js +2 -2
- package/admin/js/lib/favicon-generator.js +1 -1
- package/admin/js/lib/font-picker.js +22 -0
- package/admin/js/lib/scribe-composer.js +1 -1
- package/admin/js/lib/shortcode-form.js +3 -3
- package/admin/js/lib/site-search-section.js +1 -1
- package/admin/js/lib/site-settings-arrange.js +3 -3
- package/admin/js/templates/appearance.html +243 -0
- package/admin/js/templates/docs/usage-site-settings.html +11 -22
- package/admin/js/templates/footer.html +145 -0
- package/admin/js/templates/search.html +14 -15
- package/admin/js/templates/settings.html +5 -436
- package/admin/js/views/appearance.js +1 -0
- package/admin/js/views/footer.js +1 -0
- package/admin/js/views/index.js +1 -1
- package/admin/js/views/page-editor.js +10 -10
- package/admin/js/views/search.js +2 -2
- package/admin/js/views/settings.js +3 -3
- package/admin/js/views/theme.js +4 -4
- package/docs/screenshots/font-picker-desktop.png +0 -0
- package/docs/screenshots/font-picker-mobile.png +0 -0
- package/package.json +1 -1
- package/server/server.js +5 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!--
|
|
1
|
+
<!-- Appearance > Search. Bound with M.applyBindings - see admin/js/views/search.js, which also inserts the
|
|
2
2
|
preview row template (the router renders a templateUrl through _.render, eating any {{…}}).
|
|
3
3
|
No page heading: the Tool banner above is the heading; Save and View site are banner actions. -->
|
|
4
4
|
<div class="ssx">
|
|
@@ -16,16 +16,9 @@
|
|
|
16
16
|
<span data-icon="alert-triangle" data-icon-size="16"></span>
|
|
17
17
|
<span data-bind-text="clampText.value"></span></p>
|
|
18
18
|
|
|
19
|
-
<div class="
|
|
20
|
-
<div class="tab-list">
|
|
21
|
-
<button type="button" class="tab-item active">Search</button>
|
|
22
|
-
<button type="button" class="tab-item">Trigger & position</button>
|
|
23
|
-
<button type="button" class="tab-item">Try it</button>
|
|
24
|
-
<button type="button" class="tab-item">How it works</button>
|
|
25
|
-
</div>
|
|
26
|
-
|
|
19
|
+
<div class="ssx-sections">
|
|
27
20
|
<!-- Search -->
|
|
28
|
-
<div class="
|
|
21
|
+
<div class="ssx-section" role="region" aria-label="Search settings">
|
|
29
22
|
<div class="ssx-card dm-settings-section">
|
|
30
23
|
<div class="ssx-card-title dm-settings-section-title">Live now
|
|
31
24
|
<span data-help-title="Live now" data-help="What visitors get at the moment - the saved settings, not what you are editing. Searchable pages are the published, public ones; drafts and private pages never appear in results."></span></div>
|
|
@@ -72,7 +65,7 @@
|
|
|
72
65
|
</div>
|
|
73
66
|
|
|
74
67
|
<!-- Trigger & position -->
|
|
75
|
-
<div class="
|
|
68
|
+
<div class="ssx-section" role="region" aria-label="Trigger and position">
|
|
76
69
|
<div class="ssx-card dm-settings-section">
|
|
77
70
|
<div class="ssx-card-title dm-settings-section-title">How visitors open it
|
|
78
71
|
<span data-help-title="Trigger" data-help="Navbar adds a search icon to the site's navigation bar. Floating button puts a fixed button on every page, in the corner or side you choose - useful when the navigation is busy or hidden on small screens."></span></div>
|
|
@@ -132,7 +125,7 @@
|
|
|
132
125
|
</div>
|
|
133
126
|
|
|
134
127
|
<!-- Try it -->
|
|
135
|
-
<div class="
|
|
128
|
+
<div class="ssx-section" role="region" aria-label="Try a search">
|
|
136
129
|
<div class="ssx-card dm-settings-section">
|
|
137
130
|
<div class="ssx-card-title dm-settings-section-title">Try a search
|
|
138
131
|
<span data-help-title="Try it" data-help="Runs the site's own search as a visitor would - published, public pages only, ranked the same way - using the Max results you are editing, before you Save. Right-click a result (or ⋮) to open or edit the page."></span></div>
|
|
@@ -145,7 +138,7 @@
|
|
|
145
138
|
</div>
|
|
146
139
|
|
|
147
140
|
<!-- How it works -->
|
|
148
|
-
<div class="
|
|
141
|
+
<div class="ssx-section" role="region" aria-label="How search works">
|
|
149
142
|
<div class="ssx-card dm-settings-section">
|
|
150
143
|
<div class="ssx-card-title dm-settings-section-title">How search works</div>
|
|
151
144
|
<ul class="ssx-how">
|
|
@@ -163,6 +156,12 @@
|
|
|
163
156
|
|
|
164
157
|
<style>
|
|
165
158
|
.ssx, .ssx-body { display: flex; flex-direction: column; gap: .75rem; }
|
|
159
|
+
.ssx-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
|
|
160
|
+
.ssx-section { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
|
|
161
|
+
.ssx-section > .ssx-card { margin-top: 0; min-width: 0; }
|
|
162
|
+
.ssx-grid > * { min-width: 0; }
|
|
163
|
+
.ssx-grid .form-input { min-width: 0; width: 100%; }
|
|
164
|
+
@media (max-width: 1100px) { .ssx-sections { grid-template-columns: minmax(0, 1fr); } }
|
|
166
165
|
.ssx-alert.is-bad { background: color-mix(in srgb, var(--dm-danger) 14%, transparent); color: var(--dm-danger); }
|
|
167
166
|
.ssx [hidden] { display: none !important; }
|
|
168
167
|
.ssx-alert { margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .6rem .8rem; border-radius: var(--dm-radius-md);
|
|
@@ -172,8 +171,8 @@
|
|
|
172
171
|
.ssx-card { border: 1px solid var(--dm-border); border-radius: var(--dm-radius-md); padding: .75rem .9rem; display: flex; flex-direction: column; gap: .7rem; margin-top: .75rem; }
|
|
173
172
|
.ssx-card-title { display: flex; align-items: center; gap: .35rem; font-weight: 600; }
|
|
174
173
|
.ssx-sub { font-size: var(--dm-text-sm); }
|
|
175
|
-
.ssx-grid { display: grid; grid-template-columns:
|
|
176
|
-
.ssx-grid-3 { grid-template-columns:
|
|
174
|
+
.ssx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1rem; }
|
|
175
|
+
.ssx-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
177
176
|
.ssx-wide { grid-column: 1 / -1; }
|
|
178
177
|
.ssx .form-label { display: flex; align-items: center; gap: .3rem; }
|
|
179
178
|
.ssx-setting { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
|
|
@@ -17,15 +17,9 @@
|
|
|
17
17
|
<div class="tab-list">
|
|
18
18
|
<button type="button" class="tab-item active">General <i class="stx-dot" data-bind-hidden="!tabs.value.general" title="Changed"></i></button>
|
|
19
19
|
<button type="button" class="tab-item">Branding <i class="stx-dot" data-bind-hidden="!tabs.value.branding" title="Changed"></i></button>
|
|
20
|
-
<button type="button" class="tab-item">
|
|
21
|
-
<button type="button" class="tab-item">Footer <i class="stx-dot" data-bind-hidden="!tabs.value.footer" title="Changed"></i></button>
|
|
22
|
-
<button type="button" class="tab-item">Email <i class="stx-dot" data-bind-hidden="!tabs.value.email" title="Changed"></i><i class="stx-dot is-bad" data-bind-hidden="!noSmtp.value || tabs.value.email" title="No SMTP host"></i></button>
|
|
23
|
-
<button type="button" class="tab-item">Page navigation <i class="stx-dot" data-bind-hidden="!tabs.value.pageNavigation" title="Changed"></i></button>
|
|
20
|
+
<button type="button" class="tab-item">SMTP <i class="stx-dot" data-bind-hidden="!tabs.value.email" title="Changed"></i><i class="stx-dot is-bad" data-bind-hidden="!noSmtp.value || tabs.value.email" title="No SMTP host"></i></button>
|
|
24
21
|
<button type="button" class="tab-item">Cookie consent <i class="stx-dot" data-bind-hidden="!tabs.value.cookies" title="Changed"></i></button>
|
|
25
|
-
<button type="button" class="tab-item">Breadcrumbs <i class="stx-dot" data-bind-hidden="!tabs.value.breadcrumbs" title="Changed"></i></button>
|
|
26
|
-
<button type="button" class="tab-item">Reduce motion <i class="stx-dot" data-bind-hidden="!tabs.value.motion" title="Changed"></i></button>
|
|
27
22
|
<button type="button" class="tab-item">Cache</button>
|
|
28
|
-
<button type="button" class="tab-item" data-site-search-tab>Search <i class="stx-dot" data-site-search-dirty hidden title="Changed"></i></button>
|
|
29
23
|
</div>
|
|
30
24
|
|
|
31
25
|
<!-- General -->
|
|
@@ -110,7 +104,7 @@
|
|
|
110
104
|
<div data-brand-icon="brandIcon"></div>
|
|
111
105
|
</div>
|
|
112
106
|
|
|
113
|
-
</div><p class="text-muted">The logo takes priority over the icon. Set the browser icon in
|
|
107
|
+
</div><p class="text-muted">The logo takes priority over the icon. Set the browser icon in <a href="#/appearance?tab=favicon">Appearance > Favicon</a>.</p></div>
|
|
114
108
|
<div class="stx-card dm-settings-section"><div class="stx-card-title dm-settings-section-title"><span data-icon="layout" data-icon-size="16" aria-hidden="true"></span>Admin
|
|
115
109
|
<span data-help-title="Admin name and mark" data-help="The name and logo or icon at the top of the admin - in the top bar, the sidebar and the browser tab - for everyone who signs in. Leave the name empty to use the site title."></span></div><div class="stx-grid">
|
|
116
110
|
<div class="stx-setting stx-wide"><label class="form-label" for="stx-admin-brand-enabled">Show admin branding
|
|
@@ -132,162 +126,7 @@
|
|
|
132
126
|
</div>
|
|
133
127
|
</div>
|
|
134
128
|
|
|
135
|
-
<!--
|
|
136
|
-
<div class="tab-panel">
|
|
137
|
-
<div class="stx-card-columns">
|
|
138
|
-
<div class="stx-card dm-settings-section"><div class="stx-card-title dm-settings-section-title"><span data-icon="image" data-icon-size="16" aria-hidden="true"></span>Generate favicon.ico</div>
|
|
139
|
-
<p>Choose or upload an image. Generate a single ICO file with 16, 32, 48 and 256 pixel icons. Images keep their proportions with transparent padding.</p>
|
|
140
|
-
<label class="form-label" for="stx-favicon-source">Source image</label>
|
|
141
|
-
<input id="stx-favicon-source" class="form-input" type="text" placeholder="/media/logo.png" data-model="faviconSource.value">
|
|
142
|
-
<button type="button" class="btn btn-secondary" data-on-click="chooseFaviconSource" data-bind-disabled="faviconGenerating.value">Choose or upload image</button>
|
|
143
|
-
<button type="button" class="btn btn-primary" data-on-click="generateFavicon" data-bind-disabled="faviconGenerating.value || !faviconSource.value">Generate favicon.ico</button>
|
|
144
|
-
<p class="text-danger" data-bind-text="faviconError.value" data-bind-hidden="!faviconError.value"></p>
|
|
145
|
-
<p data-bind-hidden="!faviconGenerated.value">Generated. Save Site Settings to apply it. <a data-bind-href="faviconGenerated.value" download="favicon.ico">Download favicon.ico</a></p>
|
|
146
|
-
</div>
|
|
147
|
-
<div class="stx-card dm-settings-section"><div class="stx-card-title dm-settings-section-title"><span data-icon="image" data-icon-size="16" aria-hidden="true"></span>Browser icon</div>
|
|
148
|
-
<div><label class="form-label" for="stx-favicon">Browser icon (favicon)</label>
|
|
149
|
-
<input id="stx-favicon" type="text" class="form-input" placeholder="/media/favicon.png" data-model="favicon.value">
|
|
150
|
-
<button type="button" class="btn btn-sm btn-ghost" data-on-click="pickBrandImage('favicon')">Choose or upload image</button>
|
|
151
|
-
<button type="button" class="btn btn-sm btn-ghost" data-on-click="clearBrandImage('favicon')">Remove</button>
|
|
152
|
-
<img data-bind-src="favicon.value" data-bind-hidden="!favicon.value" alt="Browser icon (favicon) preview" style="display:block;max-width:180px;max-height:80px;object-fit:contain;margin-top:.75rem;">
|
|
153
|
-
</div>
|
|
154
|
-
<p class="text-muted">Save to apply the browser icon. Leave it empty to use the public logo.</p>
|
|
155
|
-
</div>
|
|
156
|
-
</div>
|
|
157
|
-
</div>
|
|
158
|
-
|
|
159
|
-
<!-- Footer -->
|
|
160
|
-
<div class="tab-panel">
|
|
161
|
-
<div class="stx-card-columns">
|
|
162
|
-
<div class="stx-card dm-settings-section">
|
|
163
|
-
<div class="stx-card-title dm-settings-section-title"><span data-icon="align-left" data-icon-size="16" aria-hidden="true"></span>Footer</div>
|
|
164
|
-
<div class="stx-grid">
|
|
165
|
-
<div class="stx-wide">
|
|
166
|
-
<label class="form-label" for="stx-footer-copy">Copyright text</label>
|
|
167
|
-
<input id="stx-footer-copy" type="text" class="form-input" placeholder="© 2026 My Site" data-model="footerCopyright.value">
|
|
168
|
-
</div>
|
|
169
|
-
<div class="stx-setting">
|
|
170
|
-
<label class="form-label" for="stx-footer-layout">Layout
|
|
171
|
-
<span data-help-title="Footer layout" data-help="Columns puts your brand, the blurb and the social links beside one column per group of the footer menu, with copyright, legal links and the motion control in a bar beneath. One row puts everything on a single line. Automatic uses columns when the footer menu has groups (made with sub-items in Menus) and one row when it does not."></span></label>
|
|
172
|
-
<select id="stx-footer-layout" class="form-input" data-model="footerLayout.value">
|
|
173
|
-
<option value="auto">Automatic</option>
|
|
174
|
-
<option value="columns">Columns</option>
|
|
175
|
-
<option value="row">One row</option>
|
|
176
|
-
</select>
|
|
177
|
-
</div>
|
|
178
|
-
<div class="stx-wide">
|
|
179
|
-
<label class="form-label" for="stx-footer-blurb">Blurb
|
|
180
|
-
<span data-help="A sentence or two under your brand in the columns layout - what the site is, in plain words. Leave it empty for none."></span></label>
|
|
181
|
-
<textarea id="stx-footer-blurb" class="form-input" rows="2" maxlength="300" placeholder="What your site is about, in a sentence." data-model="footerBlurb.value"></textarea>
|
|
182
|
-
</div>
|
|
183
|
-
<div class="stx-wide">
|
|
184
|
-
<label class="form-label" for="stx-footer-blocks">Footer blocks
|
|
185
|
-
<span data-help="Blocks (Content › Blocks) shown side by side at the top of the footer on every page, by name, in order - for example wp-footer-1, wp-footer-2. Import from WordPress puts a site's footer widget areas here. Leave it empty for none; a name that is not a block is left out."></span></label>
|
|
186
|
-
<input id="stx-footer-blocks" type="text" class="form-input" maxlength="400" placeholder="wp-footer-1, wp-footer-2" data-model="footerBlocks.value">
|
|
187
|
-
</div>
|
|
188
|
-
<p class="stx-wide stx-hint">The “Reduce motion” control now has a tab of its own:
|
|
189
|
-
<button type="button" class="stx-inline-link" data-on-click="goTab('motion')">Reduce motion</button>.</p>
|
|
190
|
-
<div>
|
|
191
|
-
<label class="form-label" for="stx-footer-class">Footer CSS classes
|
|
192
|
-
<span data-help-title="Footer CSS classes" data-help="Your own class names, separated by spaces, added to the site footer. Style them in Custom CSS. The footer's menus take classes of their own in Menus."></span></label>
|
|
193
|
-
<input id="stx-footer-class" type="text" class="form-input" placeholder="footer-dark" autocomplete="off" spellcheck="false" data-model="footerClass.value">
|
|
194
|
-
</div>
|
|
195
|
-
<div>
|
|
196
|
-
<label class="form-label" for="stx-social-class">Social icon CSS classes
|
|
197
|
-
<span data-help-title="Social icon CSS classes" data-help="Your own class names, separated by spaces, added to every social media icon link in the footer."></span></label>
|
|
198
|
-
<input id="stx-social-class" type="text" class="form-input" placeholder="social-round" autocomplete="off" spellcheck="false" data-model="footerSocialClass.value">
|
|
199
|
-
</div>
|
|
200
|
-
</div>
|
|
201
|
-
</div>
|
|
202
|
-
<div class="stx-card dm-settings-section">
|
|
203
|
-
<div class="stx-card-title dm-settings-section-title"><span data-icon="star" data-icon-size="16" aria-hidden="true"></span>Showcase footer
|
|
204
|
-
<span data-help-title="Showcase footer" data-help="A footer that finishes the page with a flourish: a big call to action with a few words in a colour gradient, your contact details under the brand, a row of short facts, a tagline, and your name drawn huge and faint behind it all. Each part shows only when it has words. The Showcase look adds a glowing line along the top and more room; it always uses the columns layout."></span></div>
|
|
205
|
-
<div class="stx-grid">
|
|
206
|
-
<div class="stx-setting">
|
|
207
|
-
<label class="form-label" for="stx-footer-look">Look</label>
|
|
208
|
-
<select id="stx-footer-look" class="form-input" data-model="footerLook.value">
|
|
209
|
-
<option value="">Standard</option>
|
|
210
|
-
<option value="showcase">Showcase</option>
|
|
211
|
-
</select>
|
|
212
|
-
</div>
|
|
213
|
-
<div class="stx-setting">
|
|
214
|
-
<label class="form-label" for="stx-footer-wm">Name in the background
|
|
215
|
-
<span data-help="Drawn very large and faint behind the footer, drifting sideways as the page scrolls (still for visitors who ask for reduced motion). Usually your site's name. Leave it empty for none."></span></label>
|
|
216
|
-
<input id="stx-footer-wm" type="text" class="form-input" maxlength="24" placeholder="ACME" data-model="footerWatermark.value">
|
|
217
|
-
</div>
|
|
218
|
-
<div>
|
|
219
|
-
<label class="form-label" for="stx-footer-cta">Call to action
|
|
220
|
-
<span data-help="The big line at the top of the footer, for example Join. The next field is drawn in the gradient straight after it."></span></label>
|
|
221
|
-
<input id="stx-footer-cta" type="text" class="form-input" maxlength="40" placeholder="Join" data-model="footerCtaText.value">
|
|
222
|
-
</div>
|
|
223
|
-
<div>
|
|
224
|
-
<label class="form-label" for="stx-footer-cta-hl">…in the gradient</label>
|
|
225
|
-
<input id="stx-footer-cta-hl" type="text" class="form-input" maxlength="40" placeholder="early access." data-model="footerCtaHighlight.value">
|
|
226
|
-
</div>
|
|
227
|
-
<div>
|
|
228
|
-
<label class="form-label" for="stx-footer-cta-url">Call to action link</label>
|
|
229
|
-
<input id="stx-footer-cta-url" type="text" class="form-input" maxlength="500" placeholder="/contact" data-model="footerCtaUrl.value">
|
|
230
|
-
</div>
|
|
231
|
-
<div>
|
|
232
|
-
<label class="form-label" for="stx-footer-cta-sub">Line under it</label>
|
|
233
|
-
<input id="stx-footer-cta-sub" type="text" class="form-input" maxlength="160" placeholder="A reply within one working day" data-model="footerCtaSub.value">
|
|
234
|
-
</div>
|
|
235
|
-
<div>
|
|
236
|
-
<label class="form-label" for="stx-footer-email">Email under the brand</label>
|
|
237
|
-
<input id="stx-footer-email" type="email" class="form-input" maxlength="120" placeholder="hello@example.com" data-model="footerEmail.value">
|
|
238
|
-
</div>
|
|
239
|
-
<div>
|
|
240
|
-
<label class="form-label" for="stx-footer-address">Address under the brand</label>
|
|
241
|
-
<input id="stx-footer-address" type="text" class="form-input" maxlength="120" placeholder="Leeds, West Yorkshire" data-model="footerAddress.value">
|
|
242
|
-
</div>
|
|
243
|
-
<div>
|
|
244
|
-
<label class="form-label" for="stx-footer-status">Status
|
|
245
|
-
<span data-help="A short line with a small green dot, at the start of the facts row - for example All systems running."></span></label>
|
|
246
|
-
<input id="stx-footer-status" type="text" class="form-input" maxlength="60" placeholder="All systems running" data-model="footerStatus.value">
|
|
247
|
-
</div>
|
|
248
|
-
<div>
|
|
249
|
-
<label class="form-label" for="stx-footer-tagline">Tagline
|
|
250
|
-
<span data-help="Words at the right of the bottom bar, opposite the copyright."></span></label>
|
|
251
|
-
<input id="stx-footer-tagline" type="text" class="form-input" maxlength="80" placeholder="Websites. Hosting. Support." data-model="footerTagline.value">
|
|
252
|
-
</div>
|
|
253
|
-
<div class="stx-wide">
|
|
254
|
-
<label class="form-label" for="stx-footer-facts">Facts
|
|
255
|
-
<span data-help="Short facts in a row above the bottom bar, one per line, up to four - a town, opening hours, a promise."></span></label>
|
|
256
|
-
<textarea id="stx-footer-facts" class="form-input" rows="3" placeholder="Leeds, UK Open 9 to 5" data-model="footerFacts.value"></textarea>
|
|
257
|
-
</div>
|
|
258
|
-
<div>
|
|
259
|
-
<label class="form-label" for="stx-footer-grad-from">Gradient from
|
|
260
|
-
<span data-help="The colours of the gradient words and the line along the top, as #rrggbb. Leave them empty for your theme's colour."></span></label>
|
|
261
|
-
<input id="stx-footer-grad-from" type="text" class="form-input" maxlength="7" placeholder="#f26b3a" data-model="footerGradFrom.value">
|
|
262
|
-
</div>
|
|
263
|
-
<div>
|
|
264
|
-
<label class="form-label" for="stx-footer-grad-to">Gradient to</label>
|
|
265
|
-
<input id="stx-footer-grad-to" type="text" class="form-input" maxlength="7" placeholder="#8b5cf6" data-model="footerGradTo.value">
|
|
266
|
-
</div>
|
|
267
|
-
</div>
|
|
268
|
-
</div>
|
|
269
|
-
<div class="stx-card dm-settings-section">
|
|
270
|
-
<div class="stx-card-title dm-settings-section-title"><span data-icon="share-2" data-icon-size="16" aria-hidden="true"></span>Social media icons
|
|
271
|
-
<span data-help="The full address of each profile - its icon then shows in the footer. Leave one empty to hide its icon."></span></div>
|
|
272
|
-
<div class="stx-grid">
|
|
273
|
-
<div><label class="form-label" for="stx-s-tw">X / Twitter</label>
|
|
274
|
-
<input id="stx-s-tw" type="url" class="form-input" placeholder="https://x.com/yourhandle" data-model="socialTwitter.value"></div>
|
|
275
|
-
<div><label class="form-label" for="stx-s-fb">Facebook</label>
|
|
276
|
-
<input id="stx-s-fb" type="url" class="form-input" placeholder="https://facebook.com/yourpage" data-model="socialFacebook.value"></div>
|
|
277
|
-
<div><label class="form-label" for="stx-s-ig">Instagram</label>
|
|
278
|
-
<input id="stx-s-ig" type="url" class="form-input" placeholder="https://instagram.com/yourhandle" data-model="socialInstagram.value"></div>
|
|
279
|
-
<div><label class="form-label" for="stx-s-li">LinkedIn</label>
|
|
280
|
-
<input id="stx-s-li" type="url" class="form-input" placeholder="https://linkedin.com/company/yourcompany" data-model="socialLinkedin.value"></div>
|
|
281
|
-
<div><label class="form-label" for="stx-s-gh">GitHub</label>
|
|
282
|
-
<input id="stx-s-gh" type="url" class="form-input" placeholder="https://github.com/yourorg" data-model="socialGithub.value"></div>
|
|
283
|
-
<div><label class="form-label" for="stx-s-yt">YouTube</label>
|
|
284
|
-
<input id="stx-s-yt" type="url" class="form-input" placeholder="https://youtube.com/@yourchannel" data-model="socialYoutube.value"></div>
|
|
285
|
-
</div>
|
|
286
|
-
</div>
|
|
287
|
-
</div>
|
|
288
|
-
</div>
|
|
289
|
-
|
|
290
|
-
<!-- Email -->
|
|
129
|
+
<!-- SMTP -->
|
|
291
130
|
<div class="tab-panel">
|
|
292
131
|
<!-- Without a host the CMS falls back to an Ethereal test inbox, which ACCEPTS the mail and reports
|
|
293
132
|
success - so nothing anywhere else looks wrong. Follows the field, not only the saved value. -->
|
|
@@ -355,80 +194,6 @@
|
|
|
355
194
|
</div>
|
|
356
195
|
</div>
|
|
357
196
|
|
|
358
|
-
<!-- Page navigation -->
|
|
359
|
-
<div class="tab-panel">
|
|
360
|
-
<div class="stx-card-columns">
|
|
361
|
-
<div class="stx-card dm-settings-section">
|
|
362
|
-
<div class="stx-card-title dm-settings-section-title"><span class="stx-scroll-icon" data-icon="arrow-up"></span>Back to top
|
|
363
|
-
<span data-help="A button that appears once a visitor has scrolled down, and takes them back to the top of the page."></span></div>
|
|
364
|
-
<div class="stx-grid">
|
|
365
|
-
<div class="stx-setting"><label class="form-label" for="stx-btt-on">Show the button</label>
|
|
366
|
-
<input id="stx-btt-on" type="checkbox" class="form-switch" data-model="bttEnabled.value"></div>
|
|
367
|
-
<div class="stx-setting"><label class="form-label" for="stx-btt-smooth">Smooth scroll</label>
|
|
368
|
-
<input id="stx-btt-smooth" type="checkbox" class="form-switch" data-model="bttSmooth.value"></div>
|
|
369
|
-
<div class="stx-wide">
|
|
370
|
-
<label class="form-label" for="stx-btt-label">Label <small class="stx-muted">(optional - empty is icon-only)</small></label>
|
|
371
|
-
<input id="stx-btt-label" type="text" class="form-input" placeholder="Back to top" data-model="bttLabel.value">
|
|
372
|
-
</div>
|
|
373
|
-
<div>
|
|
374
|
-
<label class="form-label" for="stx-btt-thr">Appears after (px)
|
|
375
|
-
<span data-help="How far a visitor has to scroll down before the button shows."></span></label>
|
|
376
|
-
<input id="stx-btt-thr" type="number" class="form-input" placeholder="300" data-model="bttThreshold.value">
|
|
377
|
-
</div>
|
|
378
|
-
<div>
|
|
379
|
-
<label class="form-label" for="stx-btt-pos">Position</label>
|
|
380
|
-
<select id="stx-btt-pos" class="form-select" data-model="bttPosition.value">
|
|
381
|
-
<option value="bottom-right">Bottom right</option>
|
|
382
|
-
<option value="bottom-left">Bottom left</option>
|
|
383
|
-
</select>
|
|
384
|
-
</div>
|
|
385
|
-
<div>
|
|
386
|
-
<label class="form-label" for="stx-btt-off">Side offset (px)</label>
|
|
387
|
-
<input id="stx-btt-off" type="number" class="form-input" placeholder="32" data-model="bttOffset.value">
|
|
388
|
-
</div>
|
|
389
|
-
<div>
|
|
390
|
-
<label class="form-label" for="stx-btt-boff">Bottom offset (px)</label>
|
|
391
|
-
<input id="stx-btt-boff" type="number" class="form-input" placeholder="32" data-model="bttBottomOffset.value">
|
|
392
|
-
</div>
|
|
393
|
-
</div>
|
|
394
|
-
</div>
|
|
395
|
-
<div class="stx-card dm-settings-section">
|
|
396
|
-
<div class="stx-card-title dm-settings-section-title"><span class="stx-scroll-icon" data-icon="arrow-down"></span>Go to bottom
|
|
397
|
-
<span data-help="A matching down-arrow button that takes visitors to the bottom of the page. It hides when they are already near the bottom."></span></div>
|
|
398
|
-
<div class="stx-grid">
|
|
399
|
-
<div class="stx-setting"><label class="form-label" for="stx-gtb-on">Show the button</label>
|
|
400
|
-
<input id="stx-gtb-on" type="checkbox" class="form-switch" data-model="gtbEnabled.value"></div>
|
|
401
|
-
<div class="stx-setting"><label class="form-label" for="stx-gtb-smooth">Smooth scroll</label>
|
|
402
|
-
<input id="stx-gtb-smooth" type="checkbox" class="form-switch" data-model="gtbSmooth.value"></div>
|
|
403
|
-
<div class="stx-wide">
|
|
404
|
-
<label class="form-label" for="stx-gtb-label">Label <small class="stx-muted">(optional - empty is icon-only)</small></label>
|
|
405
|
-
<input id="stx-gtb-label" type="text" class="form-input" placeholder="Go to bottom" data-model="gtbLabel.value">
|
|
406
|
-
</div>
|
|
407
|
-
<div>
|
|
408
|
-
<label class="form-label" for="stx-gtb-thr">Hide near bottom (px)
|
|
409
|
-
<span data-help="How close to the bottom the visitor must be before this button hides."></span></label>
|
|
410
|
-
<input id="stx-gtb-thr" type="number" class="form-input" placeholder="300" data-model="gtbThreshold.value">
|
|
411
|
-
</div>
|
|
412
|
-
<div>
|
|
413
|
-
<label class="form-label" for="stx-gtb-pos">Position</label>
|
|
414
|
-
<select id="stx-gtb-pos" class="form-select" data-model="gtbPosition.value">
|
|
415
|
-
<option value="bottom-right">Bottom right</option>
|
|
416
|
-
<option value="bottom-left">Bottom left</option>
|
|
417
|
-
</select>
|
|
418
|
-
</div>
|
|
419
|
-
<div>
|
|
420
|
-
<label class="form-label" for="stx-gtb-off">Side offset (px)</label>
|
|
421
|
-
<input id="stx-gtb-off" type="number" class="form-input" placeholder="32" data-model="gtbOffset.value">
|
|
422
|
-
</div>
|
|
423
|
-
<div>
|
|
424
|
-
<label class="form-label" for="stx-gtb-boff">Bottom offset (px)</label>
|
|
425
|
-
<input id="stx-gtb-boff" type="number" class="form-input" placeholder="32" data-model="gtbBottomOffset.value">
|
|
426
|
-
</div>
|
|
427
|
-
</div>
|
|
428
|
-
</div>
|
|
429
|
-
</div>
|
|
430
|
-
</div>
|
|
431
|
-
|
|
432
197
|
<!-- Cookie consent -->
|
|
433
198
|
<div class="tab-panel">
|
|
434
199
|
<div class="stx-card dm-settings-section">
|
|
@@ -494,128 +259,6 @@
|
|
|
494
259
|
</div>
|
|
495
260
|
</div>
|
|
496
261
|
|
|
497
|
-
<!-- Breadcrumbs -->
|
|
498
|
-
<div class="tab-panel">
|
|
499
|
-
<div class="stx-card-columns">
|
|
500
|
-
<div class="stx-card dm-settings-section">
|
|
501
|
-
<div class="stx-card-title dm-settings-section-title"><span data-icon="chevron-right" data-icon-size="16" aria-hidden="true"></span>Breadcrumb trail
|
|
502
|
-
<span data-help-title="Breadcrumbs" data-help="A small frosted pill fixed to a corner of every public page, showing where the page sits (Home › Services › Web). A page can switch it off with “Show Breadcrumbs” in the page editor."></span></div>
|
|
503
|
-
<div class="stx-grid">
|
|
504
|
-
<div class="stx-wide stx-setting"><label class="form-label" for="stx-bc-on">Show breadcrumbs</label>
|
|
505
|
-
<input id="stx-bc-on" type="checkbox" class="form-switch" data-model="bcEnabled.value"></div>
|
|
506
|
-
<div class="stx-wide"><label class="form-label" for="stx-bc-home">Home label</label>
|
|
507
|
-
<input id="stx-bc-home" type="text" class="form-input" placeholder="Home" data-model="bcHomeLabel.value"></div>
|
|
508
|
-
</div>
|
|
509
|
-
<p class="stx-hint">Shows the path from Home to the current page. Individual pages can hide their trail in the page editor.</p>
|
|
510
|
-
</div>
|
|
511
|
-
<div class="stx-card dm-settings-section">
|
|
512
|
-
<div class="stx-card-title dm-settings-section-title"><span data-icon="layout" data-icon-size="16" aria-hidden="true"></span>Placement</div>
|
|
513
|
-
<div class="stx-grid">
|
|
514
|
-
<div class="stx-wide">
|
|
515
|
-
<span class="form-label">Corner</span>
|
|
516
|
-
<div class="stx-corners" role="group" aria-label="Corner">
|
|
517
|
-
<button type="button" data-on-click="corner('TL')" data-bind-class="bcPosition.value === 'TL' && 'is-on'">↖ Top left</button>
|
|
518
|
-
<button type="button" data-on-click="corner('TR')" data-bind-class="bcPosition.value === 'TR' && 'is-on'">Top right ↗</button>
|
|
519
|
-
<button type="button" data-on-click="corner('BL')" data-bind-class="bcPosition.value === 'BL' && 'is-on'">↙ Bottom left</button>
|
|
520
|
-
<button type="button" data-on-click="corner('BR')" data-bind-class="bcPosition.value === 'BR' && 'is-on'">Bottom right ↘</button>
|
|
521
|
-
</div>
|
|
522
|
-
</div>
|
|
523
|
-
<div class="stx-pair stx-wide">
|
|
524
|
-
<div><label class="form-label" for="stx-bc-x">From the side (px)</label>
|
|
525
|
-
<input id="stx-bc-x" type="number" class="form-input" min="0" max="500" placeholder="8" data-model="bcOffsetX.value"></div>
|
|
526
|
-
<div><label class="form-label" for="stx-bc-y">From the top/bottom (px)</label>
|
|
527
|
-
<input id="stx-bc-y" type="number" class="form-input" min="0" max="500" placeholder="8" data-model="bcOffsetY.value"></div>
|
|
528
|
-
</div>
|
|
529
|
-
</div>
|
|
530
|
-
</div>
|
|
531
|
-
</div>
|
|
532
|
-
</div>
|
|
533
|
-
|
|
534
|
-
<!-- Reduce motion -->
|
|
535
|
-
<div class="tab-panel">
|
|
536
|
-
<div class="stx-card-columns">
|
|
537
|
-
<div class="stx-card dm-settings-section">
|
|
538
|
-
<div class="stx-card-title dm-settings-section-title"><span data-icon="pause" data-icon-size="16" aria-hidden="true"></span>The control
|
|
539
|
-
<span data-help-title="Reduce motion" data-help="An accessibility control that lets visitors turn animations off. Turning it off only hides the control - visitors who already chose it, and anyone whose browser asks for reduced motion, still get a calmer site."></span></div>
|
|
540
|
-
<div class="stx-grid">
|
|
541
|
-
<div class="stx-wide stx-setting"><label class="form-label" for="stx-mt-on">Show it</label>
|
|
542
|
-
<input id="stx-mt-on" type="checkbox" class="form-switch" data-model="mtEnabled.value"></div>
|
|
543
|
-
<div class="stx-wide"><label class="form-label" for="stx-mt-label">Label
|
|
544
|
-
<span data-help="The words on the control, and what a screen reader announces. Up to 40 characters."></span></label>
|
|
545
|
-
<input id="stx-mt-label" type="text" class="form-input" maxlength="40" placeholder="Reduce motion" data-model="mtLabel.value"></div>
|
|
546
|
-
<div class="stx-wide stx-setting">
|
|
547
|
-
<label class="form-label" for="stx-motion-default">Reduced motion for new visitors
|
|
548
|
-
<span data-help="What a visitor who has not used the control gets. Follow their device honours the system setting (the accessible default). Off shows every animation until they ask for less; On starts calm. A visitor's own choice always wins."></span></label>
|
|
549
|
-
<select id="stx-motion-default" class="form-input" data-model="mtDefault.value">
|
|
550
|
-
<option value="system">Follow their device</option>
|
|
551
|
-
<option value="off">Off - full motion</option>
|
|
552
|
-
<option value="on">On - calm</option>
|
|
553
|
-
</select>
|
|
554
|
-
</div>
|
|
555
|
-
<div class="stx-wide stx-setting" data-bind-hidden="mtPlacement.value !== 'footer'">
|
|
556
|
-
<label class="form-label" for="stx-motion-control">Footer style
|
|
557
|
-
<span data-help="How the Reduce motion control looks in the footer."></span></label>
|
|
558
|
-
<select id="stx-motion-control" class="form-input" data-model="mtControl.value">
|
|
559
|
-
<option value="switch">A switch</option>
|
|
560
|
-
<option value="checkbox">A checkbox</option>
|
|
561
|
-
</select>
|
|
562
|
-
</div>
|
|
563
|
-
<div class="stx-wide">
|
|
564
|
-
<label class="form-label" for="stx-mt-class">CSS classes
|
|
565
|
-
<span data-help="Your own class names, separated by spaces, added to the control wherever it sits. Style them in Custom CSS."></span></label>
|
|
566
|
-
<input id="stx-mt-class" type="text" class="form-input" placeholder="motion-quiet" autocomplete="off" spellcheck="false" data-model="mtClass.value">
|
|
567
|
-
</div>
|
|
568
|
-
</div>
|
|
569
|
-
</div>
|
|
570
|
-
<div class="stx-card dm-settings-section">
|
|
571
|
-
<div class="stx-card-title dm-settings-section-title"><span data-icon="layout" data-icon-size="16" aria-hidden="true"></span>Placement
|
|
572
|
-
<span data-help-title="Placement" data-help="Footer puts it at the foot of every page, as it always was. Floating button is a disc fixed to a corner of the window, kept clear of Search, Back to top and the theme switcher. Navbar adds it at the end of the navbar - on a page with no navbar, or on a phone when the navbar shows only its menu button, it floats instead."></span></div>
|
|
573
|
-
<div class="stx-grid">
|
|
574
|
-
<div class="stx-wide">
|
|
575
|
-
<span class="form-label">Where it goes</span>
|
|
576
|
-
<div class="stx-segments" role="group" aria-label="Where it goes">
|
|
577
|
-
<button type="button" data-on-click="motionPlacement('footer')" data-bind-class="mtPlacement.value === 'footer' && 'is-on'">Footer</button>
|
|
578
|
-
<button type="button" data-on-click="motionPlacement('floating')" data-bind-class="mtPlacement.value === 'floating' && 'is-on'">Floating button</button>
|
|
579
|
-
<button type="button" data-on-click="motionPlacement('navbar')" data-bind-class="mtPlacement.value === 'navbar' && 'is-on'">Navbar</button>
|
|
580
|
-
</div>
|
|
581
|
-
</div>
|
|
582
|
-
<div class="stx-setting stx-wide" data-bind-hidden="mtPlacement.value === 'footer'">
|
|
583
|
-
<label class="form-label" for="stx-mt-style">Button
|
|
584
|
-
<span data-help="An icon on its own (the label is still read out by screen readers), or the icon with the label beside it."></span></label>
|
|
585
|
-
<select id="stx-mt-style" class="form-input" data-model="mtTriggerStyle.value">
|
|
586
|
-
<option value="icon">Icon</option>
|
|
587
|
-
<option value="icon-text">Icon and label</option>
|
|
588
|
-
</select>
|
|
589
|
-
</div>
|
|
590
|
-
<div class="stx-wide" data-bind-hidden="mtPlacement.value !== 'floating'">
|
|
591
|
-
<span class="form-label">Corner</span>
|
|
592
|
-
<div class="stx-corners" role="group" aria-label="Corner">
|
|
593
|
-
<button type="button" data-on-click="motionCorner('TL')" data-bind-class="mtPosition.value === 'TL' && 'is-on'">↖ Top left</button>
|
|
594
|
-
<button type="button" data-on-click="motionCorner('TR')" data-bind-class="mtPosition.value === 'TR' && 'is-on'">Top right ↗</button>
|
|
595
|
-
<button type="button" data-on-click="motionCorner('BL')" data-bind-class="mtPosition.value === 'BL' && 'is-on'">↙ Bottom left</button>
|
|
596
|
-
<button type="button" data-on-click="motionCorner('BR')" data-bind-class="mtPosition.value === 'BR' && 'is-on'">Bottom right ↘</button>
|
|
597
|
-
</div>
|
|
598
|
-
</div>
|
|
599
|
-
<div class="stx-pair stx-wide" data-bind-hidden="mtPlacement.value !== 'floating'">
|
|
600
|
-
<div><label class="form-label" for="stx-mt-x">From the side (px)</label>
|
|
601
|
-
<input id="stx-mt-x" type="number" class="form-input" min="0" max="500" placeholder="32" data-model="mtOffsetX.value"></div>
|
|
602
|
-
<div><label class="form-label" for="stx-mt-y">From the top/bottom (px)</label>
|
|
603
|
-
<input id="stx-mt-y" type="number" class="form-input" min="0" max="500" placeholder="32" data-model="mtOffsetY.value"></div>
|
|
604
|
-
</div>
|
|
605
|
-
<div class="stx-pair stx-wide" data-bind-hidden="mtPlacement.value !== 'floating' || mtTriggerStyle.value !== 'icon'">
|
|
606
|
-
<div><label class="form-label" for="stx-mt-size">Size <span class="stx-readout" data-bind-text="mtSizeText.value"></span>
|
|
607
|
-
<span data-help="How big the disc is (32-96 px). The glyph inside scales with it. 44 px and up is comfortable to tap on a phone."></span></label>
|
|
608
|
-
<input id="stx-mt-size" type="range" min="32" max="96" step="2" data-model="mtIconSize.value"></div>
|
|
609
|
-
<div><label class="form-label" for="stx-mt-radius">Corners <span class="stx-readout" data-bind-text="mtRadiusText.value"></span>
|
|
610
|
-
<span data-help="0 is a square; the top of the range is a circle, and it is always half the size - so it moves when the size does."></span></label>
|
|
611
|
-
<input id="stx-mt-radius" type="range" min="0" step="1" data-model="mtIconRadius.value"></div>
|
|
612
|
-
</div>
|
|
613
|
-
</div>
|
|
614
|
-
<p class="stx-hint" data-bind-hidden="mtPlacement.value !== 'floating'">If Search, Back to top or the theme switcher sits in the same corner, the disc stacks clear of it, further from the edge.</p>
|
|
615
|
-
</div>
|
|
616
|
-
</div>
|
|
617
|
-
</div>
|
|
618
|
-
|
|
619
262
|
<!-- Cache -->
|
|
620
263
|
<div class="tab-panel">
|
|
621
264
|
<div class="stx-card dm-settings-section">
|
|
@@ -644,82 +287,8 @@
|
|
|
644
287
|
<div class="stx-list" data-each="cacheRows.value key=id"></div>
|
|
645
288
|
</div>
|
|
646
289
|
</div>
|
|
647
|
-
|
|
290
|
+
|
|
648
291
|
</div>
|
|
649
292
|
</div>
|
|
650
293
|
|
|
651
|
-
<
|
|
652
|
-
.stx { display: flex; flex-direction: column; gap: .75rem; }
|
|
653
|
-
.stx [hidden] { display: none !important; }
|
|
654
|
-
.stx-alert { margin: 0; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .6rem .8rem; border-radius: var(--dm-radius-md); color: var(--dm-text); }
|
|
655
|
-
.stx-alert.is-dirty { background: color-mix(in srgb, var(--dm-primary) 12%, transparent); }
|
|
656
|
-
.stx-alert.is-warn { background: color-mix(in srgb, var(--dm-warning) 16%, transparent); }
|
|
657
|
-
.stx-alert.is-bad { background: color-mix(in srgb, var(--dm-danger) 14%, transparent); }
|
|
658
|
-
.stx-spacer { flex: 1; }
|
|
659
|
-
.stx-alert.is-dirty > span:nth-child(2) { flex: 1 1 18rem; min-width: 0; }
|
|
660
|
-
.stx-tabs .tab-item { display: inline-flex; align-items: center; gap: .35rem; }
|
|
661
|
-
.stx-dot { display: inline-block; width: .45rem; height: .45rem; border-radius: 50%; background: var(--dm-primary); }
|
|
662
|
-
.stx-dot.is-bad { background: var(--dm-danger); }
|
|
663
|
-
.stx-card { border: 1px solid var(--dm-border); border-radius: var(--dm-radius-md); padding: .75rem .9rem; display: flex; flex-direction: column; gap: .65rem; margin-top: .75rem; }
|
|
664
|
-
.stx-card-title { display: flex; align-items: center; gap: .4rem; font-weight: 600; flex-wrap: wrap; }
|
|
665
|
-
.stx-card-title .btn { display: inline-flex; align-items: center; gap: .3rem; font-weight: 500; }
|
|
666
|
-
.stx-card-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
|
|
667
|
-
.stx-card-columns > .stx-card { min-width: 0; }
|
|
668
|
-
.stx-scroll-icon { display: inline-flex; padding: .35rem; border-radius: 50%; background: var(--dm-surface-raised); }
|
|
669
|
-
@media (max-width: 900px) { .stx-card-columns { grid-template-columns: minmax(0, 1fr); } }
|
|
670
|
-
.stx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem 1rem; }
|
|
671
|
-
.stx-wide { grid-column: 1 / -1; }
|
|
672
|
-
.stx-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
|
|
673
|
-
.stx .form-label { display: flex; align-items: center; gap: .3rem; }
|
|
674
|
-
.stx-setting { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
|
|
675
|
-
.stx-setting .form-label { margin: 0; }
|
|
676
|
-
.stx-hint { display: block; color: var(--dm-text-muted); font-size: var(--dm-text-xs); margin-top: .25rem; }
|
|
677
|
-
.stx-muted { color: var(--dm-text-muted); font-weight: 400; }
|
|
678
|
-
.stx-note { margin: 0; color: var(--dm-text-muted); font-size: var(--dm-text-sm); }
|
|
679
|
-
.stx-note.is-bad { color: var(--dm-danger); }
|
|
680
|
-
.stx-moved { flex-direction: row; align-items: center; gap: .75rem; background: var(--dm-surface-raised); }
|
|
681
|
-
.stx-moved-text { flex: 1; display: flex; flex-direction: column; }
|
|
682
|
-
.stx-moved-text small { color: var(--dm-text-muted); }
|
|
683
|
-
.stx-problems { display: flex; flex-direction: column; gap: .35rem; }
|
|
684
|
-
.stx-problem { display: flex; align-items: center; gap: .6rem; font-size: var(--dm-text-sm); }
|
|
685
|
-
.stx-problem button { margin-left: auto; }
|
|
686
|
-
.stx-inline { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
|
|
687
|
-
.stx-inline .btn { display: inline-flex; align-items: center; gap: .3rem; }
|
|
688
|
-
.stx-test-to { max-width: 18rem; }
|
|
689
|
-
.stx-result { font-size: var(--dm-text-sm); }
|
|
690
|
-
.stx-result.is-ok { color: var(--dm-success); }
|
|
691
|
-
.stx-result.is-bad { color: var(--dm-danger); }
|
|
692
|
-
.stx-corners { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--dm-border); border-radius: var(--dm-radius-md); overflow: hidden; width: fit-content; }
|
|
693
|
-
.stx-corners button { border: 0; background: none; color: var(--dm-text); padding: .45rem .8rem; cursor: pointer; font: inherit; font-size: var(--dm-text-sm); }
|
|
694
|
-
.stx-corners button:nth-child(odd) { border-right: 1px solid var(--dm-border); }
|
|
695
|
-
.stx-corners button:nth-child(-n+2) { border-bottom: 1px solid var(--dm-border); }
|
|
696
|
-
.stx-corners button:hover { background: var(--dm-table-hover-bg, color-mix(in srgb, var(--dm-text) 6%, transparent)); }
|
|
697
|
-
.stx-corners button.is-on { background: var(--dm-primary); color: var(--dm-primary-text); }
|
|
698
|
-
.stx-segments { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--dm-border); border-radius: var(--dm-radius-md); overflow: hidden; }
|
|
699
|
-
.stx-segments button { border: 0; background: none; color: var(--dm-text); padding: .45rem .8rem; cursor: pointer; font: inherit; font-size: var(--dm-text-sm); }
|
|
700
|
-
.stx-segments button + button { border-left: 1px solid var(--dm-border); }
|
|
701
|
-
.stx-segments button:hover { background: var(--dm-table-hover-bg, color-mix(in srgb, var(--dm-text) 6%, transparent)); }
|
|
702
|
-
.stx-segments button.is-on { background: var(--dm-primary); color: var(--dm-primary-text); }
|
|
703
|
-
.stx-readout { color: var(--dm-text-muted); font-weight: 400; font-variant-numeric: tabular-nums; }
|
|
704
|
-
.stx-pair input[type="range"] { width: 100%; }
|
|
705
|
-
.stx-inline-link { background: none; border: 0; padding: 0; font: inherit; color: var(--dm-primary); text-decoration: underline; cursor: pointer; }
|
|
706
|
-
.stx-chips { display: flex; gap: .35rem; flex-wrap: wrap; }
|
|
707
|
-
.stx-chip { display: inline-flex; align-items: center; font-size: var(--dm-text-xs); font-weight: 600; padding: .1rem .5rem; border-radius: 999px; white-space: nowrap;
|
|
708
|
-
background: color-mix(in srgb, var(--dm-text) 10%, transparent); color: var(--dm-text-muted); }
|
|
709
|
-
.stx-chip.is-ok { background: color-mix(in srgb, var(--dm-success) 16%, transparent); color: var(--dm-success); }
|
|
710
|
-
.stx-chip.is-warn { background: color-mix(in srgb, var(--dm-warning) 18%, transparent); color: var(--dm-warning); }
|
|
711
|
-
.stx-chip.is-bad { background: color-mix(in srgb, var(--dm-danger) 16%, transparent); color: var(--dm-danger); }
|
|
712
|
-
.stx-count { opacity: .65; font-size: var(--dm-text-xs); font-weight: 500; }
|
|
713
|
-
.stx-search { max-width: 14rem; font-weight: 400; }
|
|
714
|
-
.stx-list { display: flex; flex-direction: column; }
|
|
715
|
-
.stx-row { display: flex; align-items: center; gap: .75rem; padding: .45rem .3rem; border-bottom: 1px solid var(--dm-border); cursor: pointer; }
|
|
716
|
-
.stx-row:last-child { border-bottom: 0; }
|
|
717
|
-
.stx-row:hover, .stx-row:focus-visible { background: var(--dm-table-hover-bg, color-mix(in srgb, var(--dm-text) 6%, transparent)); outline: none; }
|
|
718
|
-
.stx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
|
|
719
|
-
.stx-main strong, .stx-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
720
|
-
.stx-main strong { font-family: var(--dm-font-mono, monospace); font-size: var(--dm-text-sm); font-weight: 600; }
|
|
721
|
-
.stx-main small { color: var(--dm-text-muted); font-size: var(--dm-text-xs); }
|
|
722
|
-
.stx-kebab { border: 0; background: none; cursor: pointer; font-size: var(--dm-text-lg); color: var(--dm-text-muted); border-radius: var(--dm-radius-sm); padding: 0 .3rem; }
|
|
723
|
-
.stx-kebab:hover { color: var(--dm-primary); }
|
|
724
|
-
@media (max-width: 720px) { .stx-grid, .stx-pair { grid-template-columns: 1fr; } }
|
|
725
|
-
</style>
|
|
294
|
+
<link rel="stylesheet" href="/admin/css/site-settings.css">
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{api as N}from"../api.js";import{addBannerAction as z}from"../lib/plugin-chrome.js";import{helpPopovers as $}from"../lib/help-popover.js";import{appearanceForm as G,appearancePayload as H,APPEARANCE_TABS as F,changedTabs as J,snapshot as h}from"../lib/site-settings-arrange.js";import{faviconGenerator as Q}from"../lib/favicon-generator.js";import{pickMedia as W}from"../lib/media-picker.js";import{siteSearchSection as X}from"../lib/site-search-section.js";const C=/^\/appearance(\?.*)?$/,y="appearance.draft";let s=null,U=!1;function Z(){U||!window.R?.use||(U=!0,R.use((n,r,d)=>!C.test(r?.path||"")||C.test(n?.path||"")||!s?.dirty()?d():E.confirm("You have unsaved appearance changes. Leave anyway? They are kept as a draft.").then(l=>{l?d():history.replaceState(null,"","#/appearance")})),M.subscribe("router:afterChange",({to:n}={})=>{if(s&&!C.test(n?.path||"")){const r=s;s=null,r.dispose()}}))}export const appearanceView={templateUrl:"/admin/js/templates/appearance.html",async onMount(n){Z(),s?.dispose(),s=null;const r=n.get(0).querySelector(".stx"),d=E.loader(r,{type:"dots"});let l;try{l=await N.settings.get()}catch(e){E.toast(`Could not load the appearance: ${e.message||e}`,{type:"error"});return}finally{d.destroy()}if(!r.isConnected)return;let x=!1;const o=()=>!x&&r.isConnected,P=G(l),t=Object.fromEntries(Object.entries(P).map(([e,a])=>[e,M.observable(a)])),m=()=>Object.fromEntries(Object.entries(t).map(([e,a])=>[e,a.value])),i=M.observable(P),T=M.observable(!1),b=M.computed(()=>h(m())!==h(i.value)),g=M.computed(()=>b.value||T.value),V=M.computed(()=>Object.fromEntries(J(m(),i.value).map(e=>[e,!0])));let p=null;const f=M.observable(!1),u=M.observable(""),c=[],w=()=>{try{S.remove?S.remove(y):S.set(y,null)}catch{}},A=e=>{for(const a of Object.keys(t))a in e&&(t[a].value=e[a])},D=()=>{if(b.peek())try{S.set(y,{form:m(),base:h(i.peek())})}catch{}};async function k(){if(f.peek())return;f.value=!0,u.value="";const e=m();try{if(b.peek()&&await N.settings.save(H(e)),!o())return;if(i.value=e,w(),p?.dirty()&&!await p.save()){u.value="Appearance saved, but Search could not be saved. Check the Search tab and try again.";return}E.toast("Appearance saved.",{type:"success"})}catch(a){o()&&(u.value=a.message||"Could not save the appearance.")}finally{f.value=!1}}async function _(){!await E.confirm("Throw away your unsaved appearance changes?")||!o()||(A(i.peek()),p?.discard(),w(),u.value="")}const j=Q(t.favicon,M.observable(l.brand?.logo||""),o),O=E.tabs(r.querySelector(".stx-tabs"),{tabSelector:".tab-item",panelSelector:".tab-panel"}),L=new URLSearchParams(location.hash.split("?")[1]||"").get("tab");F.includes(L)&&O.activate(F.indexOf(L)),c.push(()=>O.destroy?.());const Y=M.applyBindings({...t,...j.data,dirty:g,saving:f,errorText:u,tabs:V,mtSizeText:M.computed(()=>`${t.mtIconSize.value} px`),mtRadiusText:M.computed(()=>`${t.mtIconRadius.value} px`)},r,{methods:{...j.methods,save:k,discard:_,pickBrandImage:async e=>{const a=await W({title:"Choose a favicon",current:t[e].peek()});a&&o()&&(t[e].value=a)},clearBrandImage:e=>{t[e].value=""},corner:e=>{t.bcPosition.value=e},motionCorner:e=>{t.mtPosition.value=e},motionPlacement:e=>{t.mtPlacement.value=e}}}),B=r.querySelector("#stx-mt-radius");c.push(M.effect(()=>{const e=Math.floor((Number.parseInt(t.mtIconSize.value,10)||52)/2);B.max=String(e);const a=Number.parseInt(t.mtIconRadius.peek(),10)||0;a>e?t.mtIconRadius.value=String(e):B.value=String(a)})),c.push(()=>Y.dispose(),$(r,{position:"bottom"})),p=X(r,{onDirty:e=>{T.value=e}}),c.push(()=>p.dispose()),z(n,{id:"appearance-view-site",icon:"external-link",title:"View site",onClick:()=>window.open("/","_blank","noopener")}),z(n,{id:"appearance-save",icon:"save",title:"Save (Ctrl+S)",onClick:k});const q=e=>{!(e.ctrlKey||e.metaKey)||e.key!=="s"||(e.preventDefault(),e.stopImmediatePropagation(),k())},K=e=>{g.peek()&&(D(),e.preventDefault(),e.returnValue="")};document.addEventListener("keydown",q,!0),window.addEventListener("beforeunload",K),c.push(()=>document.removeEventListener("keydown",q,!0),()=>window.removeEventListener("beforeunload",K)),s={dirty:()=>g.peek(),dispose(){x=!0,D(),c.reverse().forEach(e=>{try{e()}catch{}})}},I.scan(r);let v;try{v=S.get(y)}catch{}if(v?.form){const e=v.base!==h(i.peek());await E.confirm(e?"The saved appearance has changed. Restore your unsaved draft anyway?":"Restore your unsaved appearance changes?")&&o()&&A(v.form),o()&&w()}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{api as T}from"../api.js";import{addBannerAction as F}from"../lib/plugin-chrome.js";import{helpPopovers as A}from"../lib/help-popover.js";import{footerForm as B,footerPayload as U,footerShowcaseErrors as Y,snapshot as m}from"../lib/site-settings-arrange.js";const k=/^\/footer(\?.*)?$/,y="footer.draft";let s=null,K=!1;function _(){K||!window.R?.use||(K=!0,R.use((r,t,c)=>!k.test(t?.path||"")||k.test(r?.path||"")||!s?.dirty()?c():E.confirm("You have unsaved footer changes. Leave anyway? They are kept as a draft.").then(f=>{f?c():history.replaceState(null,"","#/footer")})),M.subscribe("router:afterChange",({to:r}={})=>{if(s&&!k.test(r?.path||"")){const t=s;s=null,t.dispose()}}))}export const footerView={templateUrl:"/admin/js/templates/footer.html",async onMount(r){_(),s?.dispose(),s=null;const t=r.get(0).querySelector(".stx"),c=E.loader(t,{type:"dots"});let f;try{f=await T.settings.get()}catch(e){E.toast(`Could not load the footer: ${e.message||e}`,{type:"error"});return}finally{c.destroy()}if(!t.isConnected)return;let g=!1;const n=()=>!g&&t.isConnected,C=B(f),l=Object.fromEntries(Object.entries(C).map(([e,o])=>[e,M.observable(o)])),u=()=>Object.fromEntries(Object.entries(l).map(([e,o])=>[e,o.value])),a=M.observable(C),d=M.computed(()=>m(u())!==m(a.value)),p=M.observable(!1),i=M.observable(""),h=[],b=()=>{try{S.remove?S.remove(y):S.set(y,null)}catch{}},j=e=>{for(const o of Object.keys(l))o in e&&(l[o].value=e[o])},D=()=>{if(d.peek())try{S.set(y,{form:u(),base:m(a.peek())})}catch{}};async function w(){if(p.peek())return;const e=Y(u())[0];if(e){i.value=e;return}p.value=!0,i.value="";const o=u();try{if(await T.settings.save(U(o)),!n())return;a.value=o,b(),E.toast("Footer saved.",{type:"success"})}catch(V){n()&&(i.value=V.message||"Could not save the footer.")}finally{p.value=!1}}async function x(){!await E.confirm("Throw away your unsaved footer changes?")||!n()||(j(a.peek()),b(),i.value="")}const P=M.applyBindings({...l,dirty:d,saving:p,errorText:i},t,{methods:{save:w,discard:x}});h.push(()=>P.dispose(),A(t,{position:"bottom"})),F(r,{id:"footer-view-site",icon:"external-link",title:"View site",onClick:()=>window.open("/","_blank","noopener")}),F(r,{id:"footer-save",icon:"save",title:"Save (Ctrl+S)",onClick:w});const L=e=>{!(e.ctrlKey||e.metaKey)||e.key!=="s"||(e.preventDefault(),e.stopImmediatePropagation(),w())},O=e=>{d.peek()&&(D(),e.preventDefault(),e.returnValue="")};document.addEventListener("keydown",L,!0),window.addEventListener("beforeunload",O),h.push(()=>document.removeEventListener("keydown",L,!0),()=>window.removeEventListener("beforeunload",O)),s={dirty:()=>d.peek(),dispose(){g=!0,D(),h.reverse().forEach(e=>{try{e()}catch{}})}},I.scan(t);let v;try{v=S.get(y)}catch{}if(v?.form){const e=v.base!==m(a.peek());await E.confirm(e?"The saved footer has changed. Restore your unsaved draft anyway?":"Restore your unsaved footer changes?")&&n()&&j(v.form),n()&&b()}}};
|