Rotating words: {Next|Now} in titles and text cycles through its choices
Migration 084: site defaults for the motion (slide, flip, fade, type, mirror), direction and seconds per word in Site settings, and a hero's and a block's own. The hero's headline, section and band titles, headings, paragraphs, callouts and quotes rotate; menus, tab titles, search text and emails show the first word; less motion shows it still. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ab8dcdd608
commit
a10ff6d75f
30 changed files with 411 additions and 37 deletions
|
|
@ -346,6 +346,45 @@ export const HREF_HELP = {
|
|||
video: "The video's page, eg. https://www.youtube.com/watch?v=…, or a video file",
|
||||
};
|
||||
|
||||
/* Rotating words (084): text typed as {Next|Now|Rising} cycles
|
||||
through its choices. These pick how, for a block or a hero; Site
|
||||
settings → Animated words holds the defaults. */
|
||||
export const WORD_MOTIONS = [
|
||||
["slide", "Slide"],
|
||||
["flip", "Flip, like a card"],
|
||||
["fade", "Fade"],
|
||||
["type", "Type, letter by letter"],
|
||||
["mirror", "Mirror, turning round"],
|
||||
];
|
||||
export const WORD_DIRECTIONS = [
|
||||
["bottom", "From the bottom"],
|
||||
["top", "From the top"],
|
||||
];
|
||||
export const WORD_HELP = "Type choices in braces to rotate them, eg. {Next|Now|Rising} Generation of {Unity|New Thought}.";
|
||||
|
||||
/* The three fields, under `prefix` (eg. "hero."), shown `when`. */
|
||||
export const wordFields = (prefix: string, label: string, when?: any) => [
|
||||
{
|
||||
path: `${prefix}word_motion`,
|
||||
label: label ? `${label}rotating words` : "Rotating words",
|
||||
widget: "select",
|
||||
options: WORD_MOTIONS,
|
||||
blankLabel: "Default: the site's (Site settings → Animated words)",
|
||||
help: WORD_HELP,
|
||||
when,
|
||||
},
|
||||
{
|
||||
path: `${prefix}word_direction`,
|
||||
label: label ? `${label}words come in` : "Words come in",
|
||||
widget: "select",
|
||||
options: WORD_DIRECTIONS,
|
||||
blankLabel: "Default: the site's",
|
||||
help: "For Slide and Flip",
|
||||
when,
|
||||
},
|
||||
{ path: `${prefix}word_seconds`, label: label ? `${label}seconds per word` : "Seconds per word", widget: "number", help: "1 to 20. Default: the site's", when },
|
||||
];
|
||||
|
||||
export const blocksChild = {
|
||||
key: "content_blocks",
|
||||
label: "Content blocks",
|
||||
|
|
@ -441,6 +480,7 @@ export const blocksChild = {
|
|||
help: "Shows the team's members as tiles, its leads first. People added as items show after it.",
|
||||
when: { path: "type", value: "people" },
|
||||
},
|
||||
...wordFields("", "", { path: "type", value: ["heading", "subheading", "paragraph", "callout", "quote"] }),
|
||||
],
|
||||
children: [
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue