diff --git a/.gitignore b/.gitignore index bec26ada..5ca07f96 100644 --- a/.gitignore +++ b/.gitignore @@ -1,110 +1,5 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# TypeScript v1 declaration files -typings/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env -.env.test - -# parcel-bundler cache (https://parceljs.org/) -.cache - -# Next.js build output -.next - -# Nuxt.js build / generate output -.nuxt +node_modules dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and *not* Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -.DS_Store -.idea storybook-static public/css public/models @@ -113,3 +8,6 @@ stackbit-theme.yaml src/components-map.json src/components-map.ts sourcemap.patch +.env +.DS_Store +.idea diff --git a/.storybook/preview.js b/.storybook/preview.js index c849798c..dabe7ada 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -15,9 +15,13 @@ export const parameters = { 'Footer', 'ContactSection', 'CtaSection', + 'FaqSection', + 'FeaturedItemsSection', 'FeaturedPeopleSection', 'FeaturedPostsSection', 'HeroSection', + 'MediaGallerySection', + 'PostFeedSection', 'QuoteSection', 'TestimonialsSection', 'TextSection' diff --git a/docs/changing-themes.png b/docs/changing-themes.png deleted file mode 100644 index 07cb8623..00000000 Binary files a/docs/changing-themes.png and /dev/null differ diff --git a/docs/changing-variants.png b/docs/changing-variants.png deleted file mode 100644 index 4ea194a0..00000000 Binary files a/docs/changing-variants.png and /dev/null differ diff --git a/models/Button.yaml b/models/Button.yaml index 472de8d7..b0938749 100644 --- a/models/Button.yaml +++ b/models/Button.yaml @@ -31,23 +31,39 @@ fields: group: styles label: Icon options: - - arrowLeft - - arrowRight - - cart - - facebook - - github - - instagram - - linkedin - - twitter - default: arrowLeft + - label: Apple + value: apple + - label: Arrow right + value: arrowRight + - label: Arrow left + value: arrowLeft + - label: Cart + value: cart + - label: Facebook + value: facebook + - label: GitHub + value: github + - label: Google Play + value: googlePlay + - label: Instagram + value: instagram + - label: LinkedIn + value: linkedin + - label: Play + value: play + - label: Twitter + value: twitter + default: arrowRight - type: enum name: iconPosition group: styles controlType: button-group label: Icon position options: - - left - - right + - label: Left + value: left + - label: Right + value: right default: right - type: enum name: style @@ -55,8 +71,6 @@ fields: controlType: button-group label: Style options: - - label: Link - value: link - label: Primary value: primary - label: Secondary diff --git a/models/CheckboxFormControl.yaml b/models/CheckboxFormControl.yaml index 49eb3072..2eed1488 100644 --- a/models/CheckboxFormControl.yaml +++ b/models/CheckboxFormControl.yaml @@ -9,7 +9,8 @@ fields: - type: string name: name label: Name - default: 'Checkbox' + default: updates + required: true - type: string name: label label: Label diff --git a/models/Config.yaml b/models/Config.yaml index e072d29f..e0ef1794 100644 --- a/models/Config.yaml +++ b/models/Config.yaml @@ -1,11 +1,9 @@ type: data name: Config label: Site configuration +singleInstance: true +readOnly: true fields: - - type: string - name: domain - label: Domain - description: The domain of your site, including the protocol, e.g. https://www.example.com/ - type: model name: header label: Header configuration diff --git a/models/ContactBlock.yaml b/models/ContactBlock.yaml index fd5da872..f1b0f241 100644 --- a/models/ContactBlock.yaml +++ b/models/ContactBlock.yaml @@ -9,21 +9,27 @@ fields: - type: string name: phoneNumber label: Phone number + default: '850-123-5021' - type: string name: phoneAltText label: Phone alt text + default: 'Phone' - type: string name: email label: Email address + default: 'john@doe.com' - type: string name: emailAltText label: Email address alt text + default: 'Email' - type: string name: address label: Address + default: '312 Lovely Street, NY' - type: string name: addressAltText label: Address alt text + default: 'Address' - type: string name: elementId group: settings diff --git a/models/ContactSection.yaml b/models/ContactSection.yaml index fdf5e15e..ae158dd0 100644 --- a/models/ContactSection.yaml +++ b/models/ContactSection.yaml @@ -1,7 +1,8 @@ type: object name: ContactSection -label: Contact section +label: Contact labelField: title +thumbnail: https://assets.stackbit.com/components/models/thumbnails/default.png extends: - Section groups: @@ -14,8 +15,6 @@ fieldGroups: fields: - name: colors default: colors-h - - name: backgroundWidth - default: full - type: string name: title label: Title @@ -60,14 +59,14 @@ fields: width: full submitLabel: Send Message - type: model - name: feature - label: Feature + name: media + label: Media models: - ImageBlock - VideoBlock default: type: ImageBlock - url: /images/contact.png + url: https://assets.stackbit.com/components/images/default/contact.png altText: Contact form image - type: style name: styles @@ -75,11 +74,30 @@ fields: self: height: ['auto', 'screen'] width: ['narrow', 'wide', 'full'] - margin: ['twt0:36', 'twb0:36'] - padding: ['twt0:36', 'twb0:36'] + margin: ['tw0:36'] + padding: ['tw4:36'] alignItems: ['flex-start', 'flex-end', 'center'] justifyContent: ['flex-start', 'flex-end', 'center'] flexDirection: ['row', 'row-reverse', 'col', 'col-reverse'] + borderRadius: '*' + borderWidth: ['0:8'] + borderStyle: '*' + borderColor: + - value: 'border-primary' + label: 'Primary color' + color: '$primary' + - value: 'border-secondary' + label: 'Secondary color' + color: '$secondary' + - value: 'border-dark' + label: 'Dark color' + color: '$dark' + - value: 'border-complementary' + label: 'Complementary color' + color: '$complementary' + - value: 'border-complementary-alt' + label: 'Complementary alt color' + color: '$complementaryAlt' title: fontWeight: ['400', '700'] fontStyle: ['normal', 'italic'] @@ -90,14 +108,16 @@ fields: self: height: auto width: wide - margin: ['mt-0', 'mb-0'] - padding: ['pt-12', 'pb-12'] + margin: ['mt-0', 'mb-0', 'ml-0', 'mr-0'] + padding: ['pt-12', 'pb-12', 'pl-4', 'pr-4'] alignItems: center justifyContent: center flexDirection: row + borderRadius: none + borderWidth: 0 + borderStyle: none + borderColor: border-dark title: - fontWeight: 700 - fontStyle: normal textAlign: left text: textAlign: left diff --git a/models/CtaSection.yaml b/models/CtaSection.yaml index de3b66f0..66c128dd 100644 --- a/models/CtaSection.yaml +++ b/models/CtaSection.yaml @@ -1,7 +1,8 @@ type: object name: CtaSection -label: CTA section +label: CTA labelField: title +thumbnail: https://assets.stackbit.com/components/models/thumbnails/default.png extends: - Section groups: @@ -14,8 +15,6 @@ fieldGroups: fields: - name: colors default: colors-f - - name: backgroundWidth - default: full - type: model name: backgroundImage group: styles @@ -29,7 +28,8 @@ fields: - type: markdown name: text label: Text - default: 'The Stackbit theme is flexible and scalable to every need. It can manage any layout and any screen.' + default: |- + The Stackbit theme is flexible and scalable to every need. It can manage any layout and any screen. - type: list name: actions label: Actions @@ -49,11 +49,30 @@ fields: self: height: ['auto', 'screen'] width: ['narrow', 'wide', 'full'] - margin: ['twt0:36', 'twb0:36'] - padding: ['twt0:36', 'twb0:36'] + margin: ['tw0:36'] + padding: ['tw4:36'] alignItems: ['flex-start', 'flex-end', 'center'] justifyContent: ['flex-start', 'flex-end', 'center'] flexDirection: ['row', 'col'] + borderRadius: '*' + borderWidth: ['0:8'] + borderStyle: '*' + borderColor: + - value: 'border-primary' + label: 'Primary color' + color: '$primary' + - value: 'border-secondary' + label: 'Secondary color' + color: '$secondary' + - value: 'border-dark' + label: 'Dark color' + color: '$dark' + - value: 'border-complementary' + label: 'Complementary color' + color: '$complementary' + - value: 'border-complementary-alt' + label: 'Complementary alt color' + color: '$complementaryAlt' title: fontWeight: ['400', '700'] fontStyle: ['normal', 'italic'] @@ -66,16 +85,18 @@ fields: self: height: auto width: wide - margin: ['mt-0', 'mb-0'] - padding: ['pt-12', 'pb-12'] + margin: ['mt-0', 'mb-0', 'ml-0', 'mr-0'] + padding: ['pt-12', 'pb-12', 'pl-4', 'pr-4'] alignItems: center justifyContent: center flexDirection: row + borderRadius: none + borderWidth: 0 + borderStyle: none + borderColor: border-dark title: - fontWeight: 700 - fontStyle: normal textAlign: left text: textAlign: left actions: - justifyContent: flex-start + justifyContent: 'flex-start' diff --git a/models/FaqSection.yaml b/models/FaqSection.yaml new file mode 100755 index 00000000..f85e93ce --- /dev/null +++ b/models/FaqSection.yaml @@ -0,0 +1,107 @@ +type: object +name: FaqSection +label: FAQ +labelField: title +thumbnail: https://assets.stackbit.com/components/models/thumbnails/default.png +extends: + - Section +groups: + - sectionComponent +fieldGroups: + - name: styles + label: Styles + - name: settings + label: Settings +fields: + - type: string + name: title + label: Title + default: Frequently Asked Questions + - type: string + name: subtitle + label: Subtitle + default: The section subtitle + - type: list + name: items + label: FAQ Items + items: + type: object + labelField: question + fields: + - type: string + name: question + label: Question + default: How it this different from what we have today? + - type: markdown + name: answer + label: Answer + default: At the office, working together is often a distruction, on remote, it could be motivation. At the office, working together is often a distruction, on remote, it could be motivation. At the office, working together is often a distruction, on remote, it could be motivation. + - type: style + name: styles + styles: + question: + fontWeight: ['400', '700'] + fontStyle: ['normal', 'italic'] + textAlign: ['left', 'center', 'right'] + answer: + textAlign: ['left', 'center', 'right'] + default: + - question: How it this different from what we have today? + answer: At the office, working together is often a distruction, on remote, it could be motivation. At the office, working together is often a distruction, on remote, it could be motivation. At the office, working together is often a distruction, on remote, it could be motivation. + - question: How it this different from what we have today? + answer: At the office, working together is often a distruction, on remote, it could be motivation. At the office, working together is often a distruction, on remote, it could be motivation. At the office, working together is often a distruction, on remote, it could be motivation. + - question: How it this different from what we have today? + answer: At the office, working together is often a distruction, on remote, it could be motivation. At the office, working together is often a distruction, on remote, it could be motivation. At the office, working together is often a distruction, on remote, it could be motivation. + - type: style + name: styles + styles: + self: + height: ['auto', 'screen'] + width: ['narrow', 'wide', 'full'] + margin: ['tw0:36'] + padding: ['tw4:36'] + justifyContent: ['flex-start', 'flex-end', 'center'] + borderRadius: '*' + borderWidth: ['0:8'] + borderStyle: '*' + borderColor: + - value: 'border-primary' + label: 'Primary color' + color: '$primary' + - value: 'border-secondary' + label: 'Secondary color' + color: '$secondary' + - value: 'border-dark' + label: 'Dark color' + color: '$dark' + - value: 'border-complementary' + label: 'Complementary color' + color: '$complementary' + - value: 'border-complementary-alt' + label: 'Complementary alt color' + color: '$complementaryAlt' + title: + fontWeight: ['400', '700'] + fontStyle: ['normal', 'italic'] + textAlign: ['left', 'center', 'right'] + subtitle: + fontWeight: ['400', '700'] + fontStyle: ['normal', 'italic'] + textAlign: ['left', 'center', 'right'] + default: + self: + height: auto + width: wide + margin: ['mt-0', 'mb-0', 'ml-0', 'mr-0'] + padding: ['pt-12', 'pb-12', 'pl-4', 'pr-4'] + justifyContent: center + borderRadius: none + borderWidth: 0 + borderStyle: none + borderColor: border-dark + title: + textAlign: center + subtitle: + fontWeight: 400 + fontStyle: normal + textAlign: center diff --git a/models/FeaturedItem.yaml b/models/FeaturedItem.yaml new file mode 100644 index 00000000..0f1da7b1 --- /dev/null +++ b/models/FeaturedItem.yaml @@ -0,0 +1,87 @@ +type: object +name: FeaturedItem +label: Item +labelField: title +fieldGroups: + - name: styles + label: Styles + - name: settings + label: Settings +fields: + - type: string + name: elementId + group: settings + label: Element ID + description: The unique ID for an HTML element, must not contain whitespace + default: '' + - type: string + name: title + label: Title + default: Item Title + - type: string + name: subtitle + label: Subtitle + default: '' + - type: markdown + name: text + label: Text + default: 'Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae. explicabo.' + - type: string + name: author + label: Author + default: '' + - type: number + name: rating + label: Rating + controlType: 'slider' + min: 1 + max: 5 + step: 1 + default: 1 + - type: boolean + name: isRatingVisible + label: Display rating + default: false + - type: model + name: featuredImage + label: Image + models: + - ImageBlock + default: + type: ImageBlock + url: 'https://assets.stackbit.com/components/images/default/default-image.png' + altText: Item image + - type: list + name: actions + label: Actions + items: + type: model + models: + - Button + - Link + - type: style + name: styles + styles: + title: + fontWeight: ['400', '700'] + fontStyle: ['normal', 'italic'] + textAlign: ['left', 'center', 'right'] + subtitle: + fontWeight: ['400', '700'] + fontStyle: ['normal', 'italic'] + textAlign: ['left', 'center', 'right'] + text: + textAlign: ['left', 'center', 'right'] + actions: + justifyContent: ['flex-start', 'flex-end', 'center'] + default: + title: + textAlign: left + subtitle: + fontWeight: 400 + fontStyle: normal + textAlign: left + text: + textAlign: left + actions: + justifyContent: flex-start diff --git a/models/FeaturedItemsSection.yaml b/models/FeaturedItemsSection.yaml new file mode 100644 index 00000000..aa881711 --- /dev/null +++ b/models/FeaturedItemsSection.yaml @@ -0,0 +1,132 @@ +type: object +name: FeaturedItemsSection +label: Featured items +labelField: title +thumbnail: https://assets.stackbit.com/components/models/thumbnails/default.png +extends: + - Section +groups: + - sectionComponent +fieldGroups: + - name: styles + label: Styles + - name: settings + label: Settings +fields: + - type: string + name: title + label: Title + default: Featured Items + - type: string + name: subtitle + label: Subtitle + default: The section subtitle + - type: list + name: items + label: Items + items: + type: model + models: + - FeaturedItem + default: + - type: FeaturedItem + title: Item Title + text: 'Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae. explicabo.' + featuredImage: + type: ImageBlock + url: 'https://assets.stackbit.com/components/images/default/default-image.png' + altText: Item image + styles: + title: + textAlign: left + subtitle: + fontWeight: 400 + fontStyle: normal + textAlign: left + text: + textAlign: left + actions: + justifyContent: flex-start + - type: list + name: actions + label: Actions + items: + type: model + models: + - Button + - Link + default: + - type: Button + label: Apply Now + url: '#' + style: primary + - type: Button + label: Learn More + url: '#' + style: secondary + - type: number + name: columns + label: Items per row + group: styles + controlType: 'slider' + min: 1 + max: 4 + step: 1 + default: 3 + - type: style + name: styles + styles: + self: + height: ['auto', 'screen'] + width: ['narrow', 'wide', 'full'] + margin: ['tw0:36'] + padding: ['tw4:36'] + justifyContent: ['flex-start', 'flex-end', 'center'] + borderRadius: '*' + borderWidth: ['0:8'] + borderStyle: '*' + borderColor: + - value: 'border-primary' + label: 'Primary color' + color: '$primary' + - value: 'border-secondary' + label: 'Secondary color' + color: '$secondary' + - value: 'border-dark' + label: 'Dark color' + color: '$dark' + - value: 'border-complementary' + label: 'Complementary color' + color: '$complementary' + - value: 'border-complementary-alt' + label: 'Complementary alt color' + color: '$complementaryAlt' + title: + fontWeight: ['400', '700'] + fontStyle: ['normal', 'italic'] + textAlign: ['left', 'center', 'right'] + subtitle: + fontWeight: ['400', '700'] + fontStyle: ['normal', 'italic'] + textAlign: ['left', 'center', 'right'] + actions: + justifyContent: ['flex-start', 'flex-end', 'center'] + default: + self: + height: auto + width: wide + margin: ['mt-0', 'mb-0', 'ml-0', 'mr-0'] + padding: ['pt-12', 'pb-12', 'pl-4', 'pr-4'] + justifyContent: center + borderRadius: none + borderWidth: 0 + borderStyle: none + borderColor: border-dark + title: + textAlign: center + subtitle: + fontWeight: 400 + fontStyle: normal + textAlign: center + actions: + justifyContent: center diff --git a/models/FeaturedPeopleSection.yaml b/models/FeaturedPeopleSection.yaml index bc9ba17f..ff52de3e 100644 --- a/models/FeaturedPeopleSection.yaml +++ b/models/FeaturedPeopleSection.yaml @@ -1,7 +1,8 @@ type: object name: FeaturedPeopleSection -label: Featured people section +label: Featured people labelField: title +thumbnail: https://assets.stackbit.com/components/models/thumbnails/default.png extends: - Section groups: @@ -26,8 +27,6 @@ fields: default: variant-a - name: colors default: colors-h - - name: backgroundWidth - default: full - type: string name: title label: Title @@ -35,7 +34,7 @@ fields: - type: string name: subtitle label: Subtitle - default: Meet the team + default: Featured people section example - type: list name: actions label: Actions @@ -61,10 +60,28 @@ fields: self: height: ['auto', 'screen'] width: ['narrow', 'wide', 'full'] - margin: ['twt0:36', 'twb0:36'] - padding: ['twt0:36', 'twb0:36'] - alignItems: ['flex-start', 'flex-end', 'center'] + margin: ['tw0:36'] + padding: ['tw4:36'] justifyContent: ['flex-start', 'flex-end', 'center'] + borderRadius: '*' + borderWidth: ['0:8'] + borderStyle: '*' + borderColor: + - value: 'border-primary' + label: 'Primary color' + color: '$primary' + - value: 'border-secondary' + label: 'Secondary color' + color: '$secondary' + - value: 'border-dark' + label: 'Dark color' + color: '$dark' + - value: 'border-complementary' + label: 'Complementary color' + color: '$complementary' + - value: 'border-complementary-alt' + label: 'Complementary alt color' + color: '$complementaryAlt' title: fontWeight: ['400', '700'] fontStyle: ['normal', 'italic'] @@ -79,13 +96,14 @@ fields: self: height: auto width: wide - margin: ['mt-0', 'mb-0'] - padding: ['pt-12', 'pb-12'] - alignItems: center + margin: ['mt-0', 'mb-0', 'ml-0', 'mr-0'] + padding: ['pt-12', 'pb-12', 'pl-4', 'pr-4'] justifyContent: center + borderRadius: none + borderWidth: 0 + borderStyle: none + borderColor: border-dark title: - fontWeight: 700 - fontStyle: normal textAlign: center subtitle: fontWeight: 400 diff --git a/models/FeaturedPostsSection.yaml b/models/FeaturedPostsSection.yaml index bdde4a13..ac7a03d2 100644 --- a/models/FeaturedPostsSection.yaml +++ b/models/FeaturedPostsSection.yaml @@ -1,54 +1,19 @@ type: object name: FeaturedPostsSection -label: Featured posts section +label: Featured posts labelField: title +thumbnail: https://assets.stackbit.com/components/models/thumbnails/default.png extends: - - Section + - PostFeedSection groups: - sectionComponent -fieldGroups: - - name: styles - label: Styles - - name: settings - label: Settings fields: - - type: enum - name: variant - group: styles - label: Arrangement - options: - - label: Three columns grid - value: variant-a - - label: Two columns grid - value: variant-b - - label: List - value: variant-c - default: variant-a + - name: title + default: Featured + - name: subtitle + default: Featured blog posts section example - name: colors default: colors-h - - name: backgroundWidth - default: full - - type: string - name: title - label: Title - default: Latest news - - type: string - name: subtitle - label: Subtitle - default: Featured blog posts section example - - type: list - name: actions - label: Actions - items: - type: model - models: - - Button - - Link - default: - - type: Button - label: View all - url: '/' - style: primary - type: list name: posts label: Posts @@ -60,41 +25,3 @@ fields: - content/pages/blog/post-three.md - content/pages/blog/post-two.md - content/pages/blog/post-one.md - - type: style - name: styles - styles: - self: - height: ['auto', 'screen'] - width: ['narrow', 'wide', 'full'] - margin: ['twt0:36', 'twb0:36'] - padding: ['twt0:36', 'twb0:36'] - alignItems: ['flex-start', 'flex-end', 'center'] - justifyContent: ['flex-start', 'flex-end', 'center'] - title: - fontWeight: ['400', '700'] - fontStyle: ['normal', 'italic'] - textAlign: ['left', 'center', 'right'] - subtitle: - fontWeight: ['400', '700'] - fontStyle: ['normal', 'italic'] - textAlign: ['left', 'center', 'right'] - actions: - justifyContent: ['flex-start', 'flex-end', 'center'] - default: - self: - height: auto - width: wide - margin: ['mt-0', 'mb-0'] - padding: ['pt-12', 'pb-12'] - alignItems: center - justifyContent: center - title: - fontWeight: 700 - fontStyle: normal - textAlign: center - subtitle: - fontWeight: 400 - fontStyle: normal - textAlign: center - actions: - justifyContent: center diff --git a/models/Footer.yaml b/models/Footer.yaml index c85f16a4..ec2bacf2 100644 --- a/models/Footer.yaml +++ b/models/Footer.yaml @@ -2,6 +2,7 @@ type: object name: Footer label: Footer labelField: title +readOnly: true fieldGroups: - name: styles label: Styles @@ -10,57 +11,87 @@ fieldGroups: fields: - type: enum name: colors - group: styles label: Colors + group: styles + controlType: palette options: - - label: Base foreground on white background + - label: Colors A value: colors-a - - label: Primary foreground on white background + textColor: '$onLight' + backgroundColor: '$light' + borderColor: '#ececec' + - label: Colors B value: colors-b - - label: White foreground on base background + textColor: '$primary' + backgroundColor: '$light' + borderColor: '#ececec' + - label: Colors C value: colors-c - - label: Primary foreground on base background + textColor: '$onDark' + backgroundColor: '$dark' + borderColor: '#ececec' + - label: Colors D value: colors-d - - label: Base foreground on primary background + textColor: '$primary' + backgroundColor: '$dark' + borderColor: '#ececec' + - label: Colors E value: colors-e - - label: Base foreground on secondary background + textColor: '$onPrimary' + backgroundColor: '$primary' + borderColor: '#ececec' + - label: Colors F value: colors-f - - label: Primary foreground on secondary background + textColor: '$onSecondary' + backgroundColor: '$secondary' + borderColor: '#ececec' + - label: Colors G value: colors-g - - label: Base foreground on complementary 1 background + textColor: '$primary' + backgroundColor: '$secondary' + borderColor: '#ececec' + - label: Colors H value: colors-h - - label: Base foreground on complementary 2 background + textColor: '$onComplementary' + backgroundColor: '$complementary' + borderColor: '#ececec' + - label: Colors I value: colors-i - default: colors-a - - type: enum - name: backgroundWidth - group: styles - controlType: button-group - label: Background width - description: The background width of the footer - options: - - label: Inset - value: inset - - label: Full - value: full - default: full + textColor: '$onComplementaryAlt' + backgroundColor: '$complementaryAlt' + borderColor: '#ececec' + default: colors-f - type: model name: logo label: Logo models: [ImageBlock] + default: + default: + type: ImageBlock + url: 'https://assets.stackbit.com/components/images/default/default-image.png' + altText: 'Your logo image' + caption: '' - type: string name: title label: Title + default: Your Brand - type: markdown name: text label: Text + default: A description of your brand - type: model name: contacts label: Contacts models: [ContactBlock] + default: + phoneNumber: '850-123-5021' + phoneAltText: 'Call us' + email: 'john@doe.com' + emailAltText: 'Email us' - type: markdown name: copyrightText label: Copyright text + default: Copyright text - type: list name: primaryLinks label: Primary navigation links @@ -69,6 +100,15 @@ fields: models: - Button - Link + default: + - type: Link + label: Projects + url: / + altText: Projects + - type: Link + label: Documentation + url: / + altText: Documentation - type: list name: socialLinks label: Social links @@ -76,6 +116,21 @@ fields: type: model models: - Social + default: + - type: facebook + icon: facebook + label: '' + altText: facebook + url: / + elementId: false + showIcon: true + - type: twitter + icon: twitter + label: '' + altText: twitter + url: / + elementId: false + showIcon: true - type: list name: legalLinks label: Legal navigation links @@ -84,13 +139,22 @@ fields: models: - Button - Link + default: + - type: Link + label: Privacy Policy + url: / + altText: Privacy Policy + - type: Link + label: Terms & Conditions + url: / + altText: Terms & Conditions - type: style name: styles styles: self: width: ['narrow', 'wide', 'full'] - padding: ['twt0:36', 'twb0:36'] + padding: ['tw4:36'] default: self: width: narrow - padding: ['pt-16', 'pb-16'] + padding: ['pt-16', 'pb-16', 'pl-4', 'pr-4'] diff --git a/models/FormBlock.yaml b/models/FormBlock.yaml index 9aaa864f..a8c0095c 100644 --- a/models/FormBlock.yaml +++ b/models/FormBlock.yaml @@ -1,7 +1,7 @@ type: object name: FormBlock label: Form -labelField: action +labelField: elementId fieldGroups: - name: settings label: Settings @@ -17,19 +17,55 @@ fields: - TextareaFormControl - CheckboxFormControl - SelectFormControl + default: + - type: TextFormControl + label: Name + name: name + placeholder: Your name + isRequired: true + width: 1/2 + - type: EmailFormControl + label: Email + name: email + placeholder: Your email + isRequired: true + width: 1/2 + - type: TextFormControl + label: Home Address + name: home-address + placeholder: Your home address + isRequired: false + width: full + - type: CheckboxFormControl + name: updates + label: Sign me up to receive updates + width: full - type: string name: submitLabel - label: Submit button label + label: Button + default: Send Message - type: string name: elementId group: settings label: Element ID description: The unique ID used for id and name attributes, must not contain whitespace + default: 'contact-form' + required: true - type: string name: action group: settings label: Action (form submission URL) + default: /.netlify/functions/submission_created - type: string name: destination - group: settings label: Destination (email to redirect responses) + default: '' + group: settings + - type: style + name: styles + styles: + submitLabel: + textAlign: ['left', 'center', 'right'] + default: + title: + textAlign: left diff --git a/models/Header.yaml b/models/Header.yaml index ad7554d6..5df1d9df 100644 --- a/models/Header.yaml +++ b/models/Header.yaml @@ -2,6 +2,7 @@ type: object name: Header label: Header labelField: title +readOnly: true fieldGroups: - name: styles label: Styles @@ -23,77 +24,128 @@ fields: value: variant-d - label: Header with logo centered and primary links centered value: variant-e - default: variant-a + default: variant-c - type: enum name: primaryColors - group: styles label: Primary colors + group: styles + controlType: palette options: - - label: Base foreground on white background + - label: Colors A value: colors-a - - label: Primary foreground on white background + textColor: '$onLight' + backgroundColor: '$light' + borderColor: '#ececec' + - label: Colors B value: colors-b - - label: White foreground on base background + textColor: '$primary' + backgroundColor: '$light' + borderColor: '#ececec' + - label: Colors C value: colors-c - - label: Primary foreground on base background + textColor: '$onDark' + backgroundColor: '$dark' + borderColor: '#ececec' + - label: Colors D value: colors-d - - label: Base foreground on primary background + textColor: '$primary' + backgroundColor: '$dark' + borderColor: '#ececec' + - label: Colors E value: colors-e - - label: Base foreground on secondary background + textColor: '$onPrimary' + backgroundColor: '$primary' + borderColor: '#ececec' + - label: Colors F value: colors-f - - label: Primary foreground on secondary background + textColor: '$onSecondary' + backgroundColor: '$secondary' + borderColor: '#ececec' + - label: Colors G value: colors-g - - label: Base foreground on complementary 1 background + textColor: '$primary' + backgroundColor: '$secondary' + borderColor: '#ececec' + - label: Colors H value: colors-h - - label: Base foreground on complementary 2 background + textColor: '$onComplementary' + backgroundColor: '$complementary' + borderColor: '#ececec' + - label: Colors I value: colors-i + textColor: '$onComplementaryAlt' + backgroundColor: '$complementaryAlt' + borderColor: '#ececec' default: colors-a - type: enum name: secondaryColors - group: styles label: Secondary colors (mobile menu) + group: styles + controlType: palette options: - - label: Base foreground on white background + - label: Colors A value: colors-a - - label: Primary foreground on white background + textColor: '$onLight' + backgroundColor: '$light' + borderColor: '#ececec' + - label: Colors B value: colors-b - - label: White foreground on base background + textColor: '$primary' + backgroundColor: '$light' + borderColor: '#ececec' + - label: Colors C value: colors-c - - label: Primary foreground on base background + textColor: '$onDark' + backgroundColor: '$dark' + borderColor: '#ececec' + - label: Colors D value: colors-d - - label: Base foreground on primary background + textColor: '$primary' + backgroundColor: '$dark' + borderColor: '#ececec' + - label: Colors E value: colors-e - - label: Base foreground on secondary background + textColor: '$onPrimary' + backgroundColor: '$primary' + borderColor: '#ececec' + - label: Colors F value: colors-f - - label: Primary foreground on secondary background + textColor: '$onSecondary' + backgroundColor: '$secondary' + borderColor: '#ececec' + - label: Colors G value: colors-g - - label: Base foreground on complementary 1 background + textColor: '$primary' + backgroundColor: '$secondary' + borderColor: '#ececec' + - label: Colors H value: colors-h - - label: Base foreground on complementary 2 background + textColor: '$onComplementary' + backgroundColor: '$complementary' + borderColor: '#ececec' + - label: Colors I value: colors-i + textColor: '$onComplementaryAlt' + backgroundColor: '$complementaryAlt' + borderColor: '#ececec' default: colors-a - - type: enum - name: backgroundWidth - group: styles - controlType: button-group - label: Background width - description: The background width of the header - options: - - label: Inset - value: inset - - label: Full - value: full - default: full - type: string name: title label: Title + default: Your Brand - type: boolean name: isTitleVisible label: Display title + default: true - type: model name: logo label: Logo models: [ImageBlock] + default: + type: ImageBlock + url: 'https://assets.stackbit.com/components/images/default/default-image.png' + altText: 'Your logo image' + caption: '' - type: list name: primaryLinks label: Primary navigation links @@ -102,6 +154,15 @@ fields: models: - Button - Link + default: + - type: Link + label: Home + url: / + altText: Home + - type: Link + label: Blog + url: / + altText: Blog - type: list name: secondaryLinks label: Secondary links @@ -110,13 +171,19 @@ fields: models: - Button - Link + default: + - type: Button + label: Sign up + url: / + altText: Sign up + style: primary - type: style name: styles styles: self: width: ['narrow', 'wide', 'full'] - padding: ['twt0:36', 'twb0:36'] + padding: ['tw4:36'] default: self: width: narrow - padding: ['pt-5', 'pb-5'] + padding: ['pt-5', 'pb-5', 'pl-4', 'pr-4'] diff --git a/models/HeroSection.yaml b/models/HeroSection.yaml index ef30bf03..eda4ebce 100644 --- a/models/HeroSection.yaml +++ b/models/HeroSection.yaml @@ -1,7 +1,8 @@ type: object name: HeroSection -label: Hero section +label: Hero labelField: title +thumbnail: https://assets.stackbit.com/components/models/thumbnails/default.png extends: - Section groups: @@ -14,14 +15,6 @@ fieldGroups: fields: - name: colors default: colors-f - - name: backgroundWidth - default: full - - type: model - name: backgroundImage - group: styles - label: Background image - models: - - ImageBlock - type: string name: title label: Title @@ -29,7 +22,7 @@ fields: - type: string name: subtitle label: Subtitle - default: This Is Subtitle + default: The section subtitle - type: markdown name: text label: Text @@ -57,24 +50,30 @@ fields: url: '/' style: secondary - type: model - name: feature - label: Feature + name: media + label: Media models: - FormBlock - ImageBlock - VideoBlock default: type: ImageBlock - url: /images/hero.png + url: https://assets.stackbit.com/components/images/default/hero.png altText: Hero section image + - type: model + name: backgroundImage + group: styles + label: Background image + models: + - ImageBlock - type: style name: styles styles: self: height: ['auto', 'screen'] width: ['narrow', 'wide', 'full'] - margin: ['twt0:36', 'twb0:36'] - padding: ['twt0:36', 'twb0:36'] + margin: ['tw0:36'] + padding: ['tw4:36'] alignItems: ['flex-start', 'flex-end', 'center'] justifyContent: ['flex-start', 'flex-end', 'center'] flexDirection: ['row', 'row-reverse', 'col', 'col-reverse'] @@ -84,61 +83,51 @@ fields: borderColor: - value: 'border-primary' label: 'Primary color' - color: '#28aaff' + color: '$primary' - value: 'border-secondary' label: 'Secondary color' - color: '#dfe3e7' - - value: 'border-neutral' - label: 'Neutral color' - color: '#282f36' + color: '$secondary' + - value: 'border-dark' + label: 'Dark color' + color: '$dark' - value: 'border-complementary' label: 'Complementary color' - color: '#e9f6ff' + color: '$complementary' - value: 'border-complementary-alt' label: 'Complementary alt color' - color: '#fffde2' + color: '$complementaryAlt' title: fontWeight: ['400', '700'] fontStyle: ['normal', 'italic'] textAlign: ['left', 'center', 'right'] - margin: ['twt0:12', 'twb0:12'] subtitle: fontWeight: ['400', '700'] fontStyle: ['normal', 'italic'] textAlign: ['left', 'center', 'right'] - margin: ['twt0:12', 'twb0:12'] text: textAlign: ['left', 'center', 'right'] - margin: ['twt0:12', 'twb0:12'] actions: justifyContent: ['flex-start', 'flex-end', 'center'] - margin: ['twt0:12', 'twb0:12'] default: self: height: auto width: wide - margin: ['mt-0', 'mb-0'] - padding: ['pt-12', 'pb-12'] + margin: ['mt-0', 'mb-0', 'ml-0', 'mr-0'] + padding: ['pt-12', 'pb-12', 'pl-4', 'pr-4'] alignItems: center justifyContent: center flexDirection: row borderRadius: none borderWidth: 0 borderStyle: none - borderColor: border-neutral + borderColor: border-dark title: - fontWeight: 700 - fontStyle: normal textAlign: left - margin: ['mt-0', 'mb-4'] subtitle: fontWeight: 400 fontStyle: normal textAlign: left - margin: ['mt-0', 'mb-6'] text: textAlign: left - margin: ['mt-0', 'mb-8'] actions: justifyContent: flex-start - margin: ['mt-0', 'mb-0'] diff --git a/models/ImageBlock.yaml b/models/ImageBlock.yaml index 82af3663..92bf08ba 100644 --- a/models/ImageBlock.yaml +++ b/models/ImageBlock.yaml @@ -10,14 +10,17 @@ fields: name: url label: Image description: The URL of the image + default: https://assets.stackbit.com/components/images/default/default-image.png - type: string name: altText label: Alt text description: The alt text of the image + default: altText of the image - type: string name: caption label: Caption description: The caption of the image + default: Caption of the image - type: string name: elementId group: settings diff --git a/models/Link.yaml b/models/Link.yaml index a9efe2f2..71050bc0 100644 --- a/models/Link.yaml +++ b/models/Link.yaml @@ -31,37 +31,40 @@ fields: group: styles label: Icon options: - - arrowLeft - - arrowRight - - cart - - facebook - - github - - instagram - - linkedin - - twitter - default: arrowLeft + - label: Apple + value: apple + - label: Arrow right + value: arrowRight + - label: Arrow left + value: arrowLeft + - label: Cart + value: cart + - label: Facebook + value: facebook + - label: GitHub + value: github + - label: Google Play + value: googlePlay + - label: Instagram + value: instagram + - label: LinkedIn + value: linkedin + - label: Play + value: play + - label: Twitter + value: twitter + default: arrowRight - type: enum name: iconPosition group: styles controlType: button-group label: Icon position options: - - left - - right + - label: Left + value: left + - label: Right + value: right default: right - - type: enum - name: style - group: styles - controlType: button-group - label: Style - options: - - label: Link - value: link - - label: Primary - value: primary - - label: Secondary - value: secondary - default: link - type: string name: elementId group: settings diff --git a/models/MediaGallerySection.yaml b/models/MediaGallerySection.yaml new file mode 100644 index 00000000..d8a37fa7 --- /dev/null +++ b/models/MediaGallerySection.yaml @@ -0,0 +1,156 @@ +type: object +name: MediaGallerySection +label: Media gallery +labelField: title +thumbnail: https://assets.stackbit.com/components/models/thumbnails/default.png +extends: + - Section +groups: + - sectionComponent +fieldGroups: + - name: styles + label: Styles + - name: settings + label: Settings +fields: + - type: string + name: title + label: Title + default: Gallery + - type: string + name: subtitle + label: Subtitle + default: This is the subtitle + - type: list + name: images + label: Images + items: + type: model + models: [ImageBlock] + default: + - type: ImageBlock + url: https://assets.stackbit.com/components/images/default/image-1.jpeg + altText: Image one + caption: Image one caption + - type: ImageBlock + url: https://assets.stackbit.com/components/images/default/image-2.jpeg + altText: Image two + caption: Image two caption + - type: ImageBlock + url: https://assets.stackbit.com/components/images/default/image-3.jpeg + altText: Image three + caption: Image three caption + - type: ImageBlock + url: https://assets.stackbit.com/components/images/default/image-4.jpeg + altText: Image four + caption: Image four caption + - type: number + name: spacing + label: Spacing between images + group: styles + controlType: 'slider' + min: 0 + max: 30 + step: 1 + unit: 'rem' + default: 1 + - type: number + name: columns + label: Images per row + group: styles + controlType: 'slider' + min: 1 + max: 7 + step: 1 + default: 4 + - type: enum + name: aspectRatio + label: Image aspect ratio + group: styles + options: + - label: '1:1' + value: '1:1' + - label: '3:2' + value: '3:2' + - label: '2:3' + value: '2:3' + - label: '4:3' + value: '4:3' + - label: '3:4' + value: '3:4' + - label: '16:9' + value: '16:9' + - label: Auto + value: auto + default: '1:1' + - type: number + name: imageSizePx + label: Max image size, in px + group: styles + controlType: 'slider' + min: 50 + max: 640 + step: 1 + unit: 'px' + default: 300 + - type: boolean + name: showCaption + label: Show caption + default: true + - type: boolean + name: enableHover + label: Enable hover + default: true + - type: style + name: styles + styles: + self: + width: ['narrow', 'wide', 'full'] + height: ['auto', 'screen'] + margin: ['tw0:36'] + padding: ['tw4:36'] + justifyContent: ['flex-start', 'flex-end', 'center'] + borderRadius: '*' + borderWidth: ['0:8'] + borderStyle: '*' + borderColor: + - value: 'border-primary' + label: 'Primary color' + color: '$primary' + - value: 'border-secondary' + label: 'Secondary color' + color: '$secondary' + - value: 'border-dark' + label: 'Dark color' + color: '$dark' + - value: 'border-complementary' + label: 'Complementary color' + color: '$complementary' + - value: 'border-complementary-alt' + label: 'Complementary alt color' + color: '$complementaryAlt' + title: + fontWeight: ['400', '700'] + fontStyle: ['normal', 'italic'] + textAlign: ['left', 'center', 'right'] + subtitle: + fontWeight: ['400', '700'] + fontStyle: ['normal', 'italic'] + textAlign: ['left', 'center', 'right'] + default: + self: + width: full + height: auto + margin: ['mt-0', 'mb-0', 'ml-0', 'mr-0'] + padding: ['pt-12', 'pb-12', 'pl-4', 'pr-4'] + justifyContent: center + borderRadius: none + borderWidth: 0 + borderStyle: none + borderColor: border-dark + title: + textAlign: center + subtitle: + fontWeight: 400 + fontStyle: normal + textAlign: center diff --git a/models/PageLayout.yaml b/models/PageLayout.yaml index f4802f27..d50060d5 100644 --- a/models/PageLayout.yaml +++ b/models/PageLayout.yaml @@ -2,14 +2,13 @@ name: PageLayout label: Page layout: PageLayout hideContent: true -fieldGroups: - - name: seo - label: SEO +thumbnail: https://assets.stackbit.com/components/models/thumbnails/default.png fields: - type: string name: title label: Title default: This is a new page + required: true - type: list name: sections label: Sections @@ -21,7 +20,6 @@ fields: - type: HeroSection elementId: homepage-hero-1 colors: colors-f - backgroundWidth: full title: This Is A Big Hero Headline text: >- Aenean eros ipsum, interdum quis dignissim non, sollicitudin vitae nisl. @@ -38,22 +36,20 @@ fields: label: Learn More url: '/' style: secondary - feature: + media: type: ImageBlock - url: /images/hero.png + url: https://assets.stackbit.com/components/images/default/hero.png altText: Image alt text styles: self: height: auto width: wide - margin: ['mt-0', 'mb-0'] - padding: ['pt-12', 'pb-12'] + margin: ['mt-0', 'mb-0', 'ml-0', 'mr-0'] + padding: ['pt-12', 'pb-12', 'pl-4', 'pr-4'] alignItems: center justifyContent: center flexDirection: row title: - fontWeight: 700 - fontStyle: normal textAlign: left subtitle: fontWeight: 400 @@ -63,8 +59,3 @@ fields: textAlign: left actions: justifyContent: flex-start - - type: model - name: seo - group: seo - models: - - StackbitPageMeta diff --git a/models/PagedPostsSection.yaml b/models/PagedPostsSection.yaml new file mode 100644 index 00000000..3ebdf1f8 --- /dev/null +++ b/models/PagedPostsSection.yaml @@ -0,0 +1,29 @@ +type: object +name: PagedPostsSection +label: Post feed +labelField: title +extends: + - PostFeedSection +fields: + - name: title + hidden: true + default: null + - name: subtitle + hidden: true + default: null + - name: showDate + default: true + - name: showAuthor + default: true + - name: variant + default: variant-d + options: + - label: Three columns grid + value: variant-a + - label: List + value: variant-d + - name: actions + hidden: true + default: [] + - name: colors + default: colors-a diff --git a/models/Person.yaml b/models/Person.yaml index 640113b2..03bd5c5e 100644 --- a/models/Person.yaml +++ b/models/Person.yaml @@ -6,6 +6,7 @@ fields: name: firstName label: First name default: Name + required: true - type: string name: lastName label: Last name @@ -23,9 +24,9 @@ fields: label: Image models: [ImageBlock] default: - url: /images/dianne-ameter.jpg - altText: Role at Company - - type: string - name: id - label: ID - default: name-surname + url: https://assets.stackbit.com/components/images/default/default-person.png + altText: Person photo + - type: slug + name: slug + label: Slug + description: "Slug used to render posts written by this person. For example, if the slug is 'john-doe', a page will be created under /blog/author/john-doe" diff --git a/models/PostFeedCategoryLayout.yaml b/models/PostFeedCategoryLayout.yaml new file mode 100644 index 00000000..b13cd527 --- /dev/null +++ b/models/PostFeedCategoryLayout.yaml @@ -0,0 +1,7 @@ +name: PostFeedCategoryLayout +label: Blog Category +labelField: title +layout: PostFeedCategoryLayout +hideContent: true +extends: + - PostFeedLayout diff --git a/models/PostFeedLayout.yaml b/models/PostFeedLayout.yaml new file mode 100644 index 00000000..31467325 --- /dev/null +++ b/models/PostFeedLayout.yaml @@ -0,0 +1,42 @@ +name: PostFeedLayout +label: Blog +labelField: title +layout: PostFeedLayout +hideContent: true +fields: + - type: string + name: title + label: Title + default: This is a page title + - type: number + name: numOfPostsPerPage + label: Number of Posts per page + description: set to 0 to show all posts on a single page + default: 10 + - type: model + name: postFeed + readOnly: true + label: Post Feed + models: [PagedPostsSection] + default: + title: null + subtitle: null + showDate: true + showAuthor: true + variant: variant-d + colors: colors-a + actions: [] + - type: list + name: topSections + label: Top Sections + items: + type: model + groups: + - sectionComponent + - type: list + name: bottomSections + label: Bottom Sections + items: + type: model + groups: + - sectionComponent diff --git a/models/PostFeedSection.yaml b/models/PostFeedSection.yaml new file mode 100644 index 00000000..bbb55c52 --- /dev/null +++ b/models/PostFeedSection.yaml @@ -0,0 +1,113 @@ +type: object +name: PostFeedSection +label: Post feed +labelField: title +extends: + - Section +fieldGroups: + - name: styles + label: Styles + - name: settings + label: Settings +fields: + - type: string + name: title + label: Title + default: Posts + - type: string + name: subtitle + label: Subtitle + default: Blog posts + - type: boolean + name: showDate + label: Show post date + default: false + - type: boolean + name: showAuthor + label: Show post author + description: Show the author of the post + default: false + - type: enum + name: variant + group: styles + label: Arrangement + default: variant-a + options: + - label: Three columns grid + value: variant-a + - label: Two columns grid + value: variant-b + - label: Mixed grid + value: variant-c + - label: List + value: variant-d + - type: list + name: actions + label: Actions + items: + type: model + models: + - Button + - Link + default: + - type: Button + label: View all + url: '/' + style: primary + - type: style + name: styles + styles: + self: + height: ['auto', 'screen'] + width: ['narrow', 'wide', 'full'] + margin: ['tw0:36'] + padding: ['tw4:36'] + justifyContent: ['flex-start', 'flex-end', 'center'] + borderRadius: '*' + borderWidth: ['0:8'] + borderStyle: '*' + borderColor: + - value: 'border-primary' + label: 'Primary color' + color: '$primary' + - value: 'border-secondary' + label: 'Secondary color' + color: '$secondary' + - value: 'border-dark' + label: 'Dark color' + color: '$dark' + - value: 'border-complementary' + label: 'Complementary color' + color: '$complementary' + - value: 'border-complementary-alt' + label: 'Complementary alt color' + color: '$complementaryAlt' + title: + fontWeight: ['400', '700'] + fontStyle: ['normal', 'italic'] + textAlign: ['left', 'center', 'right'] + subtitle: + fontWeight: ['400', '700'] + fontStyle: ['normal', 'italic'] + textAlign: ['left', 'center', 'right'] + actions: + justifyContent: ['flex-start', 'flex-end', 'center'] + default: + self: + height: auto + width: wide + margin: ['mt-0', 'mb-0', 'ml-0', 'mr-0'] + padding: ['pt-12', 'pb-12', 'pl-4', 'pr-4'] + justifyContent: center + borderRadius: none + borderWidth: 0 + borderStyle: none + borderColor: border-dark + title: + textAlign: center + subtitle: + fontWeight: 400 + fontStyle: normal + textAlign: center + actions: + justifyContent: center diff --git a/models/PostLayout.yaml b/models/PostLayout.yaml index a53a9b3a..d0d9357e 100644 --- a/models/PostLayout.yaml +++ b/models/PostLayout.yaml @@ -1,17 +1,22 @@ name: PostLayout label: Post layout: PostLayout -fieldGroups: - - name: seo - label: SEO +thumbnail: https://assets.stackbit.com/components/models/thumbnails/default.png fields: - type: string name: title label: Title - default: Post Title + default: This is a blog post title + required: true - type: date name: date label: Date + required: true + - type: reference + name: category + label: Category + models: + - PostFeedCategoryLayout - type: reference name: author label: Author @@ -20,7 +25,7 @@ fields: - type: string name: excerpt label: Excerpt - default: This is the excerpt of your blog post visible in the post feed or featured posts. + default: Nunc rutrum felis dui, ut consequat sapien scelerisque vel. Integer condimentum dignissim justo vel faucibus. - type: model name: featuredImage label: Featured image @@ -28,8 +33,9 @@ fields: - ImageBlock default: type: ImageBlock - url: /images/post-1.jpeg + url: https://assets.stackbit.com/components/images/default/post-4.jpeg altText: Post thumbnail image + caption: "" - type: list name: bottomSections label: Sections @@ -37,8 +43,3 @@ fields: type: model groups: - sectionComponent - - type: model - name: seo - group: seo - models: - - StackbitPageMeta diff --git a/models/QuoteSection.yaml b/models/QuoteSection.yaml index f2e34861..1705f184 100644 --- a/models/QuoteSection.yaml +++ b/models/QuoteSection.yaml @@ -1,7 +1,8 @@ type: object name: QuoteSection -label: Quote section +label: Quote labelField: name +thumbnail: https://assets.stackbit.com/components/models/thumbnails/default.png extends: - Section groups: @@ -14,14 +15,13 @@ fieldGroups: fields: - name: colors default: colors-c - - name: backgroundWidth - default: full - type: markdown name: quote label: Quote default: |- “It’s great to see someone taking action while still maintaining a sustainable fish supply to home cooks.” + required: true - type: string name: name label: Author name @@ -38,8 +38,8 @@ fields: - ImageBlock default: type: ImageBlock - url: /images/bg.jpg - altText: Product Marketing Manager + url: https://assets.stackbit.com/components/images/default/bg.jpg + altText: Dots opacity: 30 - type: style name: styles @@ -47,10 +47,28 @@ fields: self: height: ['auto', 'screen'] width: ['narrow', 'wide', 'full'] - margin: ['twt0:36', 'twb0:36'] - padding: ['twt0:36', 'twb0:36'] - alignItems: ['flex-start', 'flex-end', 'center'] + margin: ['tw0:36'] + padding: ['tw4:36'] justifyContent: ['flex-start', 'flex-end', 'center'] + borderRadius: '*' + borderWidth: ['0:8'] + borderStyle: '*' + borderColor: + - value: 'border-primary' + label: 'Primary color' + color: '$primary' + - value: 'border-secondary' + label: 'Secondary color' + color: '$secondary' + - value: 'border-dark' + label: 'Dark color' + color: '$dark' + - value: 'border-complementary' + label: 'Complementary color' + color: '$complementary' + - value: 'border-complementary-alt' + label: 'Complementary alt color' + color: '$complementaryAlt' quote: textAlign: ['left', 'center', 'right'] name: @@ -65,10 +83,13 @@ fields: self: height: auto width: wide - margin: ['mt-0', 'mb-0'] - padding: ['pt-12', 'pb-12'] - alignItems: center + margin: ['mt-0', 'mb-0', 'ml-0', 'mr-0'] + padding: ['pt-12', 'pb-12', 'pl-4', 'pr-4'] justifyContent: center + borderRadius: none + borderWidth: 0 + borderStyle: none + borderColor: border-dark quote: textAlign: center name: diff --git a/models/RecentPostsSection.yaml b/models/RecentPostsSection.yaml new file mode 100644 index 00000000..bfef4272 --- /dev/null +++ b/models/RecentPostsSection.yaml @@ -0,0 +1,26 @@ +type: object +name: RecentPostsSection +label: Recent posts +labelField: title +extends: + - PostFeedSection +groups: + - sectionComponent +fields: + - name: title + default: Recent Posts + - name: subtitle + default: Latest blog posts section example + - name: variant + default: variant-a + options: + - label: Three columns grid + value: variant-a + - label: List + value: variant-d + - name: colors + default: colors-h + - type: number + name: recentCount + label: Number of recent posts to show + default: 6 diff --git a/models/Section.yaml b/models/Section.yaml index 5d8c7bea..520d5d7b 100644 --- a/models/Section.yaml +++ b/models/Section.yaml @@ -9,41 +9,57 @@ fieldGroups: fields: - type: enum name: colors - group: styles label: Colors description: The color theme of the section + group: styles + controlType: palette options: - - label: Base foreground on white background + - label: Colors A value: colors-a - - label: Primary foreground on white background + textColor: '$onLight' + backgroundColor: '$light' + borderColor: '#ececec' + - label: Colors B value: colors-b - - label: White foreground on neutral background + textColor: '$primary' + backgroundColor: '$light' + borderColor: '#ececec' + - label: Colors C value: colors-c - - label: Primary foreground on neutral background + textColor: '$onDark' + backgroundColor: '$dark' + borderColor: '#ececec' + - label: Colors D value: colors-d - - label: Base foreground on primary background + textColor: '$primary' + backgroundColor: '$dark' + borderColor: '#ececec' + - label: Colors E value: colors-e - - label: Base foreground on secondary background + textColor: '$onPrimary' + backgroundColor: '$primary' + borderColor: '#ececec' + - label: Colors F value: colors-f - - label: Primary foreground on secondary background + textColor: '$onSecondary' + backgroundColor: '$secondary' + borderColor: '#ececec' + - label: Colors G value: colors-g - - label: Base foreground on complementary background + textColor: '$primary' + backgroundColor: '$secondary' + borderColor: '#ececec' + - label: Colors H value: colors-h - - label: Base foreground on complementary alt background + textColor: '$onComplementary' + backgroundColor: '$complementary' + borderColor: '#ececec' + - label: Colors I value: colors-i + textColor: '$onComplementaryAlt' + backgroundColor: '$complementaryAlt' + borderColor: '#ececec' default: colors-a - - type: enum - name: backgroundWidth - group: styles - controlType: button-group - label: Background width - description: The background width of the section - options: - - label: Inset - value: inset - - label: Full - value: full - default: full - type: string name: elementId group: settings diff --git a/models/SelectFormControl.yaml b/models/SelectFormControl.yaml index a50b69b7..d11d45b3 100644 --- a/models/SelectFormControl.yaml +++ b/models/SelectFormControl.yaml @@ -9,6 +9,8 @@ fields: - type: string name: name label: Name + required: true + default: city - type: string name: label label: Label diff --git a/models/Social.yaml b/models/Social.yaml index 82c2ed8b..143a5834 100644 --- a/models/Social.yaml +++ b/models/Social.yaml @@ -11,19 +11,21 @@ fields: - type: string name: label label: Label + default: "" - type: string name: altText label: Alt text + default: "Facebook" description: The alternative text for screen readers - type: string name: url label: URL - default: '#' + default: '/' - type: boolean name: showIcon group: styles label: Show icon - default: false + default: true - type: enum name: icon group: styles @@ -47,10 +49,11 @@ fields: value: primary - label: Secondary value: secondary - default: secondary + default: link - type: string name: elementId group: settings label: Element ID description: The unique ID for an HTML element, must not contain whitespace default: '' + diff --git a/models/StackbitPageMeta.yaml b/models/StackbitPageMeta.yaml deleted file mode 100644 index 5c96bde8..00000000 --- a/models/StackbitPageMeta.yaml +++ /dev/null @@ -1,48 +0,0 @@ -name: StackbitPageMeta -type: object -label: Page meta data -fields: - - type: string - name: title - label: Page title - description: The page title that goes into the tag - default: '' - - type: string - name: description - label: Page description - description: The page description that goes into the <meta name="description"> tag - default: '' - - type: list - name: robots - label: Robots - description: The items that go into the <meta name="robots"> tag - items: - type: enum - options: - - all - - index - - follow - - noindex - - nofollow - - noimageindex - - notranslate - - none - - type: list - name: extra - label: Extra - description: Additional definition for specific meta tags such as open-graph, twitter, etc. - items: - type: object - labelField: name - fields: - - type: string - name: name - default: '' - - type: string - name: value - default: '' - - type: string - name: keyName - default: name - - type: boolean - name: relativeUrl diff --git a/models/Testimonial.yaml b/models/Testimonial.yaml index 2ee431d1..765817bf 100644 --- a/models/Testimonial.yaml +++ b/models/Testimonial.yaml @@ -11,6 +11,7 @@ fields: label: Quote default: “It’s great to see someone taking action while still maintaining a sustainable fish supply to home cooks.” + required: true - type: string name: name label: Author name @@ -24,8 +25,8 @@ fields: label: Author image models: [ImageBlock] default: - url: /images/dianne-ameter.jpg - altText: Product Marketing Manager + url: https://assets.stackbit.com/components/images/default/default-person.png + altText: Person photo - type: string name: elementId group: settings @@ -36,7 +37,7 @@ fields: name: styles styles: self: - margin: ['twt0:24', 'twb0:24'] + margin: ['twy0:24'] flexDirection: ['row', 'row-reverse', 'col', 'col-reverse'] quote: textAlign: ['left', 'center', 'right'] @@ -55,7 +56,7 @@ fields: quote: textAlign: left name: - fontWeight: 700 + fontWeight: 400 fontStyle: normal textAlign: left title: diff --git a/models/TestimonialsSection.yaml b/models/TestimonialsSection.yaml index 4f222f01..5bc84edc 100644 --- a/models/TestimonialsSection.yaml +++ b/models/TestimonialsSection.yaml @@ -1,7 +1,8 @@ type: object name: TestimonialsSection -label: Testimonials section +label: Testimonials labelField: title +thumbnail: https://assets.stackbit.com/components/models/thumbnails/default.png extends: - Section groups: @@ -14,8 +15,6 @@ fieldGroups: fields: - name: colors default: colors-h - - name: backgroundWidth - default: full - type: string name: title label: Title @@ -38,8 +37,8 @@ fields: title: Product Marketing Manager at Acme image: type: ImageBlock - url: /images/dianne-ameter.jpg - altText: Product Marketing Manager + url: https://assets.stackbit.com/components/images/default/default-person.png + altText: Person photo styles: self: flexDirection: row @@ -55,10 +54,28 @@ fields: self: height: ['auto', 'screen'] width: ['narrow', 'wide', 'full'] - margin: ['twt0:36', 'twb0:36'] - padding: ['twt0:36', 'twb0:36'] - alignItems: ['flex-start', 'flex-end', 'center'] + margin: ['tw0:36'] + padding: ['tw4:36'] justifyContent: ['flex-start', 'flex-end', 'center'] + borderRadius: '*' + borderWidth: ['0:8'] + borderStyle: '*' + borderColor: + - value: 'border-primary' + label: 'Primary color' + color: '$primary' + - value: 'border-secondary' + label: 'Secondary color' + color: '$secondary' + - value: 'border-dark' + label: 'Dark color' + color: '$dark' + - value: 'border-complementary' + label: 'Complementary color' + color: '$complementary' + - value: 'border-complementary-alt' + label: 'Complementary alt color' + color: '$complementaryAlt' title: fontWeight: ['400', '700'] fontStyle: ['normal', 'italic'] @@ -71,13 +88,14 @@ fields: self: height: auto width: wide - margin: ['mt-0', 'mb-0'] - padding: ['pt-12', 'pb-12'] - alignItems: center + margin: ['mt-0', 'mb-0', 'ml-0', 'mr-0'] + padding: ['pt-12', 'pb-12', 'pl-4', 'pr-4'] justifyContent: center + borderRadius: none + borderWidth: 0 + borderStyle: none + borderColor: border-dark title: - fontWeight: 700 - fontStyle: normal textAlign: center subtitle: fontWeight: 400 diff --git a/models/TextFormControl.yaml b/models/TextFormControl.yaml index af9a2351..32cc3489 100644 --- a/models/TextFormControl.yaml +++ b/models/TextFormControl.yaml @@ -9,6 +9,8 @@ fields: - type: string name: name label: Name + required: true + default: home-address - type: string name: label label: Label diff --git a/models/TextSection.yaml b/models/TextSection.yaml index 7303597c..55582e2a 100644 --- a/models/TextSection.yaml +++ b/models/TextSection.yaml @@ -1,7 +1,8 @@ type: object name: TextSection -label: Text section +label: Text block labelField: title +thumbnail: https://assets.stackbit.com/components/models/thumbnails/default.png extends: - Section groups: @@ -14,8 +15,6 @@ fieldGroups: fields: - name: colors default: colors-f - - name: backgroundWidth - default: full - type: string name: title label: Title @@ -40,10 +39,28 @@ fields: self: height: ['auto', 'screen'] width: ['narrow', 'wide', 'full'] - margin: ['twt0:36', 'twb0:36'] - padding: ['twt0:36', 'twb0:36'] - alignItems: ['flex-start', 'flex-end', 'center'] + margin: ['tw0:36'] + padding: ['tw4:36'] justifyContent: ['flex-start', 'flex-end', 'center'] + borderRadius: '*' + borderWidth: ['0:8'] + borderStyle: '*' + borderColor: + - value: 'border-primary' + label: 'Primary color' + color: '$primary' + - value: 'border-secondary' + label: 'Secondary color' + color: '$secondary' + - value: 'border-dark' + label: 'Dark color' + color: '$dark' + - value: 'border-complementary' + label: 'Complementary color' + color: '$complementary' + - value: 'border-complementary-alt' + label: 'Complementary alt color' + color: '$complementaryAlt' title: fontWeight: ['400', '700'] fontStyle: ['normal', 'italic'] @@ -58,13 +75,14 @@ fields: self: height: auto width: wide - margin: ['mt-0', 'mb-0'] - padding: ['pt-12', 'pb-12'] - alignItems: center + margin: ['mt-0', 'mb-0', 'ml-0', 'mr-0'] + padding: ['pt-12', 'pb-12', 'pl-4', 'pr-4'] justifyContent: center + borderRadius: none + borderWidth: 0 + borderStyle: none + borderColor: border-dark title: - fontWeight: 700 - fontStyle: normal textAlign: center subtitle: fontWeight: 400 diff --git a/models/TextareaFormControl.yaml b/models/TextareaFormControl.yaml index ed91886c..ba1d1a78 100644 --- a/models/TextareaFormControl.yaml +++ b/models/TextareaFormControl.yaml @@ -9,6 +9,8 @@ fields: - type: string name: name label: Name + required: true + default: description - type: string name: label label: Label diff --git a/models/ThemeStyle.yaml b/models/ThemeStyle.yaml index df63c495..3e0efff8 100644 --- a/models/ThemeStyle.yaml +++ b/models/ThemeStyle.yaml @@ -15,24 +15,56 @@ fields: label: Font - headlines & subtitles group: text-styles options: - - label: System sans - value: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" - - label: System serif - value: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif + - label: Sans + value: sans + - label: Serif + value: serif - type: object name: h1 label: H1 group: text-styles + readOnly: true fields: + - type: enum + name: size + label: Font size + options: + - label: XS + value: xs + - label: SM + value: sm + - label: Base + value: base + - label: LG + value: lg + - label: XL + value: xl + - label: 2XL + value: 2xl + - label: 3XL + value: 3xl + - label: 4XL + value: 4xl + - label: 5XL + value: 5xl + - label: 6XL + value: 6xl + - label: 7XL + value: 7xl + - label: 8XL + value: 8xl + - label: 9XL + value: 9xl + default: 5xl - type: enum name: weight label: Font weight controlType: button-group options: - - label: Bold - value: bold - label: Normal value: normal + - label: Bold + value: bold default: bold - type: enum name: decoration @@ -51,7 +83,7 @@ fields: label: Case controlType: button-group options: - - label: default + - label: Default value: none - label: ag value: lowercase @@ -66,30 +98,62 @@ fields: controlType: button-group options: - label: Tighter - value: -0.05em + value: tighter - label: Tight - value: -0.025em + value: tight - label: Normal value: normal - label: Wide - value: 0.025em + value: wide - label: Wider - value: 0.05em + value: wider default: normal - type: object name: h2 label: H2 group: text-styles + readOnly: true fields: + - type: enum + name: size + label: Font size + options: + - label: XS + value: xs + - label: SM + value: sm + - label: Base + value: base + - label: LG + value: lg + - label: XL + value: xl + - label: 2XL + value: 2xl + - label: 3XL + value: 3xl + - label: 4XL + value: 4xl + - label: 5XL + value: 5xl + - label: 6XL + value: 6xl + - label: 7XL + value: 7xl + - label: 8XL + value: 8xl + - label: 9XL + value: 9xl + default: 4xl - type: enum name: weight label: Font weight controlType: button-group options: - - label: Bold - value: bold - label: Normal value: normal + - label: Bold + value: bold default: bold - type: enum name: decoration @@ -108,7 +172,7 @@ fields: label: Case controlType: button-group options: - - label: default + - label: Default value: none - label: ag value: lowercase @@ -123,30 +187,151 @@ fields: controlType: button-group options: - label: Tighter - value: -0.05em + value: tighter - label: Tight - value: -0.025em + value: tight - label: Normal value: normal - label: Wide - value: 0.025em + value: wide - label: Wider - value: 0.05em + value: wider default: normal - type: object name: h3 label: H3 group: text-styles + readOnly: true fields: + - type: enum + name: size + label: Font size + options: + - label: XS + value: xs + - label: SM + value: sm + - label: Base + value: base + - label: LG + value: lg + - label: XL + value: xl + - label: 2XL + value: 2xl + - label: 3XL + value: 3xl + - label: 4XL + value: 4xl + - label: 5XL + value: 5xl + - label: 6XL + value: 6xl + - label: 7XL + value: 7xl + - label: 8XL + value: 8xl + - label: 9XL + value: 9xl + default: 3xl - type: enum name: weight label: Font weight controlType: button-group options: + - label: Normal + value: normal - label: Bold value: bold + default: bold + - type: enum + name: decoration + label: Decoration + controlType: button-group + options: + - label: None + value: none + - label: Underline + value: underline + - label: Line through + value: line-through + default: none + - type: enum + name: case + label: Case + controlType: button-group + options: + - label: Default + value: none + - label: ag + value: lowercase + - label: Ag + value: capitalize + - label: AG + value: uppercase + default: none + - type: enum + name: letterSpacing + label: Letter spacing + controlType: button-group + options: + - label: Tighter + value: tighter + - label: Tight + value: tight - label: Normal value: normal + - label: Wide + value: wide + - label: Wider + value: wider + default: normal + - type: object + name: h4 + label: H4 + group: text-styles + readOnly: true + fields: + - type: enum + name: size + label: Font size + options: + - label: XS + value: xs + - label: SM + value: sm + - label: Base + value: base + - label: LG + value: lg + - label: XL + value: xl + - label: 2XL + value: 2xl + - label: 3XL + value: 3xl + - label: 4XL + value: 4xl + - label: 5XL + value: 5xl + - label: 6XL + value: 6xl + - label: 7XL + value: 7xl + - label: 8XL + value: 8xl + - label: 9XL + value: 9xl + default: 2xl + - type: enum + name: weight + label: Font weight + controlType: button-group + options: + - label: Normal + value: normal + - label: Bold + value: bold default: bold - type: enum name: decoration @@ -165,7 +350,7 @@ fields: label: Case controlType: button-group options: - - label: default + - label: Default value: none - label: ag value: lowercase @@ -180,76 +365,277 @@ fields: controlType: button-group options: - label: Tighter - value: -0.05em + value: tighter - label: Tight - value: -0.025em + value: tight - label: Normal value: normal - label: Wide - value: 0.025em + value: wide - label: Wider - value: 0.05em + value: wider + default: normal + - type: object + name: h5 + label: H5 + group: text-styles + readOnly: true + fields: + - type: enum + name: size + label: Font size + options: + - label: XS + value: xs + - label: SM + value: sm + - label: Base + value: base + - label: LG + value: lg + - label: XL + value: xl + - label: 2XL + value: 2xl + - label: 3XL + value: 3xl + - label: 4XL + value: 4xl + - label: 5XL + value: 5xl + - label: 6XL + value: 6xl + - label: 7XL + value: 7xl + - label: 8XL + value: 8xl + - label: 9XL + value: 9xl + default: xl + - type: enum + name: weight + label: Font weight + controlType: button-group + options: + - label: Normal + value: normal + - label: Bold + value: bold + default: bold + - type: enum + name: decoration + label: Decoration + controlType: button-group + options: + - label: None + value: none + - label: Underline + value: underline + - label: Line through + value: line-through + default: none + - type: enum + name: case + label: Case + controlType: button-group + options: + - label: Default + value: none + - label: ag + value: lowercase + - label: Ag + value: capitalize + - label: AG + value: uppercase + default: none + - type: enum + name: letterSpacing + label: Letter spacing + controlType: button-group + options: + - label: Tighter + value: tighter + - label: Tight + value: tight + - label: Normal + value: normal + - label: Wide + value: wide + - label: Wider + value: wider + default: normal + - type: object + name: h6 + label: H6 + group: text-styles + readOnly: true + fields: + - type: enum + name: size + label: Font size + options: + - label: XS + value: xs + - label: SM + value: sm + - label: Base + value: base + - label: LG + value: lg + - label: XL + value: xl + - label: 2XL + value: 2xl + - label: 3XL + value: 3xl + - label: 4XL + value: 4xl + - label: 5XL + value: 5xl + - label: 6XL + value: 6xl + - label: 7XL + value: 7xl + - label: 8XL + value: 8xl + - label: 9XL + value: 9xl + default: lg + - type: enum + name: weight + label: Font weight + controlType: button-group + options: + - label: Normal + value: normal + - label: Bold + value: bold + default: bold + - type: enum + name: decoration + label: Decoration + controlType: button-group + options: + - label: None + value: none + - label: Underline + value: underline + - label: Line through + value: line-through + default: none + - type: enum + name: case + label: Case + controlType: button-group + options: + - label: Default + value: none + - label: ag + value: lowercase + - label: Ag + value: capitalize + - label: AG + value: uppercase + default: none + - type: enum + name: letterSpacing + label: Letter spacing + controlType: button-group + options: + - label: Tighter + value: tighter + - label: Tight + value: tight + - label: Normal + value: normal + - label: Wide + value: wide + - label: Wider + value: wider default: normal - type: enum name: fontBody label: Font - body & captions group: text-styles options: - - label: Sytem sans - value: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" - - label: System serif - value: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif + - label: Sans + value: sans + - label: Serif + value: serif + - type: color + name: main + label: Site background + group: color-palettes + - type: color + name: light + label: Light + group: color-palettes + - type: color + name: onLight + label: On light + group: color-palettes - type: color - name: body - label: Body + name: dark + label: Dark group: color-palettes - type: color - name: headlines - label: Headlines + name: onDark + label: On dark group: color-palettes - type: color name: primary label: Primary group: color-palettes + - type: color + name: onPrimary + label: On primary + group: color-palettes - type: color name: secondary label: Secondary group: color-palettes - type: color - name: neutral - label: Neutral + name: onSecondary + label: On secondary group: color-palettes - type: color name: complementary label: Complementary group: color-palettes + - type: color + name: onComplementary + label: On complementary + group: color-palettes - type: color name: complementaryAlt - label: Complementary Alt + label: Complementary alt + group: color-palettes + - type: color + name: onComplementaryAlt + label: On complementary alt group: color-palettes - type: object name: buttonPrimary label: Primary button group: button-styles + readOnly: true fields: - type: enum - name: radius - label: Corner radius + name: weight + label: Font weight controlType: button-group options: - - label: None - value: 0 - - label: Small - value: 0.125rem - - label: Large - value: 9999px - default: none + - label: Normal + value: normal + - label: Bold + value: bold + default: normal - type: enum name: case label: Case controlType: button-group options: - - label: default + - label: Default value: none - label: ag value: lowercase @@ -258,29 +644,190 @@ fields: - label: AG value: uppercase default: none + - type: enum + name: letterSpacing + label: Letter spacing + controlType: button-group + options: + - label: Tighter + value: tighter + - label: Tight + value: tight + - label: Normal + value: normal + - label: Wide + value: wide + - label: Wider + value: wider + default: normal + - type: enum + name: borderRadius + label: Corner radius + controlType: button-group + options: + - label: None + value: none + - label: Small + value: md + - label: Large + value: full + default: none + - type: number + name: horizontalPadding + label: Horizontal padding + controlType: 'slider' + min: 0 + max: 30 + step: 1 + unit: 'px' + default: 24 + - type: number + name: verticalPadding + label: Vertical padding + controlType: 'slider' + min: 0 + max: 30 + step: 1 + unit: 'px' + default: 12 + - type: enum + name: shadow + label: Shadow + controlType: button-group + options: + - label: None + value: none + - label: Mild + value: md + - label: Float + value: xl + default: none - type: object name: buttonSecondary label: Secondary button group: button-styles + readOnly: true fields: - type: enum - name: radius + name: weight + label: Font weight + controlType: button-group + options: + - label: Normal + value: normal + - label: Bold + value: bold + default: bold + - type: enum + name: case + label: Case + controlType: button-group + options: + - label: Default + value: none + - label: ag + value: lowercase + - label: Ag + value: capitalize + - label: AG + value: uppercase + default: none + - type: enum + name: letterSpacing + label: Letter spacing + controlType: button-group + options: + - label: Tighter + value: tighter + - label: Tight + value: tight + - label: Normal + value: normal + - label: Wide + value: wide + - label: Wider + value: wider + default: normal + - type: enum + name: borderRadius label: Corner radius controlType: button-group options: - label: None - value: 0 + value: none - label: Small - value: 0.125rem + value: md - label: Large - value: 9999px + value: full default: none + - type: enum + name: borderStyle + label: Border style + controlType: button-group + options: + - label: None + value: none + - label: Solid + value: solid + - label: Dashed + value: dashed + - label: Dotted + value: dotted + - label: Double + value: double + default: solid + - type: number + name: horizontalPadding + label: Horizontal padding + controlType: 'slider' + min: 0 + max: 30 + step: 1 + unit: 'px' + default: 24 + - type: number + name: verticalPadding + label: Vertical padding + controlType: 'slider' + min: 0 + max: 30 + step: 1 + unit: 'px' + default: 12 + - type: enum + name: shadow + label: Shadow + controlType: button-group + options: + - label: None + value: none + - label: Mild + value: md + - label: Float + value: xl + default: none + - type: object + name: link + label: Link + group: button-styles + readOnly: true + fields: + - type: enum + name: weight + label: Font weight + controlType: button-group + options: + - label: Normal + value: normal + - label: Bold + value: bold + default: bold - type: enum name: case label: Case controlType: button-group options: - - label: default + - label: Default value: none - label: ag value: lowercase @@ -289,3 +836,19 @@ fields: - label: AG value: uppercase default: none + - type: enum + name: letterSpacing + label: Letter spacing + controlType: button-group + options: + - label: Tighter + value: tighter + - label: Tight + value: tight + - label: Normal + value: normal + - label: Wide + value: wide + - label: Wider + value: wider + default: normal diff --git a/models/VideoBlock.yaml b/models/VideoBlock.yaml index bab3c531..a4a4341b 100644 --- a/models/VideoBlock.yaml +++ b/models/VideoBlock.yaml @@ -8,12 +8,14 @@ fieldGroups: fields: - type: string name: url - label: Video + label: Video source (.mp4) description: The URL of the video (.mp4) + default: 'https://assets.stackbit.com/components/videos/default/stackbit-for-marketers.mp4' - type: image name: thumbnailUrl label: Video thumbnail description: The URL of the video thumbnail + default: 'https://assets.stackbit.com/components/images/default/stackbit-for-marketers.jpeg' - type: boolean name: autoplay label: Autoplay @@ -29,7 +31,7 @@ fields: - type: boolean name: controls label: Controls - default: false + default: true - type: string name: elementId group: settings diff --git a/package-lock.json b/package-lock.json index 67d90282..11650728 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@stackbit/components", - "version": "0.1.43", + "version": "0.1.56", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index e4cc1e85..9b2e25c1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stackbit/components", - "version": "0.1.43", + "version": "0.1.56", "description": "Stackbit components library", "keywords": [ "stackbit", @@ -22,12 +22,14 @@ "build": "node ./scripts/build-storybook.js && build-storybook -s ./public", "dist": "./scripts/build-dist.js --clean", "dist-local": "./scripts/build-dist.js --local", + "dist-sync": "./scripts/build-dist.js", "build:ts": "rm -rf dist && tsc", "dev:ts": "tsc --watch", "lint": "eslint src", "prettier": "prettier --write src scripts", "version-minor": "npm version minor -m \"bumped version to v%s\"", - "version-patch": "npm version patch -m \"bumped version to v%s\"" + "version-patch": "npm version patch -m \"bumped version to v%s\"", + "prepare": "npm run dist" }, "repository": { "type": "git", diff --git a/public/images/bg.jpg b/public/images/bg.jpg deleted file mode 100644 index ed830ca2..00000000 Binary files a/public/images/bg.jpg and /dev/null differ diff --git a/public/images/contact.png b/public/images/contact.png deleted file mode 100644 index cde3f584..00000000 Binary files a/public/images/contact.png and /dev/null differ diff --git a/public/images/desmond-eagle.jpg b/public/images/desmond-eagle.jpg deleted file mode 100644 index c2c723cb..00000000 Binary files a/public/images/desmond-eagle.jpg and /dev/null differ diff --git a/public/images/dianne-ameter.jpg b/public/images/dianne-ameter.jpg deleted file mode 100644 index 55f127c5..00000000 Binary files a/public/images/dianne-ameter.jpg and /dev/null differ diff --git a/public/images/hero.png b/public/images/hero.png deleted file mode 100644 index 17edb6d2..00000000 Binary files a/public/images/hero.png and /dev/null differ diff --git a/public/images/hilary-ouse.jpg b/public/images/hilary-ouse.jpg deleted file mode 100644 index c522c032..00000000 Binary files a/public/images/hilary-ouse.jpg and /dev/null differ diff --git a/public/images/hugh-saturation.jpg b/public/images/hugh-saturation.jpg deleted file mode 100644 index fd458631..00000000 Binary files a/public/images/hugh-saturation.jpg and /dev/null differ diff --git a/public/images/isabelle-parks.jpg b/public/images/isabelle-parks.jpg deleted file mode 100644 index 8c970a05..00000000 Binary files a/public/images/isabelle-parks.jpg and /dev/null differ diff --git a/public/images/logo-alt.svg b/public/images/logo-alt.svg deleted file mode 100644 index 10dab42f..00000000 --- a/public/images/logo-alt.svg +++ /dev/null @@ -1 +0,0 @@ -<svg width="29" height="38" xmlns="http://www.w3.org/2000/svg"><path d="M29 15v23H5.84V26.5h11.58V15H29ZM23.16 0v11.5H11.58V23H0V0h23.16Z" fill="#FFF" fill-rule="evenodd"/></svg> \ No newline at end of file diff --git a/public/images/logo.svg b/public/images/logo.svg deleted file mode 100644 index 653dd087..00000000 --- a/public/images/logo.svg +++ /dev/null @@ -1 +0,0 @@ -<svg width="29" height="38" xmlns="http://www.w3.org/2000/svg"><path d="M29 15v23H5.84V26.5h11.58V15H29ZM23.16 0v11.5H11.58V23H0V0h23.16Z" fill="#282F36" fill-rule="evenodd"/></svg> \ No newline at end of file diff --git a/public/images/post-1.jpeg b/public/images/post-1.jpeg deleted file mode 100644 index b37684bf..00000000 Binary files a/public/images/post-1.jpeg and /dev/null differ diff --git a/public/images/post-2.jpeg b/public/images/post-2.jpeg deleted file mode 100644 index ea414f7c..00000000 Binary files a/public/images/post-2.jpeg and /dev/null differ diff --git a/public/images/post-3.jpeg b/public/images/post-3.jpeg deleted file mode 100644 index b099fe6c..00000000 Binary files a/public/images/post-3.jpeg and /dev/null differ diff --git a/public/images/stackbit-for-marketers.jpeg b/public/images/stackbit-for-marketers.jpeg deleted file mode 100644 index 8d09f816..00000000 Binary files a/public/images/stackbit-for-marketers.jpeg and /dev/null differ diff --git a/public/images/the-logo.svg b/public/images/the-logo.svg deleted file mode 100644 index e2ae9f82..00000000 --- a/public/images/the-logo.svg +++ /dev/null @@ -1 +0,0 @@ -<svg width="130" height="67" viewBox="0 0 130 67" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M1.927 59.342l-.395.207c.024.046.052.09.079.136.118-.121.221-.234.316-.343M1.425 57.441l-.124.066c.034.031.056.066.084.101.011-.055.022-.111.04-.167M1.614 59.689c.301.502.736.933.806 1.557l-.875.459c-.071.397.296.564.444.849-.219.114-.437.228-.363.37.051.446.417.568.887.434.112-2.08 2.216-3.902-.899-3.669M2.766 57.641l-1.152.603c.05.388.058.797.344 1.061.472-.551.692-1.015.808-1.664M91.72 10.272c-.045-.086-.049-.142.215-.119-.077.04-.144.081-.215.119.04.083.114.195.042.298.678-.56 1.491-1.179 2.333-1.677.034-.21.063-.419.083-.623-2.099 1.207-4.242 2.329-5.6 4.001 1.24-.649 1.963-1.343 3.142-1.999M93.897 7.33c.074-.04.142-.081.215-.12-.262-.024-.259.032-.215.12M57.382 30.525c-1.259.816-2.163 1.912-3.088 3 2.28-1.706 4.729-3.245 6.347-4.78a113.143 113.143 0 01-3.259 1.78M49.436 38.447c1.775-.593 2.94-1.653 3.977-2.807a368.695 368.695 0 01-3.721 2.404c-.085.134-.179.267-.256.403M50.79 36.612c1.501-.777 2.516-1.926 3.504-3.087-1.29.964-2.512 1.984-3.504 3.087M73.645 8.084c.77-.925 1.274-1.417 1.589-1.642.047-.276.119-.623.229-1.067a5.829 5.829 0 00-.175.092 85.155 85.155 0 01-2.726 2.319c-.332.402-.638.808-.856 1.22a41.52 41.52 0 001.939-.922M75.234 6.442c-.397 2.363 1.233-.873 0 0M73.516 18.661l-.151.08c-.128.109-.261.217-.387.326.183-.137.356-.27.538-.406M59.223 21.043a31.263 31.263 0 002.429-1.646c-1.677 1.07-3.37 2.144-4.617 3.332.218-.114.513-.087.732-.202.29-.511.797-1.138 1.456-1.484" fill="#ECEEF1"/><path d="M55.004 25.776c2.328-2.479 5.319-4.228 7.87-6.284 1.968-1.571 4.747-2.126 6.199-4.148l-.222-.424-.144.256c-.812.319-1.551.417-2.257.636.029-.032.064-.063.093-.096l-.183.125a4.02 4.02 0 00-1.381.746c-.2.191-.405.383-.613.572-2.607 1.685-5.317 3.383-7.331 5.57-1.31 1.227-2.253 2.623-3.564 3.851.437-.229 1.169-.433 1.533-.804zm6.312-10.647c-.801.702-1.584 1.367-2.626 1.913.873-.642 1.749-1.277 2.626-1.913zM44.409 27.296c-1.994 1.81-4.409 3.425-6.651 4.448-1.753.918-6.344 4.403-4.578 5.643.554-4.219 14.449-7.646 11.229-10.091zm.764 7.415c-1.382 1.624-3.573 2.771-5.614 4.202-.657.344-1.017 1.253-1.893 1.712-1.022.714-1.53 1.342-2.333 1.941l.807-.061c-1.608.663-2.04 1.97-3.721 2.488.075.143.004.54-.215.655-1.02.714-2.265 1.006-2.993 1.747-1.02.715-2.114 1.288-2.843 2.03-.22.115-.434.768-.798 1.14-.505.336-1.021.653-1.534.972.044.025.085.052.124.078.438-.222.873-.468 1.264-.794 1.167-.971 2.551-2.057 3.79-2.886 3.139-2.004 5.908-4.176 8.676-6.347.583-.485 1.093-1.112 1.675-1.597 1.675-1.598 4.159-2.72 4.953-4.396.145-.257.583-.487.655-.884zm-31.869 18.69c-1.631.544-3.44 1.906-5.238 3.127a.442.442 0 00.039.118c1.674-.71 3.466-2.089 5.199-3.245zM8.11 55.947c.194-.176.39-.367.582-.563a2.25 2.25 0 01-.155-.044c-.212.11-.353.352-.427.607zm71.546-42.18a113.82 113.82 0 00-6.291 4.974c-4.568 2.459-8.823 5.118-12.198 8.359-2.91 2.967-9.19 5.895-11.509 9.993a7.78 7.78 0 001.132-.481c-.413.462-.782.939-1.098 1.432-5.528 3.521-11.047 6.799-16.957 9.893-.877.459-1.311 1.229-2.187 1.688-.876.486-1.734.971-2.587 1.456.013.034.04.06.08.077-3.513 2.069-6.917 4.206-10.409 6.628-1.678 1.059-3.506 1.836-5.257 2.753-.656.344-.953-.222-1.465-.134-2.122.21-3.732.332-5.85 1.081l-.223-.424c-.276.206-.55.344-.796.415.111-2.081 2.215-3.903-.901-3.668l-.002-.005a7.8 7.8 0 00.316-.344l.042-.022-.011-.014c.472-.551.691-1.014.807-1.663l-1.152.602c-.031-.236-.088-.459-.231-.636.013-.055.024-.11.042-.167.171-.088.314-.164.314-.164a1.837 1.837 0 00-.047-.392c.686-1.134 2.104-2.279 1.492-2.707-.392-.18-.99.466-1.729 1.084a1.023 1.023 0 00-.24-.053c1.021-.715-.519-.99.064-1.475.876-.459 1.675-1.06 2.551-1.518 3.566-1.868 6.498-3.582 9.778-5.841.145-.099.291-.194.436-.291a32.597 32.597 0 014.914-2.696 5.35 5.35 0 01-.187.448c1.385-.61 2.742-1.28 3.969-2.197 2.988-2.287 5.976-4.572 9.405-6.548 3.612-2.036 6.992-4.184 10.47-6.609-1.358 1.112-2.729 2.195-4.24 3.111-.709.352-1.412.711-2.075 1.095a18.406 18.406 0 002.075-1.095c2.728-1.357 5.59-2.639 6.974-5.055.287-.001.361.141.579.027 1.534-.803 3.14-1.464 4.157-2.718-.074-.142.584-.487.217-.655 1.24-.83 2.774-1.632 3.939-2.603.521-.39.945-.958 1.339-1.588 4.305-3.22 8.552-6.418 13.242-9.788 1.187-.795 2.636-1.561 3.91-2.228-1.627 1.454-3.354 2.857-5.13 4.236-1.957.891-3.778 1.847-4.898 3.358-.279.319-.559.627-.846.929a239.552 239.552 0 005.744-4.287c1.154-.529 2.356-1.034 3.487-1.619-.017.022-.033.044-.053.065-.789.646-1.591 1.284-2.407 1.916-1.74.794-3.371 1.638-4.499 2.878-.14.154-.277.315-.399.482-.277.317-.56.626-.846.927a292.157 292.157 0 003.571-2.634c.73-.546 1.456-1.097 2.173-1.653.512-.232 1.032-.463 1.551-.696-.035.062-.073.127-.101.191-.367.371-.722 2.675.157 2.756 3.352-1.801 7.732-4.951 7.806-4.809.514.452-4.875 4.22-4.582 4.248.357-.106.709-.223 1.056-.345-.247.275-.485.551-.691.83-.583.484-1.534.803-1.825 1.315-1.087 1.652-2.988 2.286-4.443 3.768-.874 1-1.891 2.252-2.907 3.507.147.282-.585.486-.217.654-1.236.648-2.666 1.397-2.763 2.5-.026.024-.052.045-.078.068-.087.046-.186.159-.285.292-2.132.932-3.156 2.468-4.735 3.989-.604.408-1.231.797-1.902 1.148.438-.229 1.168-.432 1.533-.804.126-.114.249-.229.369-.344 1.564-1.058 2.949-2.264 4.368-3.398.086-.151.223-.394.367-.591.118-.052.237-.103.359-.15a1.818 1.818 0 01.004-.21c1.3-1.198 2.933-2.239 4.003-3.33 2.177-1.756 4.893-2.875 7.413-4.092a119.541 119.541 0 00-3.242 2.674 162.148 162.148 0 003.882-2.989c.215-.107.424-.212.633-.323l1.315-.688c-.442.152-.873.317-1.298.486.732-.59 1.45-1.183 2.148-1.788 4.044-2.961 8.396-5.677 12.956-7.787a6.32 6.32 0 01-.029.67c-2.099 1.206-4.241 2.328-5.598 4.001 1.236-.647 1.961-1.344 3.139-1.998.042.082.115.193.042.297.679-.561 1.491-1.18 2.334-1.678-.085.512-.207 1.037-.327 1.563-.291.512-.947.857-1.531 1.342-2.714 1.734-5.431 3.064-8.051 4.872-2.52 1.252-5.038 2.503-7.469 3.808 2.218-1.67 4.237-3.245 6.14-4.894z" fill="#ECEEF1"/><path d="M75.441 15.552c.856-.668 1.723-1.331 2.609-1.981a66.319 66.319 0 001.918-1.725c3.119-2.598 7.36-4.494 10.958-6.813a2.546 2.546 0 00-.682-1.272c-4.342 1.686-8.045 4.592-12.267 6.503-.024.031-.05.061-.073.094-1.308 1.767-4.303 2.976-6.123 4.829-1.745 1.996-3.787 3.426-5.605 5.28 3.164-1.657 6.012-3.537 9.265-4.915M53.413 35.64a488.1 488.1 0 002.452-1.618 83.206 83.206 0 006.094-4.809 120.604 120.604 0 01-4.8 2.666c-1.555 1.006-2.567 2.444-3.746 3.761" fill="#ECEEF1"/><path d="M63.516 27.853c-.523.464-1.039.915-1.557 1.36 2.331-1.36 4.611-2.771 6.88-4.193 3.586-2.613 7.213-5.151 10.71-7.932.402-.308.807-.6 1.216-.88-7.319 3.63-14.616 7.247-19.821 12.246-.093.097-.202.194-.303.291 2.872-1.627 5.654-3.346 8.42-5.079-1.868 1.36-3.725 2.739-5.545 4.187M74.612 16.199c.216-.104.428-.209.64-.315.221-.175.435-.349.65-.525-.154.065-.309.128-.461.193-.277.217-.556.429-.829.647M66.45 15.812l-.09.029a95.73 95.73 0 01-1.994 1.318 35.617 35.617 0 01-2.714 2.238c1.811-1.154 3.599-2.301 4.798-3.585M58.603 15.601c-.219.114-.655.342-.875.459l-.265.463c.208-.1.42-.199.633-.296l.507-.626M46.875 24.657c3.593-2.584 6.929-5.067 10.231-7.537.122-.194.241-.394.357-.597-2.466 1.181-4.778 2.623-6.589 4.567-.363.371-.799 1.139-1.236 1.368-2.003 1.221-3.742 2.703-5.497 4.143.879-.613 1.762-1.239 2.659-1.891.026-.017.05-.035.075-.053M128.101 4.422l.444-.235c-.024-.045-.054-.089-.081-.135a8.794 8.794 0 00-.363.37M128.56 6.346l.139-.074c-.036-.03-.058-.066-.087-.1-.015.057-.029.115-.052.174M128.461 4.048c-.306-.5-.763-.919-.81-1.556l.983-.517c.096-.413-.297-.565-.446-.848.245-.13.491-.259.416-.399-.035-.457-.43-.562-.953-.399-.222 2.141-2.62 4.125.81 3.719M127.099 6.213l1.293-.682c-.038-.394-.026-.814-.328-1.069-.543.59-.808 1.078-.965 1.751M27.224 59.627c.045.087.047.144-.242.135.086-.046.162-.091.242-.135-.04-.082-.116-.192-.032-.303-.772.612-1.693 1.291-2.641 1.848a9.751 9.751 0 00-.12.643c2.36-1.351 4.765-2.619 6.336-4.409-1.393.734-2.219 1.486-3.543 2.221M24.693 62.766c-.083.044-.159.09-.242.134.287.011.286-.046.242-.134M65.872 36.987c1.421-.904 2.465-2.079 3.532-3.246-2.584 1.875-5.344 3.586-7.193 5.25a149.017 149.017 0 013.661-2.004M74.972 28.427c-1.977.705-3.305 1.856-4.498 3.096a461.401 461.401 0 014.198-2.669c.098-.141.209-.282.3-.427M73.398 30.384c-1.685.879-2.853 2.112-3.994 3.357 1.462-1.058 2.853-2.171 3.994-3.357M46.948 60.904c-.89.991-1.467 1.524-1.823 1.771-.065.286-.161.646-.303 1.108l.197-.103a102.18 102.18 0 013.101-2.529c.384-.43.739-.863 1-1.299-.732.338-1.463.684-2.172 1.052M45.125 62.675c.55-2.448-1.395.962 0 0M47.6 50.036l.169-.09.441-.355c-.208.151-.405.297-.61.445M63.395 46.823a39.544 39.544 0 00-2.745 1.821c1.891-1.189 3.802-2.382 5.226-3.67-.245.129-.567.118-.812.247-.343.541-.93 1.213-1.669 1.602" fill="#ECEEF1"/><path d="M68.251 41.736c-2.673 2.672-6.038 4.627-8.936 6.875-2.236 1.719-5.311 2.438-7.002 4.592l.224.425.17-.271c.907-.372 1.722-.511 2.507-.775-.034.035-.073.069-.107.104l.206-.138a5.08 5.08 0 001.552-.84c.228-.208.463-.415.7-.621 2.941-1.869 5.996-3.759 8.311-6.113 1.497-1.329 2.599-2.814 4.097-4.145-.491.259-1.304.507-1.722.907zm-7.438 11.272c.913-.764 1.803-1.49 2.973-2.106-.989.706-1.98 1.406-2.973 2.106zm19.135-13.401c2.275-1.966 5.002-3.753 7.511-4.924 1.969-1.038 7.173-4.863 5.296-6.039-.813 4.36-16.221 8.626-12.807 10.963zm-.479-7.573c1.593-1.741 4.052-3.037 6.361-4.615.737-.389 1.176-1.342 2.159-1.86 1.155-.789 1.743-1.459 2.654-2.12l-.888.108c1.796-.768 2.332-2.133 4.201-2.756-.074-.142.021-.554.268-.683 1.154-.789 2.533-1.155 3.367-1.955 1.154-.789 2.383-1.435 3.218-2.236.247-.13.513-.813.931-1.214.57-.373 1.151-.725 1.73-1.08a2.036 2.036 0 01-.133-.074c-.491.252-.98.527-1.425.883-1.327 1.06-2.897 2.25-4.297 3.168-3.54 2.225-6.683 4.604-9.825 6.982-.663.528-1.252 1.201-1.915 1.729-1.914 1.732-4.693 3.016-5.646 4.781-.171.271-.663.53-.76.942zm35.863-20.902c1.816-.647 3.867-2.141 5.898-3.492a.403.403 0 00-.038-.12c-1.869.82-3.903 2.333-5.86 3.612zm5.821-2.894c-.22.192-.445.399-.666.611.058.009.114.021.169.037.239-.125.405-.382.497-.648zM40.627 55.392a142.477 142.477 0 007.142-5.446c5.13-2.77 9.926-5.729 13.785-9.238 3.337-3.203 10.367-6.546 13.109-10.878a9.839 9.839 0 00-1.265.554 13.52 13.52 0 001.274-1.53c6.234-3.912 12.447-7.573 19.08-11.068.983-.518 1.497-1.332 2.48-1.85.986-.546 1.95-1.09 2.91-1.634a.137.137 0 00-.085-.075c3.955-2.313 7.791-4.691 11.74-7.365 1.891-1.177 3.934-2.074 5.898-3.108.739-.39 1.036.176 1.603.058 2.338-.33 4.11-.542 6.47-1.424l.223.423c.314-.227.62-.382.894-.468-.222 2.141-2.618 4.126.811 3.718l.002.004a8.78 8.78 0 00-.362.37l-.048.025.011.014c-.544.591-.807 1.079-.965 1.752l1.292-.681c.023.24.075.467.224.641-.018.057-.033.114-.055.172l-.352.186c-.005.142.006.275.032.4-.807 1.201-2.418 2.454-1.767 2.861.421.163 1.108-.533 1.948-1.207.084.024.175.039.262.042-1.154.789.521.989-.142 1.517-.983.519-1.889 1.179-2.873 1.696-4.001 2.11-7.3 4.028-11.009 6.523-.163.11-.327.215-.491.322a40.892 40.892 0 01-5.521 3.032c.068-.16.144-.316.226-.469-1.548.701-3.069 1.462-4.46 2.469-3.388 2.508-6.776 5.015-10.633 7.228-4.061 2.285-7.872 4.672-11.806 7.349 1.543-1.216 3.1-2.402 4.802-3.422a47.708 47.708 0 002.329-1.237c-.814.371-1.584.788-2.329 1.237-3.059 1.539-6.26 3.009-7.896 5.564-.314.016-.388-.125-.634.004-1.72.907-3.515 1.672-4.691 3.014.074.141-.664.53-.27.683-1.4.918-3.122 1.826-4.446 2.885-.591.428-1.084 1.034-1.547 1.702-4.877 3.537-9.691 7.049-14.999 10.762-1.341.88-2.968 1.743-4.397 2.497 1.855-1.58 3.817-3.113 5.833-4.624 2.189-1.021 4.234-2.1 5.535-3.712.321-.342.644-.674.973-.999a303.823 303.823 0 00-6.508 4.711c-1.293.605-2.635 1.188-3.904 1.85.02-.024.038-.047.06-.071.898-.705 1.809-1.404 2.733-2.096 1.948-.909 3.778-1.863 5.076-3.197.161-.166.318-.338.461-.516.319-.341.645-.674.973-.998a379.277 379.277 0 00-4.046 2.896c-.826.602-1.65 1.205-2.464 1.815-.571.266-1.154.531-1.733.797.04-.066.085-.133.119-.201.42-.4.921-2.785-.039-2.821-3.765 2.028-8.722 5.499-8.796 5.357-.542-.436 5.551-4.594 5.232-4.608-.397.128-.789.267-1.176.412.285-.297.56-.593.8-.89.662-.53 1.72-.907 2.064-1.449 1.273-1.754 3.388-2.508 5.057-4.107 1.007-1.073 2.182-2.414 3.358-3.757-.148-.282.665-.53.269-.684 1.387-.73 2.992-1.576 3.152-2.714l.089-.076c.098-.051.212-.171.327-.314 2.384-1.071 3.581-2.704 5.388-4.35a25.075 25.075 0 012.141-1.281c-.491.259-1.302.507-1.721.907-.143.124-.283.249-.42.374-1.767 1.17-3.345 2.483-4.957 3.724-.101.159-.263.417-.431.626a7.937 7.937 0 01-.401.173c0 .074-.006.146-.015.217-1.483 1.299-3.326 2.456-4.552 3.634-2.473 1.919-5.506 3.214-8.33 4.599 1.259-.965 2.489-1.94 3.685-2.919a202.992 202.992 0 00-4.402 3.276c-.241.122-.475.242-.71.366l-1.477.778c.493-.18.973-.372 1.448-.569a102.77 102.77 0 00-2.442 1.951c-4.58 3.258-9.485 6.281-14.589 8.691a5.97 5.97 0 01.064-.688c2.361-1.352 4.764-2.619 6.334-4.409-1.388.731-2.217 1.485-3.541 2.219-.041-.082-.116-.191-.031-.302-.772.612-1.693 1.291-2.642 1.848.119-.53.277-1.076.434-1.622.344-.542 1.081-.931 1.744-1.461 3.062-1.925 6.106-3.437 9.068-5.435 2.826-1.42 5.649-2.84 8.379-4.311-2.515 1.834-4.806 3.56-6.973 5.356z" fill="#ECEEF1"/><path d="M45.337 53.332c-.97.732-1.954 1.46-2.957 2.174a81.01 81.01 0 00-2.188 1.875c-3.547 2.835-8.291 5.01-12.35 7.583.094.481.303.913.686 1.27 4.845-1.966 9.048-5.147 13.772-7.336.028-.034.058-.065.084-.101 1.521-1.884 4.865-3.286 6.95-5.287 2.012-2.143 4.321-3.721 6.405-5.722-3.552 1.871-6.767 3.955-10.402 5.544M70.474 31.523c-.918.591-1.841 1.187-2.768 1.792a103.82 103.82 0 00-6.919 5.267 152.88 152.88 0 015.395-2.996c1.754-1.116 2.933-2.648 4.292-4.063M59.014 40.062c.596-.506 1.184-.996 1.773-1.48a315.034 315.034 0 00-7.749 4.675c-4.06 2.874-8.163 5.676-12.133 8.719-.456.336-.915.659-1.377.968 8.204-4.12 16.384-8.225 22.337-13.638.106-.104.231-.21.346-.315-3.229 1.824-6.365 3.739-9.482 5.667 2.114-1.498 4.218-3.013 6.285-4.596" fill="#ECEEF1"/><path d="M46.278 52.623c-.242.119-.48.237-.717.357-.25.192-.495.383-.739.575l.515-.223c.315-.237.631-.471.941-.709M55.214 52.582l.099-.034c.734-.49 1.489-.976 2.252-1.461a44.321 44.321 0 013.085-2.443c-2.042 1.281-4.059 2.556-5.436 3.938M63.811 52.379l.984-.519c.104-.165.207-.328.312-.491-.233.114-.471.228-.708.339l-.588.671M77.115 42.449c-4.066 2.846-7.845 5.575-11.588 8.288-.142.206-.282.418-.42.632 2.762-1.345 5.37-2.949 7.449-5.043.416-.399.931-1.213 1.422-1.471 2.256-1.36 4.236-2.976 6.231-4.548a197.81 197.81 0 00-3.008 2.084c-.029.018-.057.039-.086.058" fill="#ECEEF1"/><path d="M27.542 26.094v4.758h2.985c.732 0 1.309-.215 1.731-.647.422-.433.634-1 .634-1.704s-.216-1.281-.648-1.732c-.432-.451-1.005-.675-1.717-.675h-2.985zm0 8.418v7.686h-4.814V22.434h7.799c2.289 0 4.072.591 5.349 1.774 1.276 1.182 1.914 2.609 1.914 4.279 0 1.145-.347 2.262-1.041 3.351-.695 1.088-1.83 1.857-3.407 2.307l4.843 8.053h-5.632l-4.448-7.686h-.563zM53.219 22.378v3.659h-7.151v4.251h6.306v3.66h-6.306v4.59h7.151v3.66H41.253v-19.82h11.966M55.725 26.094v-3.66h15.597v3.66h-5.406v16.104h-4.813V26.094h-5.378M78.726 26.094v4.758h2.985c.731 0 1.308-.215 1.731-.647.422-.433.633-1 .633-1.704s-.216-1.281-.646-1.732c-.433-.451-1.005-.675-1.718-.675h-2.985zm0 8.418v7.686h-4.814V22.434h7.799c2.289 0 4.072.591 5.349 1.774 1.276 1.182 1.915 2.609 1.915 4.279 0 1.145-.348 2.262-1.042 3.351-.695 1.088-1.831 1.857-3.408 2.307l4.843 8.053h-5.63l-4.449-7.686h-.563zM105.205 36.398c.947-1.032 1.422-2.411 1.422-4.138 0-1.727-.475-3.107-1.422-4.139-.948-1.032-2.216-1.549-3.801-1.549-1.587 0-2.853.517-3.801 1.549s-1.421 2.412-1.421 4.139c0 1.727.473 3.106 1.421 4.138.948 1.033 2.214 1.548 3.801 1.548 1.585 0 2.853-.515 3.801-1.548zm-10.98 3.124c-1.962-1.914-2.943-4.334-2.943-7.262s.981-5.345 2.943-7.25c1.96-1.906 4.364-2.858 7.207-2.858s5.237.952 7.179 2.858c1.944 1.905 2.914 4.322 2.914 7.25s-.976 5.348-2.927 7.262c-1.953 1.915-4.346 2.873-7.18 2.873-2.834 0-5.233-.958-7.193-2.873zM51.8 10.027V7.969h8.772v2.058h-3.041v9.057h-2.707v-9.057H51.8M69.026 7.969h2.708v11.115h-2.708v-4.607h-4.29v4.607h-2.708V7.969h2.708v4.449h4.29V7.969M80.68 7.937v2.059h-4.022v2.391h3.547v2.058h-3.547v2.581h4.022v2.058h-6.73V7.937h6.73" fill="#272525"/><path d="M37.166 52.231a.667.667 0 00-.445.145c-.116.096-.174.234-.174.414 0 .181.055.326.161.437.108.11.248.195.419.253.173.06.365.117.577.17.211.054.421.118.63.195.209.076.4.171.572.283.172.114.312.273.419.479.108.206.161.453.161.741 0 .503-.205.932-.614 1.292-.409.358-.948.537-1.618.537-.669 0-1.207-.161-1.616-.483-.41-.322-.614-.779-.614-1.372h1.541c.039.475.282.712.728.712.208 0 .372-.056.491-.166a.543.543 0 00.178-.419.565.565 0 00-.161-.415 1.154 1.154 0 00-.419-.254 6.717 6.717 0 00-.576-.173 5.683 5.683 0 01-.631-.199 3.112 3.112 0 01-.572-.284 1.198 1.198 0 01-.418-.474 1.556 1.556 0 01-.161-.732c0-.554.205-.996.618-1.33.411-.333.938-.499 1.579-.499.64 0 1.159.145 1.554.436.394.29.601.749.618 1.375h-1.575c-.023-.214-.092-.379-.208-.495a.598.598 0 00-.444-.174M45.642 52.274v-1.1h4.69v1.1h-1.625v4.843h-1.448v-4.843h-1.617M56.591 54.722v-3.548h1.447v3.548c0 .355.087.629.262.82.176.192.433.289.771.289.339 0 .598-.097.779-.289.181-.191.271-.465.271-.82v-3.548h1.448v3.548c0 .524-.123.977-.368 1.358a2.212 2.212 0 01-.931.834 2.85 2.85 0 01-1.224.263c-.689 0-1.271-.214-1.745-.644-.474-.429-.71-1.032-.71-1.811M69.673 56.017h.643c.553 0 .989-.169 1.304-.508.316-.339.475-.793.475-1.364 0-.57-.159-1.024-.475-1.363-.315-.339-.751-.508-1.304-.508h-.643v3.743zm.643-4.843c.949 0 1.728.274 2.337.825.61.551.915 1.265.915 2.143 0 .876-.305 1.592-.915 2.146-.609.553-1.388.829-2.337.829h-2.091v-5.943h2.091zM79.901 57.117h1.449v-5.943h-1.449zM91.879 55.373c.285-.311.428-.726.428-1.245 0-.519-.143-.934-.428-1.244-.285-.311-.666-.466-1.143-.466s-.858.155-1.143.466c-.285.31-.428.725-.428 1.244s.143.934.428 1.245c.285.311.666.466 1.143.466s.858-.155 1.143-.466zm-3.303.94c-.59-.576-.885-1.304-.885-2.185 0-.88.295-1.607.885-2.18.59-.572 1.313-.859 2.168-.859.856 0 1.575.287 2.159.859.585.573.877 1.3.877 2.18 0 .881-.294 1.609-.881 2.185-.587.576-1.307.864-2.159.864-.852 0-1.574-.288-2.164-.864z" fill="#000"/></g></svg> \ No newline at end of file diff --git a/public/videos/stackbit-for-marketers.mp4 b/public/videos/stackbit-for-marketers.mp4 deleted file mode 100644 index 36f2fc79..00000000 Binary files a/public/videos/stackbit-for-marketers.mp4 and /dev/null differ diff --git a/scripts/generate-components-map.js b/scripts/generate-components-map.js index 7ef7fcbd..605452a4 100755 --- a/scripts/generate-components-map.js +++ b/scripts/generate-components-map.js @@ -96,8 +96,14 @@ module.exports.componentsMap = { // console.log(vlq.encode([0, 0, lineInOrig, 0])); // console.log(vlq.encode([colInGen, 0, 0, colInOrig])); // console.log(vlq.encode([colInOrig, 0, 0, varLength])); - fse.writeFileSync(path.join(projectDir, 'dist/components-map.d.ts.map'), '{"version":3,"file":"components-map.d.ts","sourceRoot":"","sources":["../src/components-map.ts"],"names":[],"mappings":"AAOA,qBAAa,aAAa"}'); - fse.writeFileSync(path.join(projectDir, 'dist/components-map.d.ts'), 'export declare const componentsMap: any;\n//# sourceMappingURL=components-map.d.ts.map'); + fse.writeFileSync( + path.join(projectDir, 'dist/components-map.d.ts.map'), + '{"version":3,"file":"components-map.d.ts","sourceRoot":"","sources":["../src/components-map.ts"],"names":[],"mappings":"AAOA,qBAAa,aAAa"}' + ); + fse.writeFileSync( + path.join(projectDir, 'dist/components-map.d.ts'), + 'export declare const componentsMap: any;\n//# sourceMappingURL=components-map.d.ts.map' + ); console.log('✔ generated dist/components-map.js'); } diff --git a/src/base/BlankBaseLayout/index.tsx b/src/base/BlankBaseLayout/index.tsx index 362fc879..33dd446b 100644 --- a/src/base/BlankBaseLayout/index.tsx +++ b/src/base/BlankBaseLayout/index.tsx @@ -3,40 +3,13 @@ import Head from 'next/head'; import classNames from 'classnames'; export default function BlankBaseLayout(props) { - const { page, site } = props; + const { page } = props; const pageMeta = page?.__metadata || {}; - const domain = (site?.domain || '').replace(/\/+$/g, ''); - const seo = page?.seo || {}; - const seoTitle = seo.title ? seo.title : page.title; - const seoDescription = seo.description || ''; - const seoRobots = (seo.robots || []).join(','); - const seoExtra = (seo.extra || []).map((meta, index) => { - const keyName = meta.keyName || 'name'; - const name = meta.name; - if (!name) { - return null; - } - const nameAttr = { [keyName]: name }; - const relativeUrl = meta.relativeUrl || false; - let value = meta.value; - if (!value) { - return null; - } - if (relativeUrl) { - if (!domain) { - return null; - } - value = domain + '/' + value.replace(/^\/+/g, ''); - } - return <meta key={index} {...nameAttr} content={value} />; - }); return ( - <div className={classNames('page', pageMeta.pageCssClasses)} data-sb-object-id={pageMeta.id}> + <div className={classNames('sb-page', pageMeta.pageCssClasses)} data-sb-object-id={pageMeta.id}> <Head> - <title>{seoTitle} - - {seoRobots && } - {seoExtra} + {page.title} + diff --git a/src/base/DefaultBaseLayout/index.tsx b/src/base/DefaultBaseLayout/index.tsx index 7fac51a3..3d401605 100644 --- a/src/base/DefaultBaseLayout/index.tsx +++ b/src/base/DefaultBaseLayout/index.tsx @@ -10,45 +10,18 @@ export default function DefaultBaseLayout(props) { const pageMeta = page?.__metadata || {}; const Header = getComponent('Header'); const Footer = getComponent('Footer'); - const domain = (site?.domain || '').replace(/\/+$/g, ''); - const seo = page?.seo || {}; - const seoTitle = seo.title ? seo.title : page.title; - const seoDescription = seo.description || ''; - const seoRobots = (seo.robots || []).join(','); - const seoExtra = (seo.extra || []).map((meta, index) => { - const keyName = meta.keyName || 'name'; - const name = meta.name; - if (!name) { - return null; - } - const nameAttr = { [keyName]: name }; - const relativeUrl = meta.relativeUrl || false; - let value = meta.value; - if (!value) { - return null; - } - if (relativeUrl) { - if (!domain) { - return null; - } - value = domain + '/' + value.replace(/^\/+/g, ''); - } - return ; - }); return ( -
-
+
+
- {seoTitle} - - {seoRobots && } - {seoExtra} + {page.title} + -
+ {site.header &&
} {props.children} -
+ {site.footer &&
}
); diff --git a/src/components-manifest.json b/src/components-manifest.json index 66f71694..32c2f41f 100644 --- a/src/components-manifest.json +++ b/src/components-manifest.json @@ -24,16 +24,26 @@ "modelName": "EmailFormControl", "isDynamic": true }, + "FaqSection": { + "path": "components/FaqSection", + "modelName": "FaqSection", + "isDynamic": true + }, + "FeaturedItem": { + "path": "components/FeaturedItem", + "modelName": "FeaturedItem", + "isDynamic": true + }, + "FeaturedItemsSection": { + "path": "components/FeaturedItemsSection", + "modelName": "FeaturedItemsSection", + "isDynamic": true + }, "FeaturedPeopleSection": { "path": "components/FeaturedPeopleSection", "modelName": "FeaturedPeopleSection", "isDynamic": true }, - "FeaturedPostsSection": { - "path": "components/FeaturedPostsSection", - "modelName": "FeaturedPostsSection", - "isDynamic": true - }, "Footer": { "path": "components/Footer", "modelName": "Footer", @@ -59,6 +69,26 @@ "modelName": "ImageBlock", "isDynamic": true }, + "MediaGallerySection": { + "path": "components/MediaGallerySection", + "modelName": "MediaGallerySection", + "isDynamic": true + }, + "PostFeedSection": { + "path": "components/PostFeedSection", + "modelName": "PostFeedSection", + "isDynamic": true + }, + "FeaturedPostsSection": { + "path": "components/FeaturedPostsSection", + "modelName": "FeaturedPostsSection", + "isDynamic": true + }, + "RecentPostsSection": { + "path": "components/RecentPostsSection", + "modelName": "RecentPostsSection", + "isDynamic": true + }, "QuoteSection": { "path": "components/QuoteSection", "modelName": "QuoteSection", @@ -108,5 +138,15 @@ "path": "layouts/PostLayout", "modelName": "PostLayout", "isDynamic": true + }, + "PostFeedLayout": { + "path": "layouts/PostFeedLayout", + "modelName": "PostFeedLayout", + "isDynamic": true + }, + "PostFeedCategoryLayout": { + "path": "layouts/PostFeedCategoryLayout", + "modelName": "PostFeedCategoryLayout", + "isDynamic": true } } diff --git a/src/components/Action/action.stories.tsx b/src/components/Action/action.stories.tsx index 1b2c2cb0..5d5d827d 100644 --- a/src/components/Action/action.stories.tsx +++ b/src/components/Action/action.stories.tsx @@ -3,14 +3,32 @@ import Action from './index'; export default { title: 'Blocks/ActionBlock', - component: Action + component: Action, + argTypes: { + type: { table: { disable: true } }, + elementId: { + defaultValue: '' + }, + showIcon: { + defaultValue: false, + control: { type: 'boolean' } + }, + icon: { + options: ['apple', 'arrowRight', 'arrowLeft', 'cart', 'facebook', 'github', 'googlePlay', 'instagram', 'linkedin', 'play', 'twitter'], + defaultValue: 'arrowRight', + control: { type: 'select' } + }, + iconPosition: { + options: ['left', 'right'], + defaultValue: 'right', + control: { type: 'select' } + } + } }; const Template = (args) => ; const args = { - type: 'Button', - elementId: '', label: 'Stackbit', altText: 'Stackbit', url: 'https://www.stackbit.com', @@ -46,7 +64,6 @@ export const LinkIcon = Template.bind({}); LinkIcon.storyName = 'Link with icon'; LinkIcon.args = { ...args, - type: 'Link', showIcon: true, icon: 'arrowLeft', iconPosition: 'left', diff --git a/src/components/Action/index.tsx b/src/components/Action/index.tsx index 50a4f6c5..4f0aabee 100644 --- a/src/components/Action/index.tsx +++ b/src/components/Action/index.tsx @@ -1,23 +1,29 @@ import * as React from 'react'; import classNames from 'classnames'; import Link from '../../utils/link'; +import Apple from '../../svgs/apple'; import ArrowLeft from '../../svgs/arrow-left'; import ArrowRight from '../../svgs/arrow-right'; import Cart from '../../svgs/cart'; import Facebook from '../../svgs/facebook'; import GitHub from '../../svgs/github'; +import GooglePlay from '../../svgs/google-play'; import Instagram from '../../svgs/instagram'; import LinkedIn from '../../svgs/linkedin'; +import Play from '../../svgs/play'; import Twitter from '../../svgs/twitter'; const iconMap = { + apple: Apple, arrowLeft: ArrowLeft, arrowRight: ArrowRight, cart: Cart, facebook: Facebook, github: GitHub, + googlePlay: GooglePlay, instagram: Instagram, linkedin: LinkedIn, + play: Play, twitter: Twitter }; @@ -26,7 +32,7 @@ export default function Action(props) { const icon = props.icon || 'arrowLeft'; const iconPosition = props.iconPosition || 'right'; const IconComponent = iconMap[icon]; - const annotationPrefix = props.annotationPrefix || ''; + const annotationPrefix = props['data-sb-field-path'] || ''; const annotations = [ `${annotationPrefix}`, `${annotationPrefix}.url#@href`, diff --git a/src/components/CheckboxFormControl/index.tsx b/src/components/CheckboxFormControl/index.tsx index 71b49016..8b0d2098 100644 --- a/src/components/CheckboxFormControl/index.tsx +++ b/src/components/CheckboxFormControl/index.tsx @@ -14,19 +14,12 @@ export default function CheckboxFormControl(props) { } return (
- + {props.label && (