@morphemecms/cms 0.7.1 → 0.8.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 +12 -0
- package/defaults/collections.ts +56 -0
- package/defaults/company.ts +13 -4
- package/defaults/texts.ts +17 -0
- package/icons/lucide/LICENSE-phosphor +21 -0
- package/icons/lucide/facebook-logo.svg +1 -0
- package/icons/lucide/linkedin-logo.svg +1 -0
- package/icons/lucide/pack.json +16 -1
- package/icons/lucide/pinterest-logo.svg +1 -0
- package/icons/lucide/x-logo.svg +1 -0
- package/icons/material-symbols/LICENSE-phosphor +21 -0
- package/icons/material-symbols/facebook-logo.svg +1 -0
- package/icons/material-symbols/linkedin-logo.svg +1 -0
- package/icons/material-symbols/pack.json +15 -0
- package/icons/material-symbols/pinterest-logo.svg +1 -0
- package/icons/material-symbols/x-logo.svg +1 -0
- package/icons/phosphor/facebook-logo.svg +1 -0
- package/icons/phosphor/linkedin-logo.svg +1 -0
- package/icons/phosphor/pinterest-logo.svg +1 -0
- package/icons/phosphor/x-logo.svg +1 -0
- package/lib/lead.d.mts +5 -0
- package/lib/lead.mjs +10 -0
- package/lib/lead.test.mjs +65 -0
- package/package.json +2 -1
- package/scripts/icon-packs.mjs +51 -13
- package/scripts/material-fallback.test.mjs +49 -0
- package/site/icons.d.mts +13 -0
- package/site/icons.mjs +25 -3
- package/site/schema.ts +2 -0
- package/site/site.ts +9 -2
- package/site/social.d.mts +37 -0
- package/site/social.mjs +92 -0
- package/site/social.test.mjs +80 -0
- package/site/theme.d.mts +2 -0
- package/site/theme.mjs +24 -10
- package/site/themeImport.test.mjs +40 -0
- package/src/EntryForm.tsx +21 -58
- package/src/FormFrame.tsx +5 -5
- package/src/Parts.tsx +8 -30
- package/src/Screen.tsx +12 -5
- package/src/editor.css +70 -5
- package/src/i18n/da-DK/parts.ts +1 -1
- package/src/i18n/da-DK/theme.ts +4 -0
- package/src/i18n/en-US/parts.ts +1 -1
- package/src/i18n/en-US/theme.ts +4 -0
- package/src/icon.tsx +1 -1
- package/src/pagePreview.tsx +21 -1
- package/src/postLead.d.mts +7 -0
- package/src/postLead.mjs +9 -0
- package/src/postLead.test.mjs +28 -0
- package/src/ui.tsx +41 -96
- package/starter/package.json +1 -1
- package/starter/src/data/social.json +14 -0
- package/theme/components/PostAuthor.astro +20 -0
- package/theme/components/PostCard.tsx +26 -0
- package/theme/components/PostHeader.astro +36 -0
- package/theme/components/PostMeta.tsx +27 -2
- package/theme/components/RelatedPosts.astro +29 -0
- package/theme/components/ShareRow.astro +48 -0
- package/theme/layouts/PostLayout.astro +28 -54
- package/theme/styles/base.css +164 -127
- package/theme/styles/blocks.css +160 -155
- package/theme/styles/components.css +43 -34
- package/theme/styles/global.css +316 -303
- package/theme/styles/ui.css +43 -34
- package/theme/ui/copyLink.script.ts +17 -0
package/theme/styles/ui.css
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
+
Material is every theme's fallback: its rules that set more than custom properties sit in @layer fallback (declared last in
|
|
3
|
+
base.css), so a theme's own unlayered rules win over them, whatever the specificity. Custom properties stay unlayered.
|
|
4
|
+
|
|
2
5
|
The theme's UI components, named as Material 3 names them (m3.material.io/components): what the blocks, the apps and
|
|
3
6
|
the theme's own components (components/, layouts/) draw their controls with, through the parts in ../ui/ (Button.tsx,
|
|
4
7
|
IconButton.tsx) or, in an Astro component, their classes (buttonClass, iconButtonClass). Only the names, the kinds,
|
|
@@ -5387,9 +5390,11 @@
|
|
|
5387
5390
|
stroke-dashoffset: -99;
|
|
5388
5391
|
}
|
|
5389
5392
|
}
|
|
5390
|
-
@
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
+
@layer fallback {
|
|
5394
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
5395
|
+
.snackbar {
|
|
5396
|
+
animation: snackbar-in var(--motion-spatial);
|
|
5397
|
+
}
|
|
5393
5398
|
}
|
|
5394
5399
|
}
|
|
5395
5400
|
@keyframes snackbar-in {
|
|
@@ -5398,34 +5403,36 @@
|
|
|
5398
5403
|
transform: translateY(0.5rem);
|
|
5399
5404
|
}
|
|
5400
5405
|
}
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
.linear-progress-indicator-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5406
|
+
@layer fallback {
|
|
5407
|
+
/* Reduced motion: slowly, and a value at once. */
|
|
5408
|
+
@media (prefers-reduced-motion: reduce) {
|
|
5409
|
+
.loading-indicator-shape {
|
|
5410
|
+
animation: loading-indicator-turn 6s linear infinite;
|
|
5411
|
+
}
|
|
5412
|
+
.linear-progress-indicator-active,
|
|
5413
|
+
.linear-progress-indicator-track,
|
|
5414
|
+
.circular-progress-indicator-active,
|
|
5415
|
+
.circular-progress-indicator-track,
|
|
5416
|
+
.tooltip {
|
|
5417
|
+
transition: none;
|
|
5418
|
+
}
|
|
5419
|
+
.linear-progress-indicator-indeterminate > .linear-progress-indicator-active,
|
|
5420
|
+
.linear-progress-indicator-wavy.linear-progress-indicator-indeterminate .linear-progress-indicator-active,
|
|
5421
|
+
.circular-progress-indicator-indeterminate > svg,
|
|
5422
|
+
.circular-progress-indicator-indeterminate .circular-progress-indicator-active {
|
|
5423
|
+
animation-duration: 6s;
|
|
5424
|
+
}
|
|
5425
|
+
.linear-progress-indicator-indeterminate > .linear-progress-indicator-active + .linear-progress-indicator-active,
|
|
5426
|
+
.linear-progress-indicator-wavy.linear-progress-indicator-indeterminate
|
|
5427
|
+
.linear-progress-indicator-active
|
|
5428
|
+
+ .linear-progress-indicator-active {
|
|
5429
|
+
animation-delay: 3.3s;
|
|
5430
|
+
}
|
|
5431
|
+
/* A wavy one's wave stands still. */
|
|
5432
|
+
.linear-progress-indicator-wavy:not(.linear-progress-indicator-indeterminate) .linear-progress-indicator-active,
|
|
5433
|
+
.circular-progress-indicator-wavy:not(.circular-progress-indicator-indeterminate) .circular-progress-indicator-active {
|
|
5434
|
+
animation: none;
|
|
5435
|
+
}
|
|
5429
5436
|
}
|
|
5430
5437
|
}
|
|
5431
5438
|
|
|
@@ -6866,8 +6873,10 @@
|
|
|
6866
6873
|
opacity: 0;
|
|
6867
6874
|
}
|
|
6868
6875
|
}
|
|
6869
|
-
@
|
|
6870
|
-
|
|
6871
|
-
|
|
6876
|
+
@layer fallback {
|
|
6877
|
+
@media (prefers-reduced-motion: reduce) {
|
|
6878
|
+
.ripple-wave {
|
|
6879
|
+
animation: ripple-in 105ms linear;
|
|
6880
|
+
}
|
|
6872
6881
|
}
|
|
6873
6882
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// What a copy-link button (ShareRow.astro, [data-copy-link]) does on the site: it writes its address to the clipboard and
|
|
2
|
+
// says so in a snackbar (its text in data-copied). Run on every page by Base.astro (blockScripts, by `ui/copyLink`);
|
|
3
|
+
// without such a button on the page it does nothing.
|
|
4
|
+
import { snackbar } from '@morphemecms/cms/lib/snackbar';
|
|
5
|
+
|
|
6
|
+
export default function copyLinks() {
|
|
7
|
+
document.querySelectorAll<HTMLButtonElement>('button[data-copy-link]').forEach((button) => {
|
|
8
|
+
button.addEventListener('click', async () => {
|
|
9
|
+
try {
|
|
10
|
+
await navigator.clipboard.writeText(button.dataset.copyLink ?? '');
|
|
11
|
+
} catch {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
snackbar({ text: button.dataset.copied ?? '' });
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
}
|