@morphemecms/cms 0.12.0 → 0.13.0-next-20261106203613
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 +11 -0
- package/defaults/blockTexts.ts +9 -9
- package/defaults/collections.ts +257 -257
- package/defaults/colors.ts +74 -74
- package/defaults/company.ts +9 -9
- package/defaults/editor.ts +65 -65
- package/defaults/i18n/da-DK/blockTexts.ts +12 -0
- package/defaults/i18n/da-DK/collections.ts +220 -0
- package/defaults/i18n/da-DK/colors.ts +102 -0
- package/defaults/i18n/da-DK/company.ts +7 -0
- package/defaults/i18n/da-DK/editor.ts +13 -0
- package/defaults/i18n/da-DK/index.ts +31 -0
- package/defaults/i18n/da-DK/internalLinks.ts +12 -0
- package/defaults/i18n/da-DK/opens.ts +7 -0
- package/defaults/i18n/da-DK/popup.ts +9 -0
- package/defaults/i18n/da-DK/privacy.ts +38 -0
- package/defaults/i18n/da-DK/rules.ts +56 -0
- package/defaults/i18n/da-DK/sitedata.ts +8 -0
- package/defaults/i18n/da-DK/standard.ts +8 -0
- package/defaults/i18n/da-DK/standardPages.ts +17 -0
- package/defaults/internalLinks.ts +8 -8
- package/defaults/opens.ts +2 -2
- package/defaults/popup.tsx +7 -7
- package/defaults/privacy.ts +37 -37
- package/defaults/rules.ts +68 -66
- package/defaults/schema.ts +1 -1
- package/defaults/sitedata.ts +4 -4
- package/defaults/standard.ts +9 -6
- package/defaults/standardPages.ts +14 -14
- package/defaults/texts.ts +7 -510
- package/lib/appRoute.d.mts +2 -2
- package/lib/appRoute.mjs +3 -3
- package/lib/appRoute.test.mjs +8 -8
- package/lib/licenses.mjs +2 -2
- package/lib/licenses.owner.test.mjs +9 -0
- package/lib/menu.mjs +4 -4
- package/lib/menu.test.mjs +101 -101
- package/lib/scheduled.mjs +1 -1
- package/lib/storeEntries.test.mjs +3 -0
- package/lib/translate.d.mts +11 -0
- package/lib/translate.mjs +13 -1
- package/lib/translate.test.mjs +23 -2
- package/package.json +1 -1
- package/scripts/app-screenshots.mjs +7 -7
- package/scripts/check-content.mjs +10 -1
- package/scripts/check-language.mjs +0 -1
- package/scripts/editor-screens.mjs +3 -3
- package/site/defineSite.mjs +2 -2
- package/site/schema.ts +3 -3
- package/src/Advanced.tsx +2 -2
- package/src/App.tsx +78 -77
- package/src/AppAdds.tsx +1 -1
- package/src/AppList.tsx +15 -15
- package/src/BlockDialog.tsx +1 -1
- package/src/BlockParts.tsx +6 -6
- package/src/BlockSettings.tsx +2 -2
- package/src/BrandForm.tsx +2 -2
- package/src/Colors.tsx +6 -6
- package/src/CompanyForm.tsx +1 -1
- package/src/Consents.tsx +3 -3
- package/src/DataForm.tsx +3 -3
- package/src/Deleted.tsx +3 -3
- package/src/EditorFooter.tsx +2 -2
- package/src/EntryForm.tsx +2 -2
- package/src/FooterSettings.tsx +2 -2
- package/src/HeaderSettings.tsx +3 -3
- package/src/Keywords.tsx +5 -5
- package/src/Library.tsx +71 -71
- package/src/Licenses.tsx +8 -8
- package/src/MainDrawerParts.tsx +3 -3
- package/src/MainMenu.tsx +1 -1
- package/src/Media.tsx +7 -7
- package/src/MediaTags.tsx +2 -2
- package/src/Notifications.tsx +2 -2
- package/src/Parts.tsx +17 -17
- package/src/Redirects.tsx +8 -8
- package/src/Screen.tsx +3 -3
- package/src/SeoScores.tsx +6 -6
- package/src/SideColumn.tsx +2 -2
- package/src/StartFab.tsx +2 -2
- package/src/ThemeStore.tsx +4 -4
- package/src/Tokens.tsx +2 -2
- package/src/apps.ts +5 -5
- package/src/checkSite.ts +86 -20
- package/src/editor.css +4 -16
- package/src/examples.ts +1 -1
- package/src/fabScreens.test.mjs +4 -4
- package/src/fabScreens.ts +4 -4
- package/src/i18n/da-DK/library.ts +2 -2
- package/src/i18n/da-DK/text.ts +1 -1
- package/src/i18n/en-US/apps.ts +1 -1
- package/src/i18n/en-US/common.ts +8 -8
- package/src/i18n/en-US/library.ts +5 -5
- package/src/i18n/en-US/parts.ts +3 -3
- package/src/i18n/en-US/text.ts +1 -1
- package/src/i18n/index.ts +4 -8
- package/src/images.ts +2 -2
- package/src/licenseData.ts +3 -3
- package/src/menuChildren.ts +5 -5
- package/src/movedRoutes.d.mts +8 -1
- package/src/movedRoutes.mjs +100 -19
- package/src/movedRoutes.test.mjs +123 -6
- package/src/nav.ts +1 -1
- package/src/notificationData.ts +1 -1
- package/src/schema.ts +2 -2
- package/src/site.ts +37 -13
- package/src/standard/accordion/index.tsx +1 -1
- package/src/standard/accordion/shared.ts +1 -1
- package/src/standard/buttons/index.tsx +1 -1
- package/src/standard/cards/index.tsx +1 -1
- package/src/standard/cards/shared.ts +1 -1
- package/src/standard/cookies/index.tsx +1 -1
- package/src/standard/posts/index.tsx +1 -1
- package/src/standard/testimonials/index.tsx +1 -1
- package/src/standard/testimonials/list.ts +1 -1
- package/src/store.ts +4 -4
- package/src/tagUses.d.mts +1 -1
- package/src/tagUses.mjs +2 -2
- package/src/tagUses.test.mjs +1 -1
- package/src/ui.tsx +7 -7
- package/theme/layouts/Base.astro +2 -2
package/defaults/colors.ts
CHANGED
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
// A site's
|
|
1
|
+
// A site's colors under "Settings › Colors" (packages/editor/src/Colors.tsx): the colors there
|
|
2
2
|
// are, by their CSS variable in the theme (without "--"), the pairs that must be readable
|
|
3
|
-
// (WCAG AA, checked before a save and before the build), and the
|
|
4
|
-
// ("
|
|
5
|
-
//
|
|
3
|
+
// (WCAG AA, checked before a save and before the build), and the colors a site has until it is given its own
|
|
4
|
+
// ("Use standard colors"), and the Material color role each takes when they are made from one source
|
|
5
|
+
// color (dynamic color, @morphemecms/cms/lib/dynamic-colors.ts). The colors themselves are in
|
|
6
6
|
// src/data/colors.json (config.colors).
|
|
7
7
|
import type { ColorPair, Colors } from '../lib/colors';
|
|
8
8
|
import { dynamicColors, type ColorRoles } from '../lib/dynamic-colors';
|
|
9
9
|
|
|
10
|
-
/** The
|
|
10
|
+
/** The colors, in the order they are shown, with what they are used for. */
|
|
11
11
|
export const colorFields: { name: string; label: string; hint: string }[] = [
|
|
12
|
-
{ name: 'bg', label: '
|
|
13
|
-
{ name: 'surface', label: '
|
|
14
|
-
{ name: 'surface-container-lowest', label: '
|
|
15
|
-
{ name: 'surface-container-low', label: '
|
|
16
|
-
{ name: 'surface-container', label: '
|
|
17
|
-
{ name: 'surface-container-high', label: '
|
|
18
|
-
{ name: 'surface-container-highest', label: '
|
|
19
|
-
{ name: 'inverse-surface', label: '
|
|
20
|
-
{ name: 'inverse-on-surface', label: '
|
|
21
|
-
{ name: 'inverse-primary', label: '
|
|
22
|
-
{ name: 'tint', label: '
|
|
23
|
-
{ name: 'ink', label: '
|
|
24
|
-
{ name: 'muted', label: '
|
|
25
|
-
{ name: 'line', label: '
|
|
26
|
-
{ name: 'outline', label: '
|
|
27
|
-
{ name: 'accent', label: '
|
|
28
|
-
{ name: 'accent-hover', label: '
|
|
29
|
-
{ name: 'on-accent', label: '
|
|
30
|
-
{ name: 'accent-container', label: '
|
|
31
|
-
{ name: 'on-accent-container', label: '
|
|
32
|
-
{ name: 'secondary', label: '
|
|
33
|
-
{ name: 'on-secondary', label: '
|
|
34
|
-
{ name: 'secondary-container', label: '
|
|
35
|
-
{ name: 'on-secondary-container', label: '
|
|
36
|
-
{ name: 'tertiary', label: '
|
|
37
|
-
{ name: 'on-tertiary', label: '
|
|
38
|
-
{ name: 'tertiary-container', label: '
|
|
39
|
-
{ name: 'on-tertiary-container', label: '
|
|
40
|
-
{ name: 'error', label: '
|
|
41
|
-
{ name: 'on-error', label: '
|
|
42
|
-
{ name: 'error-container', label: '
|
|
43
|
-
{ name: 'on-error-container', label: '
|
|
12
|
+
{ name: 'bg', label: 'Background', hint: 'Behind the whole page.' },
|
|
13
|
+
{ name: 'surface', label: 'Surfaces', hint: 'Cards, fields, and menus.' },
|
|
14
|
+
{ name: 'surface-container-lowest', label: 'Surface (lowest)', hint: 'Surfaces with the least emphasis.' },
|
|
15
|
+
{ name: 'surface-container-low', label: 'Surface (low)', hint: 'Cards with a shadow, blocks, and sheets.' },
|
|
16
|
+
{ name: 'surface-container', label: 'Surface (medium)', hint: 'Menus and bars.' },
|
|
17
|
+
{ name: 'surface-container-high', label: 'Surface (high)', hint: 'Dialogs and the search field.' },
|
|
18
|
+
{ name: 'surface-container-highest', label: 'Surface (highest)', hint: 'Filled cards, fields, and switches.' },
|
|
19
|
+
{ name: 'inverse-surface', label: 'Inverse surface', hint: 'Messages at the bottom and short tooltips.' },
|
|
20
|
+
{ name: 'inverse-on-surface', label: 'Text on inverse surface', hint: 'The text and icons on the inverse surface.' },
|
|
21
|
+
{ name: 'inverse-primary', label: 'Accent color on inverse surface', hint: 'The buttons on the messages at the bottom.' },
|
|
22
|
+
{ name: 'tint', label: 'Light color', hint: 'Light boxes and highlights.' },
|
|
23
|
+
{ name: 'ink', label: 'Text', hint: 'All regular text and headings.' },
|
|
24
|
+
{ name: 'muted', label: 'Muted text', hint: 'Subtitles, dates, and notes.' },
|
|
25
|
+
{ name: 'line', label: 'Lines', hint: 'Dividers and the edge around cards.' },
|
|
26
|
+
{ name: 'outline', label: 'Outlines', hint: 'The edge around fields, buttons, and chips.' },
|
|
27
|
+
{ name: 'accent', label: 'Accent color', hint: 'Buttons, links, icons, and the logo.' },
|
|
28
|
+
{ name: 'accent-hover', label: 'Accent color on hover', hint: 'A button the pointer is over: a little darker (lighter in dark mode).' },
|
|
29
|
+
{ name: 'on-accent', label: 'Text on accent color', hint: 'The text on the buttons.' },
|
|
30
|
+
{ name: 'accent-container', label: 'Light accent color', hint: 'Buttons and surfaces in a light version of the accent color.' },
|
|
31
|
+
{ name: 'on-accent-container', label: 'Text on light accent color', hint: 'The text and icons on the light accent color.' },
|
|
32
|
+
{ name: 'secondary', label: 'Secondary color', hint: 'Buttons in a different color than the accent color.' },
|
|
33
|
+
{ name: 'on-secondary', label: 'Text on secondary color', hint: 'The text and icons on the secondary color.' },
|
|
34
|
+
{ name: 'secondary-container', label: 'Light secondary color', hint: 'Buttons and surfaces in a light version of the secondary color.' },
|
|
35
|
+
{ name: 'on-secondary-container', label: 'Text on light secondary color', hint: 'The text and icons on the light secondary color.' },
|
|
36
|
+
{ name: 'tertiary', label: 'Tertiary color', hint: 'Buttons in a third color that stands out from the other two.' },
|
|
37
|
+
{ name: 'on-tertiary', label: 'Text on tertiary color', hint: 'The text and icons on the tertiary color.' },
|
|
38
|
+
{ name: 'tertiary-container', label: 'Light tertiary color', hint: 'Buttons and surfaces in a light version of the tertiary color.' },
|
|
39
|
+
{ name: 'on-tertiary-container', label: 'Text on light tertiary color', hint: 'The text and icons on the light tertiary color.' },
|
|
40
|
+
{ name: 'error', label: 'Error color', hint: 'Errors in fields and badges.' },
|
|
41
|
+
{ name: 'on-error', label: 'Text on error color', hint: 'The text and icons on the error color.' },
|
|
42
|
+
{ name: 'error-container', label: 'Light error color', hint: 'Surfaces in a light version of the error color.' },
|
|
43
|
+
{ name: 'on-error-container', label: 'Text on light error color', hint: 'The text and icons on the light error color.' },
|
|
44
44
|
];
|
|
45
45
|
|
|
46
46
|
/** The text and its background that must be readable, in both modes. */
|
|
47
47
|
export const colorPairs: ColorPair[] = [
|
|
48
|
-
{ text: 'ink', on: 'bg', what: '
|
|
49
|
-
{ text: 'ink', on: 'surface', what: '
|
|
50
|
-
{ text: 'ink', on: 'tint', what: '
|
|
51
|
-
{ text: 'muted', on: 'bg', what: '
|
|
52
|
-
{ text: 'muted', on: 'surface', what: '
|
|
53
|
-
{ text: 'muted', on: 'tint', what: '
|
|
54
|
-
{ text: 'ink', on: 'surface-container-lowest', what: '
|
|
55
|
-
{ text: 'ink', on: 'surface-container-low', what: '
|
|
56
|
-
{ text: 'ink', on: 'surface-container', what: '
|
|
57
|
-
{ text: 'ink', on: 'surface-container-high', what: '
|
|
58
|
-
{ text: 'ink', on: 'surface-container-highest', what: '
|
|
59
|
-
{ text: 'muted', on: 'surface-container-lowest', what: '
|
|
60
|
-
{ text: 'muted', on: 'surface-container-low', what: '
|
|
61
|
-
{ text: 'muted', on: 'surface-container', what: '
|
|
62
|
-
{ text: 'muted', on: 'surface-container-high', what: '
|
|
63
|
-
{ text: 'muted', on: 'surface-container-highest', what: '
|
|
64
|
-
{ text: 'accent', on: 'bg', what: 'Links
|
|
65
|
-
{ text: 'accent', on: 'surface', what: 'Links
|
|
66
|
-
{ text: 'accent', on: 'tint', what: '
|
|
67
|
-
{ text: 'accent', on: 'surface-container-low', what: 'Links
|
|
68
|
-
{ text: 'on-accent', on: 'accent', what: '
|
|
69
|
-
{ text: 'on-accent', on: 'accent-hover', what: '
|
|
70
|
-
{ text: 'on-accent-container', on: 'accent-container', what: '
|
|
71
|
-
{ text: 'on-secondary', on: 'secondary', what: '
|
|
72
|
-
{ text: 'on-secondary-container', on: 'secondary-container', what: '
|
|
73
|
-
{ text: 'on-tertiary', on: 'tertiary', what: '
|
|
74
|
-
{ text: 'on-tertiary-container', on: 'tertiary-container', what: '
|
|
75
|
-
{ text: 'error', on: 'bg', what: '
|
|
76
|
-
{ text: 'error', on: 'surface-container-highest', what: '
|
|
77
|
-
{ text: 'on-error', on: 'error', what: '
|
|
78
|
-
{ text: 'on-error-container', on: 'error-container', what: '
|
|
79
|
-
{ text: 'inverse-on-surface', on: 'inverse-surface', what: '
|
|
80
|
-
{ text: 'inverse-primary', on: 'inverse-surface', what: '
|
|
48
|
+
{ text: 'ink', on: 'bg', what: 'Text on the background' },
|
|
49
|
+
{ text: 'ink', on: 'surface', what: 'Text on surfaces' },
|
|
50
|
+
{ text: 'ink', on: 'tint', what: 'Text in light boxes' },
|
|
51
|
+
{ text: 'muted', on: 'bg', what: 'Muted text on the background' },
|
|
52
|
+
{ text: 'muted', on: 'surface', what: 'Muted text on surfaces' },
|
|
53
|
+
{ text: 'muted', on: 'tint', what: 'Muted text in light boxes' },
|
|
54
|
+
{ text: 'ink', on: 'surface-container-lowest', what: 'Text on the lowest surface' },
|
|
55
|
+
{ text: 'ink', on: 'surface-container-low', what: 'Text on the low surface' },
|
|
56
|
+
{ text: 'ink', on: 'surface-container', what: 'Text on the medium surface' },
|
|
57
|
+
{ text: 'ink', on: 'surface-container-high', what: 'Text on the high surface' },
|
|
58
|
+
{ text: 'ink', on: 'surface-container-highest', what: 'Text on the highest surface' },
|
|
59
|
+
{ text: 'muted', on: 'surface-container-lowest', what: 'Muted text on the lowest surface' },
|
|
60
|
+
{ text: 'muted', on: 'surface-container-low', what: 'Muted text on the low surface' },
|
|
61
|
+
{ text: 'muted', on: 'surface-container', what: 'Muted text on the medium surface' },
|
|
62
|
+
{ text: 'muted', on: 'surface-container-high', what: 'Muted text on the high surface' },
|
|
63
|
+
{ text: 'muted', on: 'surface-container-highest', what: 'Muted text on the highest surface' },
|
|
64
|
+
{ text: 'accent', on: 'bg', what: 'Links on the background' },
|
|
65
|
+
{ text: 'accent', on: 'surface', what: 'Links on surfaces' },
|
|
66
|
+
{ text: 'accent', on: 'tint', what: 'The accent color in light boxes' },
|
|
67
|
+
{ text: 'accent', on: 'surface-container-low', what: 'Links on the low surface' },
|
|
68
|
+
{ text: 'on-accent', on: 'accent', what: 'Text on buttons' },
|
|
69
|
+
{ text: 'on-accent', on: 'accent-hover', what: 'Text on buttons on hover' },
|
|
70
|
+
{ text: 'on-accent-container', on: 'accent-container', what: 'Text on the light accent color' },
|
|
71
|
+
{ text: 'on-secondary', on: 'secondary', what: 'Text on the secondary color' },
|
|
72
|
+
{ text: 'on-secondary-container', on: 'secondary-container', what: 'Text on the light secondary color' },
|
|
73
|
+
{ text: 'on-tertiary', on: 'tertiary', what: 'Text on the tertiary color' },
|
|
74
|
+
{ text: 'on-tertiary-container', on: 'tertiary-container', what: 'Text on the light tertiary color' },
|
|
75
|
+
{ text: 'error', on: 'bg', what: 'Errors on the background' },
|
|
76
|
+
{ text: 'error', on: 'surface-container-highest', what: 'Errors in filled fields' },
|
|
77
|
+
{ text: 'on-error', on: 'error', what: 'Text on the error color' },
|
|
78
|
+
{ text: 'on-error-container', on: 'error-container', what: 'Text on the light error color' },
|
|
79
|
+
{ text: 'inverse-on-surface', on: 'inverse-surface', what: 'Text on the inverse surface' },
|
|
80
|
+
{ text: 'inverse-primary', on: 'inverse-surface', what: 'Buttons on the inverse surface' },
|
|
81
81
|
];
|
|
82
82
|
|
|
83
|
-
/** The Material
|
|
83
|
+
/** The Material color role of each color, for dynamic color: the page on Material's surface, cards a step
|
|
84
84
|
* lighter (white in light mode), the light boxes on a higher container, so text and links can be read on them at
|
|
85
|
-
* every contrast level, Material's surface containers, inverse
|
|
86
|
-
* theme's parts take them, as Material 3's do), buttons and links in the primary
|
|
85
|
+
* every contrast level, Material's surface containers, inverse colors, outline and error colors as themselves (the
|
|
86
|
+
* theme's parts take them, as Material 3's do), buttons and links in the primary color, and the other colors of the scheme (Material 3's
|
|
87
87
|
* containers, secondary and tertiary: the FABs and their menus) as their own roles. */
|
|
88
88
|
export const colorRoles: ColorRoles = {
|
|
89
89
|
bg: 'surface',
|
|
@@ -120,6 +120,6 @@ export const colorRoles: ColorRoles = {
|
|
|
120
120
|
'on-error-container': 'onErrorContainer',
|
|
121
121
|
};
|
|
122
122
|
|
|
123
|
-
/** The
|
|
123
|
+
/** The colors a site has until it is given its own ("Use standard colors"): Material 3's scheme of a blue (tonal
|
|
124
124
|
* spot), as the app store's pictures are taken with (packages/editor/scripts/app-screenshots.mjs). */
|
|
125
125
|
export const defaultColors: Colors = dynamicColors({ source: '#1a73e8', variant: 'tonalSpot', contrast: 'standard' }, colorRoles);
|
package/defaults/company.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
// "
|
|
2
|
-
// (src/data/contact.json) and its bank details (src/data/payment.json, under "
|
|
1
|
+
// "Business": the business, in parts, each a screen of its own (CompanyForm.tsx): its phone, e-mail and address
|
|
2
|
+
// (src/data/contact.json) and its bank details (src/data/payment.json, under "Payment", where a site may add its
|
|
3
3
|
// other ways to pay, and where the settings of the apps installed that are a way to pay come after, as MobilePay's),
|
|
4
4
|
// used all over the site; and its social media (src/data/social.json): the profiles and the post's share buttons.
|
|
5
|
-
// The logo and the icon are under "
|
|
5
|
+
// The logo and the icon are under "Appearance" (BrandForm.tsx); the link to the calendar in Calendly is the app Calendly's (morpheme-apps/apps/calendly/).
|
|
6
6
|
import { AddressBook, Bank, CreditCard, ShareNetwork } from '@phosphor-icons/react';
|
|
7
7
|
import type { Part } from '../src/schema';
|
|
8
8
|
import { bankFields, contactFields, socialFields } from '@site/collections';
|
|
9
9
|
|
|
10
|
-
/** The parts of "
|
|
10
|
+
/** The parts of "Business", in their order, at #company/<id> ("Payment"'s at #company/payment/<id>). */
|
|
11
11
|
export const companyParts: Part[] = [
|
|
12
|
-
{ id: '
|
|
12
|
+
{ id: 'contact', label: 'Contact', icon: AddressBook, file: 'src/data/contact.json', fields: contactFields },
|
|
13
13
|
{
|
|
14
|
-
id: '
|
|
15
|
-
label: '
|
|
14
|
+
id: 'social-media',
|
|
15
|
+
label: 'Social media',
|
|
16
16
|
icon: ShareNetwork,
|
|
17
17
|
file: 'src/data/social.json',
|
|
18
18
|
fields: socialFields,
|
|
@@ -20,8 +20,8 @@ export const companyParts: Part[] = [
|
|
|
20
20
|
defaults: { shareFacebook: true, shareX: true, shareLinkedin: true, sharePinterest: true, shareCopyLink: true },
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
id: '
|
|
24
|
-
label: '
|
|
23
|
+
id: 'payment',
|
|
24
|
+
label: 'Payment',
|
|
25
25
|
icon: CreditCard,
|
|
26
26
|
apps: ['payment'],
|
|
27
27
|
parts: [{ id: 'bank', label: 'Bank', icon: Bank, file: 'src/data/payment.json', fields: bankFields }],
|
package/defaults/editor.ts
CHANGED
|
@@ -4,20 +4,20 @@
|
|
|
4
4
|
// may take the standard one from @morphemecms/cms/defaults/<file> and add its own.
|
|
5
5
|
// collections the parts of the site and their fields (collections.ts)
|
|
6
6
|
// groups, settings, lists, header, icons the menu and the start screen
|
|
7
|
-
// appearance the site's own parts under "
|
|
8
|
-
// companyParts, blockParts the screens under "
|
|
7
|
+
// appearance the site's own parts under "Appearance", after the logo and icon ("Default pages")
|
|
8
|
+
// companyParts, blockParts the screens under "Business" and "Blocks" (company.ts, blockTexts.ts)
|
|
9
9
|
// partScreens parts of the start screen that are screens with parts of their own (privacy.ts)
|
|
10
|
-
// seoParts the site's own parts under "
|
|
10
|
+
// seoParts the site's own parts under "Search engine optimization" (#seo/<id>), in the menu under "Content" (internalLinks.ts)
|
|
11
11
|
// relationsOf, usedBy, keptBy what a field picks from, what cannot be deleted, and what cannot be saved so (rules.ts)
|
|
12
12
|
// siteProblems what is wrong by the site's own rules, before it is built (rules.ts)
|
|
13
|
-
// usesOf, countsOf the places that use an entry (a tag's "
|
|
13
|
+
// usesOf, countsOf the places that use an entry (a tag's "Used on") and their number at it in its list (rules.ts)
|
|
14
14
|
// testimonialsOf the testimonials the blocks show (rules.ts)
|
|
15
15
|
// siteOf what the blocks' previews show from the rest of the site (sitedata.ts)
|
|
16
16
|
// fixedPages, everyFixedPage how the front page's sections look in the editor (the theme's editor/previews.tsx)
|
|
17
17
|
// sectionLooks, headingLooks how the text of the front page looks in the editor (the theme's editor/looks.mjs)
|
|
18
18
|
// standardPages, standardPaths, frontLeads the front page, the blog page, the 404 page and the others, and how the front page is
|
|
19
19
|
// written (standardPages.ts)
|
|
20
|
-
// colorFields, colorPairs, colorRoles, defaultColors the
|
|
20
|
+
// colorFields, colorPairs, colorRoles, defaultColors the colors under "Colors" and their Material roles (colors.ts)
|
|
21
21
|
// siteName the title of the start screen and the way back to it
|
|
22
22
|
// sharing what a page shared on social media shows when it has nothing of its own (Base.astro)
|
|
23
23
|
import {
|
|
@@ -67,7 +67,7 @@ export { config };
|
|
|
67
67
|
import { collections, standardPageFieldsOf } from '@site/collections';
|
|
68
68
|
import { drawActionBar, drawPopup } from '@site/popup';
|
|
69
69
|
|
|
70
|
-
// A pop-up and an action bar ("
|
|
70
|
+
// A pop-up and an action bar ("Promotion") drawn beside their form (popup.tsx), and an app's kind with a
|
|
71
71
|
// part in the pop-up's box (Mailchimp's signup: drawPart; an app's other kinds have their own drawing). Set here, as
|
|
72
72
|
// collections.ts is also read by packages/editor/scripts/editor-roundtrip.mjs in plain Node, which cannot read JSX.
|
|
73
73
|
const promotions = collections.find((c) => c.id === 'popups');
|
|
@@ -85,20 +85,20 @@ export { HEADINGS as headingLooks, LOOKS as sectionLooks } from '@theme/editor/l
|
|
|
85
85
|
export { frontLeads, standardPages, standardPaths, type StandardPage } from '@site/standardPages';
|
|
86
86
|
export { colorFields, colorPairs, colorRoles, defaultColors } from '@site/colors';
|
|
87
87
|
|
|
88
|
-
/** Parts of the start screen that are a screen with parts, each a screen of its own: "
|
|
88
|
+
/** Parts of the start screen that are a screen with parts, each a screen of its own: "Privacy" (privacy.ts). The
|
|
89
89
|
* settings of the apps, also those that measure (Google Analytics …) or add a kind of promotion (Calendly, Mailchimp),
|
|
90
90
|
* are on their own app pages under "Apps" (AppList.tsx settingsRoute). */
|
|
91
91
|
export const partScreens: PartScreen[] = [privacy];
|
|
92
92
|
|
|
93
|
-
/** The site's own parts under "
|
|
94
|
-
* "
|
|
93
|
+
/** The site's own parts under "Search engine optimization", each a screen of its own at #seo/<id>, after the editor's
|
|
94
|
+
* "Redirects": "Internal links" (internalLinks.ts). */
|
|
95
95
|
export const seoParts = [internalLinks];
|
|
96
96
|
|
|
97
97
|
/** The title of the start screen, and of the way back to it on every other screen. */
|
|
98
98
|
export const siteName = site.name;
|
|
99
99
|
|
|
100
100
|
/** What a page shared on social media shows when it has nothing of its own (Base.astro): the site's name after its
|
|
101
|
-
* title, its description and its picture (the owner's, config.picture). For the preview under "
|
|
101
|
+
* title, its description and its picture (the owner's, config.picture). For the preview under "Social media" (sharedAs in seo.ts). */
|
|
102
102
|
export const sharing = { name: site.name, description: site.description, picture: site.portrait };
|
|
103
103
|
|
|
104
104
|
/** The icon of each part on the start screen and in the sidebar, by its id. */
|
|
@@ -108,45 +108,45 @@ export const icons: Record<string, Icon> = {
|
|
|
108
108
|
pages: FileText,
|
|
109
109
|
header: Browser,
|
|
110
110
|
menu: ListIcon,
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
'mobile-menu': DeviceMobile,
|
|
112
|
+
tags: Tag,
|
|
113
113
|
popups: Megaphone,
|
|
114
|
-
|
|
114
|
+
company: Buildings,
|
|
115
115
|
// The sections of the main menu that are not also a part.
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
content: Article,
|
|
117
|
+
global: GlobeSimple,
|
|
118
|
+
settings: GearSix,
|
|
119
|
+
blocks: SquaresFour,
|
|
120
|
+
files: FolderSimple,
|
|
121
|
+
privacy: ShieldCheck,
|
|
122
|
+
lists: ListChecks,
|
|
123
123
|
footer: SquareHalfBottom,
|
|
124
124
|
seo: MagnifyingGlass,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
redirects: Signpost,
|
|
126
|
+
appearance: PaintBrushBroad,
|
|
127
|
+
'block-settings': ToggleRight,
|
|
128
128
|
apps: PuzzlePiece,
|
|
129
129
|
appstore: Storefront,
|
|
130
130
|
morpheme: Sparkle,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
// The screens under "
|
|
134
|
-
|
|
135
|
-
|
|
131
|
+
advanced: Wrench,
|
|
132
|
+
licenses: Certificate,
|
|
133
|
+
// The screens under "Appearance" (Library.tsx Theme).
|
|
134
|
+
themes: Swatches,
|
|
135
|
+
colors: Palette,
|
|
136
136
|
logo: Sticker,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
137
|
+
'icon-packs': Smiley,
|
|
138
|
+
motion: WaveSine,
|
|
139
|
+
'side-column': SidebarSimple,
|
|
140
|
+
parts: Shapes,
|
|
141
141
|
};
|
|
142
142
|
|
|
143
|
-
/** The site's own parts under "
|
|
144
|
-
* "
|
|
145
|
-
* (standardPageFieldsOf in collections.ts; the privacy policy and the cookie policy are under "
|
|
143
|
+
/** The site's own parts under "Appearance" (#appearance), after the logo and icon, each a screen of its own at #appearance/<id>:
|
|
144
|
+
* "Default pages", which pages are the front page, the blog page, the 404 page and the contact page, as a list
|
|
145
|
+
* (standardPageFieldsOf in collections.ts; the privacy policy and the cookie policy are under "Privacy", privacy.ts). */
|
|
146
146
|
export const appearance: Part[] = [
|
|
147
147
|
{
|
|
148
|
-
id: '
|
|
149
|
-
label: '
|
|
148
|
+
id: 'default-pages',
|
|
149
|
+
label: 'Default pages',
|
|
150
150
|
icon: House,
|
|
151
151
|
file: config.standardPages,
|
|
152
152
|
fields: standardPageFieldsOf('front', 'blog', 'notFound', 'contact'),
|
|
@@ -154,44 +154,44 @@ export const appearance: Part[] = [
|
|
|
154
154
|
},
|
|
155
155
|
];
|
|
156
156
|
|
|
157
|
-
// The editor's menu: eight sections in a fixed order, shown in the order written here, never A
|
|
157
|
+
// The editor's menu: eight sections in a fixed order, shown in the order written here, never A–Z. "Dashboard" is a link to the
|
|
158
158
|
// start screen (`href`) without a list; the others have a list of parts, each an id: the content the owner writes and
|
|
159
|
-
// uploads ("
|
|
160
|
-
// and "
|
|
161
|
-
// "
|
|
162
|
-
// and "appstore"), the blocks ("
|
|
163
|
-
// looks ("
|
|
164
|
-
// (appearance) and the editor's parts: Colors.tsx, BrandForm.tsx and Parts.tsx), the parts of "
|
|
165
|
-
// and the settings of the whole site ("
|
|
166
|
-
// Each part is a collection (collections.ts), except those named above, "
|
|
167
|
-
// "
|
|
168
|
-
// and "
|
|
169
|
-
const settingsIds = ['morpheme', '
|
|
159
|
+
// uploads ("Content": the pages, the blog, the short lists, the pop-ups, the tags, the files, "internal links" (seoParts)
|
|
160
|
+
// and "redirects", Redirects.tsx), what is on every page ("Globals": the header with the menus, the footer and
|
|
161
|
+
// "Business": name, contact and booking), the apps ("Apps": the apps that come with the site, src/apps/, AppList.tsx,
|
|
162
|
+
// and "appstore"), the blocks ("Blocks": their shared texts, and "Block selection", which of them can be put in), how the site
|
|
163
|
+
// looks ("Appearance": the theme, the icon packs, the motion, the side column (SideColumn.tsx), the colors, the logo and icon, the standard pages
|
|
164
|
+
// (appearance) and the editor's parts: Colors.tsx, BrandForm.tsx and Parts.tsx), the parts of "Privacy" (privacy.ts)
|
|
165
|
+
// and the settings of the whole site ("Settings").
|
|
166
|
+
// Each part is a collection (collections.ts), except those named above, "privacy"'s (partScreens) and the editor's own
|
|
167
|
+
// "company" (companyParts), "blocks" (blockParts), id files (the pictures, PDFs, videos and zip files), "header", "lists"
|
|
168
|
+
// and "block-settings" (BlockSettings.tsx).
|
|
169
|
+
const settingsIds = ['morpheme', 'advanced'];
|
|
170
170
|
export const groups: { id: string; title: string; href?: string; ids: string[] }[] = [
|
|
171
|
-
{ id: 'home', title: '
|
|
171
|
+
{ id: 'home', title: 'Dashboard', href: '#', ids: [] },
|
|
172
172
|
{
|
|
173
|
-
id: '
|
|
174
|
-
title: '
|
|
175
|
-
ids: ['pages', 'blog', '
|
|
173
|
+
id: 'content',
|
|
174
|
+
title: 'Content',
|
|
175
|
+
ids: ['pages', 'blog', 'lists', 'popups', 'tags', 'files', internalLinks.id, 'redirects'],
|
|
176
176
|
},
|
|
177
|
-
{ id: '
|
|
177
|
+
{ id: 'global', title: 'Globals', ids: ['header', 'footer', 'company'] },
|
|
178
178
|
{ id: 'apps', title: 'Apps', ids: ['apps', 'appstore'] },
|
|
179
|
-
{ id: '
|
|
179
|
+
{ id: 'blocks', title: 'Blocks', ids: ['blocks', 'block-settings'] },
|
|
180
180
|
{
|
|
181
|
-
id: '
|
|
182
|
-
title: '
|
|
183
|
-
ids: ['
|
|
181
|
+
id: 'appearance',
|
|
182
|
+
title: 'Appearance',
|
|
183
|
+
ids: ['themes', 'icon-packs', 'motion', 'side-column', 'colors', 'logo', ...appearance.map((p) => p.id), 'parts'],
|
|
184
184
|
},
|
|
185
|
-
{ id: '
|
|
186
|
-
{ id: '
|
|
185
|
+
{ id: 'privacy', title: 'Privacy', ids: privacy.parts.map((p) => p.id) },
|
|
186
|
+
{ id: 'settings', title: 'Settings', ids: settingsIds },
|
|
187
187
|
];
|
|
188
188
|
|
|
189
|
-
/** The settings of the whole site: the ids of the last section, "
|
|
189
|
+
/** The settings of the whole site: the ids of the last section, "Settings", written once. */
|
|
190
190
|
export const settings: string[] = settingsIds;
|
|
191
191
|
|
|
192
|
-
/** The site's own short lists, on a screen of their own under "
|
|
193
|
-
* bring ("
|
|
192
|
+
/** The site's own short lists, on a screen of their own under "Lists" (#lists), with those the standard blocks
|
|
193
|
+
* bring ("Testimonials") and the apps (their lists.ts). */
|
|
194
194
|
export const lists: string[] = [];
|
|
195
195
|
|
|
196
|
-
/** What is in the header on every page, on one screen under "
|
|
197
|
-
export const header = ['menu', '
|
|
196
|
+
/** What is in the header on every page, on one screen under "Appearance" › "Header" (#appearance/header, HeaderSettings.tsx). */
|
|
197
|
+
export const header = ['menu', 'mobile-menu', 'header-button'];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// The Danish of defaults/blockTexts.ts: its English texts (the keys) in Danish (the values), as the editor
|
|
2
|
+
// showed them before the switch to English. Joined in defaults/i18n/da-DK/index.ts.
|
|
3
|
+
|
|
4
|
+
export const blockTexts: Record<string, string> = {
|
|
5
|
+
'Block templates': 'Blokskabeloner',
|
|
6
|
+
'Book an appointment': 'Book en tid',
|
|
7
|
+
Heading: 'Overskrift',
|
|
8
|
+
Text: 'Tekst',
|
|
9
|
+
'Button text (book)': 'Knaptekst (book)',
|
|
10
|
+
'Button text (call)': 'Knaptekst (ring)',
|
|
11
|
+
'The phone number is shown after the text.': 'Telefonnummeret vises efter teksten.',
|
|
12
|
+
};
|