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