From 9f88fcecd3f02e6f8135aead1a86febed5c6072e Mon Sep 17 00:00:00 2001 From: Vanessa Ramos Date: Tue, 12 Oct 2021 09:17:15 -0700 Subject: [PATCH 1/4] group changes --- models/Button.yaml | 10 +++++----- models/ContactSection.yaml | 6 ++++-- models/CtaSection.yaml | 4 ++-- models/FeaturedPeopleSection.yaml | 6 ++++-- models/FeaturedPostsSection.yaml | 6 ++++-- models/HeroSection.yaml | 6 ++++-- models/ImageBlock.yaml | 10 +++++----- models/Link.yaml | 10 +++++----- models/Person.yaml | 8 ++++---- models/QuoteSection.yaml | 4 ++-- models/Section.yaml | 16 ++++++++-------- models/Social.yaml | 10 +++++----- models/TestimonialsSection.yaml | 6 ++++-- models/TextSection.yaml | 5 +++-- models/VideoBlock.yaml | 10 +++++----- 15 files changed, 64 insertions(+), 53 deletions(-) diff --git a/models/Button.yaml b/models/Button.yaml index 87d46545..9be6c0cd 100644 --- a/models/Button.yaml +++ b/models/Button.yaml @@ -2,11 +2,6 @@ type: object name: Button label: Button fields: - - type: string - name: elementId - label: Element ID - description: The unique ID for an HTML element, must not contain whitespace - default: '' - type: string name: label label: Label @@ -55,3 +50,8 @@ fields: - label: Secondary value: secondary default: secondary + - type: string + name: elementId + label: Element ID + description: The unique ID for an HTML element, must not contain whitespace + default: '' diff --git a/models/ContactSection.yaml b/models/ContactSection.yaml index d0a25a7c..c330bb64 100644 --- a/models/ContactSection.yaml +++ b/models/ContactSection.yaml @@ -6,10 +6,10 @@ extends: groups: - sectionComponent fieldGroups: - - name: settings - label: Settings - name: styles label: Styles + - name: settings + label: Settings fields: - name: colors default: colors-h @@ -32,6 +32,7 @@ fields: - type: enum name: variant label: Arrangement + group: styles options: - label: Contact form with feature on the left value: variant-a @@ -41,6 +42,7 @@ fields: - type: model name: badge label: Badge + group: styles models: - Badge - type: string diff --git a/models/CtaSection.yaml b/models/CtaSection.yaml index 06922445..6a2e98c9 100644 --- a/models/CtaSection.yaml +++ b/models/CtaSection.yaml @@ -6,10 +6,10 @@ extends: groups: - sectionComponent fieldGroups: - - name: settings - label: Settings - name: styles label: Styles + - name: settings + label: Settings fields: - type: enum name: variant diff --git a/models/FeaturedPeopleSection.yaml b/models/FeaturedPeopleSection.yaml index d03e361f..9b0b3ac5 100644 --- a/models/FeaturedPeopleSection.yaml +++ b/models/FeaturedPeopleSection.yaml @@ -6,14 +6,15 @@ extends: groups: - sectionComponent fieldGroups: - - name: settings - label: Settings - name: styles label: Styles + - name: settings + label: Settings fields: - type: enum name: variant label: Arrangement + group: styles options: - label: Four columns, person info with image at the top value: variant-a @@ -25,6 +26,7 @@ fields: - type: model name: badge label: Badge + group: styles models: - Badge - type: string diff --git a/models/FeaturedPostsSection.yaml b/models/FeaturedPostsSection.yaml index 2191a751..611a30b8 100644 --- a/models/FeaturedPostsSection.yaml +++ b/models/FeaturedPostsSection.yaml @@ -6,14 +6,15 @@ extends: groups: - sectionComponent fieldGroups: - - name: settings - label: Settings - name: styles label: Styles + - name: settings + label: Settings fields: - type: enum name: variant label: Arrangement + group: styles options: - label: Three columns, post thumbnail at the top value: variant-a @@ -23,6 +24,7 @@ fields: - type: model name: badge label: Badge + group: styles models: - Badge - type: string diff --git a/models/HeroSection.yaml b/models/HeroSection.yaml index a0cb5fa2..5aecd8a7 100644 --- a/models/HeroSection.yaml +++ b/models/HeroSection.yaml @@ -6,10 +6,10 @@ extends: groups: - sectionComponent fieldGroups: - - name: settings - label: Settings - name: styles label: Styles + - name: settings + label: Settings fields: - name: colors default: colors-f @@ -32,6 +32,7 @@ fields: - type: enum name: variant label: Arrangement + group: styles options: - label: Hero with feature on the right value: variant-a @@ -45,6 +46,7 @@ fields: - type: model name: badge label: Badge + group: styles models: - Badge - type: string diff --git a/models/ImageBlock.yaml b/models/ImageBlock.yaml index d0811db4..50e4676f 100644 --- a/models/ImageBlock.yaml +++ b/models/ImageBlock.yaml @@ -2,11 +2,6 @@ type: object name: ImageBlock label: Image fields: - - type: string - name: elementId - label: Element ID - description: The unique ID for an HTML element, must not contain whitespace - default: '' - type: image name: url label: Image @@ -29,3 +24,8 @@ fields: step: 1 unit: '%' default: 100 + - type: string + name: elementId + label: Element ID + description: The unique ID for an HTML element, must not contain whitespace + default: '' diff --git a/models/Link.yaml b/models/Link.yaml index 91dcbe8f..6fc15ce4 100644 --- a/models/Link.yaml +++ b/models/Link.yaml @@ -2,11 +2,6 @@ type: object name: Link label: Link fields: - - type: string - name: elementId - label: Element ID - description: The unique ID for an HTML element, must not contain whitespace - default: '' - type: string name: label label: Label @@ -55,3 +50,8 @@ fields: - label: Secondary value: secondary default: link + - type: string + name: elementId + label: Element ID + description: The unique ID for an HTML element, must not contain whitespace + default: '' diff --git a/models/Person.yaml b/models/Person.yaml index d2cb7e6e..e469ab42 100644 --- a/models/Person.yaml +++ b/models/Person.yaml @@ -1,10 +1,6 @@ name: Person label: Person fields: - - type: string - name: id - label: ID - default: johnna-doe - type: string name: firstName label: First name @@ -28,3 +24,7 @@ fields: default: url: /images/dianne-ameter.jpg altText: Product Marketing Manager + - type: string + name: id + label: ID + default: johnna-doe diff --git a/models/QuoteSection.yaml b/models/QuoteSection.yaml index 09c13733..dd4fe552 100644 --- a/models/QuoteSection.yaml +++ b/models/QuoteSection.yaml @@ -6,10 +6,10 @@ extends: groups: - sectionComponent fieldGroups: - - name: settings - label: Settings - name: styles label: Styles + - name: settings + label: Settings fields: - type: markdown name: quote diff --git a/models/Section.yaml b/models/Section.yaml index 4ee112fc..acd376d1 100644 --- a/models/Section.yaml +++ b/models/Section.yaml @@ -2,17 +2,11 @@ type: object name: Section label: Section fieldGroups: - - name: settings - label: Settings - 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: enum name: colors group: styles @@ -119,3 +113,9 @@ fields: - center - right default: left + - 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/Social.yaml b/models/Social.yaml index c34c71e3..d8164ec5 100644 --- a/models/Social.yaml +++ b/models/Social.yaml @@ -2,11 +2,6 @@ type: object name: Social label: Social fields: - - type: string - name: elementId - label: Element ID - description: The unique ID for an HTML element, must not contain whitespace - default: '' - type: string name: label label: Label @@ -43,3 +38,8 @@ fields: - label: Secondary value: secondary default: secondary + - type: string + name: elementId + label: Element ID + description: The unique ID for an HTML element, must not contain whitespace + default: '' diff --git a/models/TestimonialsSection.yaml b/models/TestimonialsSection.yaml index c60bbea7..fc204f32 100644 --- a/models/TestimonialsSection.yaml +++ b/models/TestimonialsSection.yaml @@ -6,10 +6,10 @@ extends: groups: - sectionComponent fieldGroups: - - name: settings - label: Settings - name: styles label: Styles + - name: settings + label: Settings fields: - name: colors default: colors-h @@ -32,6 +32,7 @@ fields: - type: enum name: variant label: Arrangement + group: styles options: - label: Testimonial with author image at the bottom value: variant-a @@ -41,6 +42,7 @@ fields: - type: model name: badge label: Badge + group: styles models: - Badge - type: string diff --git a/models/TextSection.yaml b/models/TextSection.yaml index 6bc87e44..250efc6b 100644 --- a/models/TextSection.yaml +++ b/models/TextSection.yaml @@ -6,10 +6,10 @@ extends: groups: - sectionComponent fieldGroups: - - name: settings - label: Settings - name: styles label: Styles + - name: settings + label: Settings fields: - name: colors default: colors-f @@ -32,6 +32,7 @@ fields: - type: model name: badge label: Badge + group: styles models: - Badge - type: string diff --git a/models/VideoBlock.yaml b/models/VideoBlock.yaml index 5e290664..9c267573 100644 --- a/models/VideoBlock.yaml +++ b/models/VideoBlock.yaml @@ -2,11 +2,6 @@ type: object name: VideoBlock label: Video fields: - - type: string - name: elementId - label: Element ID - description: The unique ID for an HTML element, must not contain whitespace - default: '' - type: string name: url label: Video @@ -31,3 +26,8 @@ fields: name: controls label: Controls default: false + - type: string + name: elementId + label: Element ID + description: The unique ID for an HTML element, must not contain whitespace + default: '' \ No newline at end of file From 68eba6a40705ea9163575a36c72d457f5ef82887 Mon Sep 17 00:00:00 2001 From: TomasBankauskas Date: Wed, 13 Oct 2021 12:16:32 +0300 Subject: [PATCH 2/4] updated fieldGroups, removed HeroSection variants --- models/Badge.yaml | 12 +- models/Button.yaml | 10 ++ models/CheckboxFormControl.yaml | 4 + models/Config.yaml | 17 -- models/ContactBlock.yaml | 9 +- models/ContactSection.yaml | 4 +- models/CtaSection.yaml | 1 + models/EmailFormControl.yaml | 4 + models/FeaturedPeopleSection.yaml | 4 +- models/FeaturedPostsSection.yaml | 4 +- models/Footer.yaml | 16 +- models/FormBlock.yaml | 25 ++- models/HeroSection.yaml | 25 ++- models/ImageBlock.yaml | 7 + models/Link.yaml | 10 ++ models/NavBar.yaml | 10 ++ models/PageLayout.yaml | 14 +- models/PostLayout.yaml | 28 ++-- models/QuoteSection.yaml | 1 + models/Section.yaml | 2 +- models/SelectFormControl.yaml | 4 + models/Social.yaml | 9 + models/Testimonial.yaml | 11 +- models/TestimonialsSection.yaml | 2 +- models/TextFormControl.yaml | 4 + models/TextSection.yaml | 2 +- models/TextareaFormControl.yaml | 4 + models/VideoBlock.yaml | 6 +- public/models/Badge.yaml | 12 +- public/models/Button.yaml | 20 ++- public/models/CheckboxFormControl.yaml | 4 + public/models/Config.yaml | 17 -- public/models/ContactBlock.yaml | 9 +- public/models/ContactSection.yaml | 8 +- public/models/CtaSection.yaml | 5 +- public/models/EmailFormControl.yaml | 4 + public/models/FeaturedPeopleSection.yaml | 6 +- public/models/FeaturedPostsSection.yaml | 6 +- public/models/Footer.yaml | 16 +- public/models/FormBlock.yaml | 25 ++- public/models/HeroSection.yaml | 6 +- public/models/ImageBlock.yaml | 17 +- public/models/Link.yaml | 20 ++- public/models/NavBar.yaml | 10 ++ public/models/PageLayout.yaml | 14 +- public/models/Person.yaml | 8 +- public/models/PostLayout.yaml | 28 ++-- public/models/QuoteSection.yaml | 5 +- public/models/Section.yaml | 16 +- public/models/SelectFormControl.yaml | 4 + public/models/Social.yaml | 19 ++- public/models/Testimonial.yaml | 11 +- public/models/TestimonialsSection.yaml | 6 +- public/models/TextFormControl.yaml | 4 + public/models/TextSection.yaml | 5 +- public/models/TextareaFormControl.yaml | 4 + public/models/VideoBlock.yaml | 14 +- src/base/DefaultBaseLayout/index.js | 7 +- .../ContactSection/contact-section.stories.js | 2 +- .../featured-posts-section.stories.js | 6 +- src/components/FeaturedPostsSection/index.js | 12 +- src/components/Footer/footer.stories.js | 1 - src/components/Footer/index.js | 30 ++-- .../FormBlock/form-block.stories.js | 2 +- src/components/FormBlock/index.js | 12 +- .../HeroSection/hero-section.stories.js | 21 +-- src/components/HeroSection/index.js | 154 ++++++------------ src/layouts/PageLayout/page-layout.stories.js | 1 - src/layouts/PostLayout/index.js | 24 +-- src/layouts/PostLayout/post-layout.stories.js | 4 +- 70 files changed, 500 insertions(+), 348 deletions(-) diff --git a/models/Badge.yaml b/models/Badge.yaml index 605b310b..7dd1bb0e 100644 --- a/models/Badge.yaml +++ b/models/Badge.yaml @@ -1,13 +1,17 @@ type: object name: Badge label: Badge +fieldGroups: + - name: settings + label: Settings fields: + - type: string + name: label + label: Label + description: The text in the badge - 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: label - label: Label - description: The text in the badge diff --git a/models/Button.yaml b/models/Button.yaml index 9be6c0cd..1c68f699 100644 --- a/models/Button.yaml +++ b/models/Button.yaml @@ -1,6 +1,11 @@ type: object name: Button label: Button +fieldGroups: + - name: styles + label: Styles + - name: settings + label: Settings fields: - type: string name: label @@ -17,10 +22,12 @@ fields: default: '/' - type: boolean name: showIcon + group: styles label: Show icon default: false - type: enum name: icon + group: styles label: Icon options: - arrowLeft @@ -34,6 +41,7 @@ fields: default: arrowLeft - type: enum name: iconPosition + group: styles label: Icon position options: - left @@ -41,6 +49,7 @@ fields: default: right - type: enum name: style + group: styles label: Style options: - label: Link @@ -52,6 +61,7 @@ fields: default: secondary - 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/CheckboxFormControl.yaml b/models/CheckboxFormControl.yaml index abc7f319..d0a93362 100644 --- a/models/CheckboxFormControl.yaml +++ b/models/CheckboxFormControl.yaml @@ -1,6 +1,9 @@ type: object name: CheckboxFormControl label: Checkbox +fieldGroups: + - name: styles + label: Styles fields: - type: string name: name @@ -16,6 +19,7 @@ fields: default: false - type: enum name: width + group: styles label: Width options: - label: Full diff --git a/models/Config.yaml b/models/Config.yaml index d1de6e64..84d63e90 100644 --- a/models/Config.yaml +++ b/models/Config.yaml @@ -2,23 +2,6 @@ type: data name: Config label: Site configuration fields: - - type: enum - name: backgroundColor - label: Background color - options: - - label: White - value: bg-white - - label: Base - value: bg-base - - label: Primary - value: bg-primary - - label: Secondary - value: bg-secondary - - label: Complementary 1 - value: bg-complementary-1 - - label: Complementary 2 - value: bg-complementary-2 - default: bg-white - type: model name: navBar label: Navbar configuration diff --git a/models/ContactBlock.yaml b/models/ContactBlock.yaml index 538433cf..48618167 100644 --- a/models/ContactBlock.yaml +++ b/models/ContactBlock.yaml @@ -1,6 +1,9 @@ type: object name: ContactBlock label: Contact +fieldGroups: + - name: settings + label: Settings fields: - type: string name: phoneNumber @@ -21,4 +24,8 @@ fields: name: addressAltText label: Address alt text - type: string - name: elementId \ No newline at end of file + name: elementId + group: settings + label: Element ID + description: The unique ID for an HTML element, must not contain whitespace + default: '' diff --git a/models/ContactSection.yaml b/models/ContactSection.yaml index c330bb64..14ddb3ad 100644 --- a/models/ContactSection.yaml +++ b/models/ContactSection.yaml @@ -41,8 +41,8 @@ fields: default: variant-b - type: model name: badge - label: Badge group: styles + label: Badge models: - Badge - type: string @@ -58,7 +58,7 @@ fields: - FormBlock default: type: FormBlock - idAttr: contact-form + elementId: contact-form action: /.netlify/functions/submission_created destination: '' fields: diff --git a/models/CtaSection.yaml b/models/CtaSection.yaml index 6a2e98c9..68a3832c 100644 --- a/models/CtaSection.yaml +++ b/models/CtaSection.yaml @@ -22,6 +22,7 @@ fields: default: variant-b - type: model name: badge + group: styles label: Badge models: - Badge diff --git a/models/EmailFormControl.yaml b/models/EmailFormControl.yaml index 8b70ecee..8487601a 100644 --- a/models/EmailFormControl.yaml +++ b/models/EmailFormControl.yaml @@ -1,6 +1,9 @@ type: object name: EmailFormControl label: Email +fieldGroups: + - name: styles + label: Styles fields: - type: string name: name @@ -19,6 +22,7 @@ fields: default: false - type: enum name: width + group: styles label: Width options: - label: Full diff --git a/models/FeaturedPeopleSection.yaml b/models/FeaturedPeopleSection.yaml index 9b0b3ac5..935cdec7 100644 --- a/models/FeaturedPeopleSection.yaml +++ b/models/FeaturedPeopleSection.yaml @@ -13,8 +13,8 @@ fieldGroups: fields: - type: enum name: variant - label: Arrangement group: styles + label: Arrangement options: - label: Four columns, person info with image at the top value: variant-a @@ -25,8 +25,8 @@ fields: default: variant-a - type: model name: badge - label: Badge group: styles + label: Badge models: - Badge - type: string diff --git a/models/FeaturedPostsSection.yaml b/models/FeaturedPostsSection.yaml index 611a30b8..90e0520b 100644 --- a/models/FeaturedPostsSection.yaml +++ b/models/FeaturedPostsSection.yaml @@ -13,8 +13,8 @@ fieldGroups: fields: - type: enum name: variant - label: Arrangement group: styles + label: Arrangement options: - label: Three columns, post thumbnail at the top value: variant-a @@ -23,8 +23,8 @@ fields: default: variant-b - type: model name: badge - label: Badge group: styles + label: Badge models: - Badge - type: string diff --git a/models/Footer.yaml b/models/Footer.yaml index 5f740486..2301ddfc 100644 --- a/models/Footer.yaml +++ b/models/Footer.yaml @@ -1,9 +1,15 @@ type: object name: Footer label: Footer +fieldGroups: + - name: styles + label: Styles + - name: settings + label: Settings fields: - type: enum name: colors + group: styles label: Colors options: - label: Base foreground on white background @@ -27,21 +33,19 @@ fields: default: colors-a - type: enum name: width + group: styles label: Width options: - wide - full default: wide - - type: string - name: title - label: Title - - type: boolean - name: isTitleVisible - label: Display title - type: model name: logo label: Logo models: [ImageBlock] + - type: string + name: title + label: Title - type: markdown name: text label: Text diff --git a/models/FormBlock.yaml b/models/FormBlock.yaml index d8d3d7d5..5db57bfb 100644 --- a/models/FormBlock.yaml +++ b/models/FormBlock.yaml @@ -1,16 +1,10 @@ type: object name: FormBlock label: Form +fieldGroups: + - name: settings + label: Settings fields: - - type: string - name: idAttr - label: ID (used for id and name attributes) - - type: string - name: action - label: Action (form submission URL) - - type: string - name: destination - label: Destination (email to redirect responses) - type: list name: fields label: Fields @@ -25,3 +19,16 @@ fields: - type: string name: submitLabel label: Submit button label + - type: string + name: elementId + group: settings + label: Element ID + description: The unique ID used for id and name attributes, must not contain whitespace + - type: string + name: action + group: settings + label: Action (form submission URL) + - type: string + name: destination + group: settings + label: Destination (email to redirect responses) diff --git a/models/HeroSection.yaml b/models/HeroSection.yaml index 5aecd8a7..f0a5b794 100644 --- a/models/HeroSection.yaml +++ b/models/HeroSection.yaml @@ -29,24 +29,10 @@ fields: default: none - name: textAlign default: left - - type: enum - name: variant - label: Arrangement - group: styles - options: - - label: Hero with feature on the right - value: variant-a - - label: Hero with feature on the left - value: variant-b - - label: Hero with feature at the top - value: variant-c - - label: Hero with feature at the bottom - value: variant-d - default: variant-a - type: model name: badge - label: Badge group: styles + label: Badge models: - Badge - type: string @@ -94,6 +80,15 @@ fields: type: ImageBlock url: /images/hero.png altText: Hero section image + - type: enum + name: featurePosition + label: Feature position + options: + - right + - left + - top + - bottom + default: right - type: model name: backgroundImage group: styles diff --git a/models/ImageBlock.yaml b/models/ImageBlock.yaml index 50e4676f..25cb8cba 100644 --- a/models/ImageBlock.yaml +++ b/models/ImageBlock.yaml @@ -1,6 +1,11 @@ type: object name: ImageBlock label: Image +fieldGroups: + - name: styles + label: Styles + - name: settings + label: Settings fields: - type: image name: url @@ -16,6 +21,7 @@ fields: description: The caption of the image - type: number name: opacity + group: styles label: Opacity description: The opacity of the image controlType: 'slider' @@ -26,6 +32,7 @@ fields: default: 100 - 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/Link.yaml b/models/Link.yaml index 6fc15ce4..28c13b34 100644 --- a/models/Link.yaml +++ b/models/Link.yaml @@ -1,6 +1,11 @@ type: object name: Link label: Link +fieldGroups: + - name: styles + label: Styles + - name: settings + label: Settings fields: - type: string name: label @@ -17,10 +22,12 @@ fields: default: '/' - type: boolean name: showIcon + group: styles label: Show icon default: false - type: enum name: icon + group: styles label: Icon options: - arrowLeft @@ -34,6 +41,7 @@ fields: default: arrowLeft - type: enum name: iconPosition + group: styles label: Icon position options: - left @@ -41,6 +49,7 @@ fields: default: right - type: enum name: style + group: styles label: Style options: - label: Link @@ -52,6 +61,7 @@ fields: 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/NavBar.yaml b/models/NavBar.yaml index 17925662..e632e58b 100644 --- a/models/NavBar.yaml +++ b/models/NavBar.yaml @@ -1,9 +1,15 @@ type: object name: NavBar label: Navbar +fieldGroups: + - name: styles + label: Styles + - name: settings + label: Settings fields: - type: enum name: desktopNavVariant + group: styles label: Desktop navigation arrangement options: - label: Navbar with logo and primary links on the left @@ -17,6 +23,7 @@ fields: default: variant-a - type: enum name: mobileNavVariant + group: styles label: Mobile navigation arrangement options: - label: Full-width mobile navigation @@ -26,6 +33,7 @@ fields: default: variant-a - type: enum name: primaryColors + group: styles label: Primary colors (navbar) options: - label: Base foreground on white background @@ -49,6 +57,7 @@ fields: default: colors-a - type: enum name: secondaryColors + group: styles label: Secondary colors (mobile navigation) options: - label: Base foreground on white background @@ -72,6 +81,7 @@ fields: default: colors-a - type: enum name: width + group: styles label: Width options: - wide diff --git a/models/PageLayout.yaml b/models/PageLayout.yaml index 3134702c..509ecbfe 100644 --- a/models/PageLayout.yaml +++ b/models/PageLayout.yaml @@ -2,6 +2,11 @@ name: PageLayout label: Page layout: PageLayout hideContent: true +fieldGroups: + - name: settings + label: Settings + - name: seo + label: SEO fields: - type: string name: title @@ -46,4 +51,11 @@ fields: feature: type: ImageBlock url: /images/hero.png - altText: Image alt text \ No newline at end of file + altText: Image alt text + - type: model + name: seo + group: seo + models: + - stackbit_page_meta + + diff --git a/models/PostLayout.yaml b/models/PostLayout.yaml index 102b9687..0a8d73cf 100644 --- a/models/PostLayout.yaml +++ b/models/PostLayout.yaml @@ -1,6 +1,11 @@ name: PostLayout label: Post layout: PostLayout +fieldGroups: + - name: settings + label: Settings + - name: seo + label: SEO fields: - type: string name: title @@ -19,25 +24,28 @@ fields: label: Excerpt default: This is the excerpt of your blog post visible in the post feed or featured posts. - type: model - name: thumbImage - label: Thumbnail image + name: featuredImage + label: Featured image models: - ImageBlock default: type: ImageBlock url: /images/post-1.jpeg altText: Post thumbnail image - - type: list - name: topSections - label: Top sections - items: - type: model - groups: - - sectionComponent - type: list name: bottomSections - label: Bottom sections + label: Sections items: type: model groups: - sectionComponent + - type: boolean + name: draft + group: settings + label: Draft + default: false + - type: model + name: seo + group: seo + models: + - stackbit_page_meta diff --git a/models/QuoteSection.yaml b/models/QuoteSection.yaml index dd4fe552..b1dca668 100644 --- a/models/QuoteSection.yaml +++ b/models/QuoteSection.yaml @@ -27,6 +27,7 @@ fields: default: Product Marketing Manager at Acme - type: model name: backgroundImage + group: styles label: Background image models: - ImageBlock diff --git a/models/Section.yaml b/models/Section.yaml index acd376d1..fadca9c7 100644 --- a/models/Section.yaml +++ b/models/Section.yaml @@ -113,7 +113,7 @@ fields: - center - right default: left - - type: string + - type: string name: elementId group: settings label: Element ID diff --git a/models/SelectFormControl.yaml b/models/SelectFormControl.yaml index 1c47eb20..28090062 100644 --- a/models/SelectFormControl.yaml +++ b/models/SelectFormControl.yaml @@ -1,6 +1,9 @@ type: object name: SelectFormControl label: Select +fieldGroups: + - name: styles + label: Styles fields: - type: string name: name @@ -25,6 +28,7 @@ fields: default: false - type: enum name: width + group: styles label: Width options: - label: Full diff --git a/models/Social.yaml b/models/Social.yaml index d8164ec5..d7c45efa 100644 --- a/models/Social.yaml +++ b/models/Social.yaml @@ -1,6 +1,11 @@ type: object name: Social label: Social +fieldGroups: + - name: styles + label: Styles + - name: settings + label: Settings fields: - type: string name: label @@ -15,10 +20,12 @@ fields: default: '#' - type: boolean name: showIcon + group: styles label: Show icon default: false - type: enum name: icon + group: styles label: Icon options: - facebook @@ -29,6 +36,7 @@ fields: default: facebook - type: enum name: style + group: styles label: Style options: - label: Link @@ -40,6 +48,7 @@ fields: default: secondary - 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/Testimonial.yaml b/models/Testimonial.yaml index bb9e56c5..80cdce7f 100644 --- a/models/Testimonial.yaml +++ b/models/Testimonial.yaml @@ -1,6 +1,9 @@ type: object name: Testimonial label: Testimonial +fieldGroups: + - name: settings + label: Settings fields: - type: markdown name: quote @@ -20,7 +23,7 @@ fields: name: image label: Author image models: [ImageBlock] - default: + default: url: /images/dianne-ameter.jpg altText: Product Marketing Manager - type: model @@ -28,4 +31,8 @@ fields: label: Company logo models: [ImageBlock] - type: string - name: elementId \ No newline at end of file + name: elementId + group: settings + label: Element ID + description: The unique ID for an HTML element, must not contain whitespace + default: '' diff --git a/models/TestimonialsSection.yaml b/models/TestimonialsSection.yaml index fc204f32..8c265c4c 100644 --- a/models/TestimonialsSection.yaml +++ b/models/TestimonialsSection.yaml @@ -41,8 +41,8 @@ fields: default: variant-b - type: model name: badge - label: Badge group: styles + label: Badge models: - Badge - type: string diff --git a/models/TextFormControl.yaml b/models/TextFormControl.yaml index bbc7b43a..83af371d 100644 --- a/models/TextFormControl.yaml +++ b/models/TextFormControl.yaml @@ -1,6 +1,9 @@ type: object name: TextFormControl label: Text +fieldGroups: + - name: styles + label: Styles fields: - type: string name: name @@ -19,6 +22,7 @@ fields: default: false - type: enum name: width + group: styles label: Width options: - label: Full diff --git a/models/TextSection.yaml b/models/TextSection.yaml index 250efc6b..bed68e51 100644 --- a/models/TextSection.yaml +++ b/models/TextSection.yaml @@ -31,8 +31,8 @@ fields: default: center - type: model name: badge - label: Badge group: styles + label: Badge models: - Badge - type: string diff --git a/models/TextareaFormControl.yaml b/models/TextareaFormControl.yaml index c5fadcd7..05813c4c 100644 --- a/models/TextareaFormControl.yaml +++ b/models/TextareaFormControl.yaml @@ -1,6 +1,9 @@ type: object name: TextareaFormControl label: Textarea +fieldGroups: + - name: styles + label: Styles fields: - type: string name: name @@ -19,6 +22,7 @@ fields: default: false - type: enum name: width + group: styles label: Width options: - label: Full diff --git a/models/VideoBlock.yaml b/models/VideoBlock.yaml index 9c267573..5d5338b8 100644 --- a/models/VideoBlock.yaml +++ b/models/VideoBlock.yaml @@ -1,6 +1,9 @@ type: object name: VideoBlock label: Video +fieldGroups: + - name: settings + label: Settings fields: - type: string name: url @@ -28,6 +31,7 @@ fields: default: false - type: string name: elementId + group: settings label: Element ID description: The unique ID for an HTML element, must not contain whitespace - default: '' \ No newline at end of file + default: '' diff --git a/public/models/Badge.yaml b/public/models/Badge.yaml index 605b310b..7dd1bb0e 100644 --- a/public/models/Badge.yaml +++ b/public/models/Badge.yaml @@ -1,13 +1,17 @@ type: object name: Badge label: Badge +fieldGroups: + - name: settings + label: Settings fields: + - type: string + name: label + label: Label + description: The text in the badge - 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: label - label: Label - description: The text in the badge diff --git a/public/models/Button.yaml b/public/models/Button.yaml index 87d46545..1c68f699 100644 --- a/public/models/Button.yaml +++ b/public/models/Button.yaml @@ -1,12 +1,12 @@ type: object name: Button label: Button +fieldGroups: + - name: styles + label: Styles + - name: settings + label: Settings fields: - - type: string - name: elementId - label: Element ID - description: The unique ID for an HTML element, must not contain whitespace - default: '' - type: string name: label label: Label @@ -22,10 +22,12 @@ fields: default: '/' - type: boolean name: showIcon + group: styles label: Show icon default: false - type: enum name: icon + group: styles label: Icon options: - arrowLeft @@ -39,6 +41,7 @@ fields: default: arrowLeft - type: enum name: iconPosition + group: styles label: Icon position options: - left @@ -46,6 +49,7 @@ fields: default: right - type: enum name: style + group: styles label: Style options: - label: Link @@ -55,3 +59,9 @@ fields: - label: Secondary value: secondary default: secondary + - 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/public/models/CheckboxFormControl.yaml b/public/models/CheckboxFormControl.yaml index abc7f319..d0a93362 100644 --- a/public/models/CheckboxFormControl.yaml +++ b/public/models/CheckboxFormControl.yaml @@ -1,6 +1,9 @@ type: object name: CheckboxFormControl label: Checkbox +fieldGroups: + - name: styles + label: Styles fields: - type: string name: name @@ -16,6 +19,7 @@ fields: default: false - type: enum name: width + group: styles label: Width options: - label: Full diff --git a/public/models/Config.yaml b/public/models/Config.yaml index d1de6e64..84d63e90 100644 --- a/public/models/Config.yaml +++ b/public/models/Config.yaml @@ -2,23 +2,6 @@ type: data name: Config label: Site configuration fields: - - type: enum - name: backgroundColor - label: Background color - options: - - label: White - value: bg-white - - label: Base - value: bg-base - - label: Primary - value: bg-primary - - label: Secondary - value: bg-secondary - - label: Complementary 1 - value: bg-complementary-1 - - label: Complementary 2 - value: bg-complementary-2 - default: bg-white - type: model name: navBar label: Navbar configuration diff --git a/public/models/ContactBlock.yaml b/public/models/ContactBlock.yaml index 538433cf..48618167 100644 --- a/public/models/ContactBlock.yaml +++ b/public/models/ContactBlock.yaml @@ -1,6 +1,9 @@ type: object name: ContactBlock label: Contact +fieldGroups: + - name: settings + label: Settings fields: - type: string name: phoneNumber @@ -21,4 +24,8 @@ fields: name: addressAltText label: Address alt text - type: string - name: elementId \ No newline at end of file + name: elementId + group: settings + label: Element ID + description: The unique ID for an HTML element, must not contain whitespace + default: '' diff --git a/public/models/ContactSection.yaml b/public/models/ContactSection.yaml index d0a25a7c..14ddb3ad 100644 --- a/public/models/ContactSection.yaml +++ b/public/models/ContactSection.yaml @@ -6,10 +6,10 @@ extends: groups: - sectionComponent fieldGroups: - - name: settings - label: Settings - name: styles label: Styles + - name: settings + label: Settings fields: - name: colors default: colors-h @@ -32,6 +32,7 @@ fields: - type: enum name: variant label: Arrangement + group: styles options: - label: Contact form with feature on the left value: variant-a @@ -40,6 +41,7 @@ fields: default: variant-b - type: model name: badge + group: styles label: Badge models: - Badge @@ -56,7 +58,7 @@ fields: - FormBlock default: type: FormBlock - idAttr: contact-form + elementId: contact-form action: /.netlify/functions/submission_created destination: '' fields: diff --git a/public/models/CtaSection.yaml b/public/models/CtaSection.yaml index 06922445..68a3832c 100644 --- a/public/models/CtaSection.yaml +++ b/public/models/CtaSection.yaml @@ -6,10 +6,10 @@ extends: groups: - sectionComponent fieldGroups: - - name: settings - label: Settings - name: styles label: Styles + - name: settings + label: Settings fields: - type: enum name: variant @@ -22,6 +22,7 @@ fields: default: variant-b - type: model name: badge + group: styles label: Badge models: - Badge diff --git a/public/models/EmailFormControl.yaml b/public/models/EmailFormControl.yaml index 8b70ecee..8487601a 100644 --- a/public/models/EmailFormControl.yaml +++ b/public/models/EmailFormControl.yaml @@ -1,6 +1,9 @@ type: object name: EmailFormControl label: Email +fieldGroups: + - name: styles + label: Styles fields: - type: string name: name @@ -19,6 +22,7 @@ fields: default: false - type: enum name: width + group: styles label: Width options: - label: Full diff --git a/public/models/FeaturedPeopleSection.yaml b/public/models/FeaturedPeopleSection.yaml index d03e361f..935cdec7 100644 --- a/public/models/FeaturedPeopleSection.yaml +++ b/public/models/FeaturedPeopleSection.yaml @@ -6,13 +6,14 @@ extends: groups: - sectionComponent fieldGroups: - - name: settings - label: Settings - name: styles label: Styles + - name: settings + label: Settings fields: - type: enum name: variant + group: styles label: Arrangement options: - label: Four columns, person info with image at the top @@ -24,6 +25,7 @@ fields: default: variant-a - type: model name: badge + group: styles label: Badge models: - Badge diff --git a/public/models/FeaturedPostsSection.yaml b/public/models/FeaturedPostsSection.yaml index 2191a751..90e0520b 100644 --- a/public/models/FeaturedPostsSection.yaml +++ b/public/models/FeaturedPostsSection.yaml @@ -6,13 +6,14 @@ extends: groups: - sectionComponent fieldGroups: - - name: settings - label: Settings - name: styles label: Styles + - name: settings + label: Settings fields: - type: enum name: variant + group: styles label: Arrangement options: - label: Three columns, post thumbnail at the top @@ -22,6 +23,7 @@ fields: default: variant-b - type: model name: badge + group: styles label: Badge models: - Badge diff --git a/public/models/Footer.yaml b/public/models/Footer.yaml index 5f740486..2301ddfc 100644 --- a/public/models/Footer.yaml +++ b/public/models/Footer.yaml @@ -1,9 +1,15 @@ type: object name: Footer label: Footer +fieldGroups: + - name: styles + label: Styles + - name: settings + label: Settings fields: - type: enum name: colors + group: styles label: Colors options: - label: Base foreground on white background @@ -27,21 +33,19 @@ fields: default: colors-a - type: enum name: width + group: styles label: Width options: - wide - full default: wide - - type: string - name: title - label: Title - - type: boolean - name: isTitleVisible - label: Display title - type: model name: logo label: Logo models: [ImageBlock] + - type: string + name: title + label: Title - type: markdown name: text label: Text diff --git a/public/models/FormBlock.yaml b/public/models/FormBlock.yaml index d8d3d7d5..5db57bfb 100644 --- a/public/models/FormBlock.yaml +++ b/public/models/FormBlock.yaml @@ -1,16 +1,10 @@ type: object name: FormBlock label: Form +fieldGroups: + - name: settings + label: Settings fields: - - type: string - name: idAttr - label: ID (used for id and name attributes) - - type: string - name: action - label: Action (form submission URL) - - type: string - name: destination - label: Destination (email to redirect responses) - type: list name: fields label: Fields @@ -25,3 +19,16 @@ fields: - type: string name: submitLabel label: Submit button label + - type: string + name: elementId + group: settings + label: Element ID + description: The unique ID used for id and name attributes, must not contain whitespace + - type: string + name: action + group: settings + label: Action (form submission URL) + - type: string + name: destination + group: settings + label: Destination (email to redirect responses) diff --git a/public/models/HeroSection.yaml b/public/models/HeroSection.yaml index a0cb5fa2..228ade97 100644 --- a/public/models/HeroSection.yaml +++ b/public/models/HeroSection.yaml @@ -6,10 +6,10 @@ extends: groups: - sectionComponent fieldGroups: - - name: settings - label: Settings - name: styles label: Styles + - name: settings + label: Settings fields: - name: colors default: colors-f @@ -32,6 +32,7 @@ fields: - type: enum name: variant label: Arrangement + group: styles options: - label: Hero with feature on the right value: variant-a @@ -44,6 +45,7 @@ fields: default: variant-a - type: model name: badge + group: styles label: Badge models: - Badge diff --git a/public/models/ImageBlock.yaml b/public/models/ImageBlock.yaml index d0811db4..25cb8cba 100644 --- a/public/models/ImageBlock.yaml +++ b/public/models/ImageBlock.yaml @@ -1,12 +1,12 @@ type: object name: ImageBlock label: Image +fieldGroups: + - name: styles + label: Styles + - name: settings + label: Settings fields: - - type: string - name: elementId - label: Element ID - description: The unique ID for an HTML element, must not contain whitespace - default: '' - type: image name: url label: Image @@ -21,6 +21,7 @@ fields: description: The caption of the image - type: number name: opacity + group: styles label: Opacity description: The opacity of the image controlType: 'slider' @@ -29,3 +30,9 @@ fields: step: 1 unit: '%' default: 100 + - 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/public/models/Link.yaml b/public/models/Link.yaml index 91dcbe8f..28c13b34 100644 --- a/public/models/Link.yaml +++ b/public/models/Link.yaml @@ -1,12 +1,12 @@ type: object name: Link label: Link +fieldGroups: + - name: styles + label: Styles + - name: settings + label: Settings fields: - - type: string - name: elementId - label: Element ID - description: The unique ID for an HTML element, must not contain whitespace - default: '' - type: string name: label label: Label @@ -22,10 +22,12 @@ fields: default: '/' - type: boolean name: showIcon + group: styles label: Show icon default: false - type: enum name: icon + group: styles label: Icon options: - arrowLeft @@ -39,6 +41,7 @@ fields: default: arrowLeft - type: enum name: iconPosition + group: styles label: Icon position options: - left @@ -46,6 +49,7 @@ fields: default: right - type: enum name: style + group: styles label: Style options: - label: Link @@ -55,3 +59,9 @@ fields: - label: Secondary value: 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/public/models/NavBar.yaml b/public/models/NavBar.yaml index 17925662..e632e58b 100644 --- a/public/models/NavBar.yaml +++ b/public/models/NavBar.yaml @@ -1,9 +1,15 @@ type: object name: NavBar label: Navbar +fieldGroups: + - name: styles + label: Styles + - name: settings + label: Settings fields: - type: enum name: desktopNavVariant + group: styles label: Desktop navigation arrangement options: - label: Navbar with logo and primary links on the left @@ -17,6 +23,7 @@ fields: default: variant-a - type: enum name: mobileNavVariant + group: styles label: Mobile navigation arrangement options: - label: Full-width mobile navigation @@ -26,6 +33,7 @@ fields: default: variant-a - type: enum name: primaryColors + group: styles label: Primary colors (navbar) options: - label: Base foreground on white background @@ -49,6 +57,7 @@ fields: default: colors-a - type: enum name: secondaryColors + group: styles label: Secondary colors (mobile navigation) options: - label: Base foreground on white background @@ -72,6 +81,7 @@ fields: default: colors-a - type: enum name: width + group: styles label: Width options: - wide diff --git a/public/models/PageLayout.yaml b/public/models/PageLayout.yaml index 3134702c..509ecbfe 100644 --- a/public/models/PageLayout.yaml +++ b/public/models/PageLayout.yaml @@ -2,6 +2,11 @@ name: PageLayout label: Page layout: PageLayout hideContent: true +fieldGroups: + - name: settings + label: Settings + - name: seo + label: SEO fields: - type: string name: title @@ -46,4 +51,11 @@ fields: feature: type: ImageBlock url: /images/hero.png - altText: Image alt text \ No newline at end of file + altText: Image alt text + - type: model + name: seo + group: seo + models: + - stackbit_page_meta + + diff --git a/public/models/Person.yaml b/public/models/Person.yaml index d2cb7e6e..e469ab42 100644 --- a/public/models/Person.yaml +++ b/public/models/Person.yaml @@ -1,10 +1,6 @@ name: Person label: Person fields: - - type: string - name: id - label: ID - default: johnna-doe - type: string name: firstName label: First name @@ -28,3 +24,7 @@ fields: default: url: /images/dianne-ameter.jpg altText: Product Marketing Manager + - type: string + name: id + label: ID + default: johnna-doe diff --git a/public/models/PostLayout.yaml b/public/models/PostLayout.yaml index 102b9687..0a8d73cf 100644 --- a/public/models/PostLayout.yaml +++ b/public/models/PostLayout.yaml @@ -1,6 +1,11 @@ name: PostLayout label: Post layout: PostLayout +fieldGroups: + - name: settings + label: Settings + - name: seo + label: SEO fields: - type: string name: title @@ -19,25 +24,28 @@ fields: label: Excerpt default: This is the excerpt of your blog post visible in the post feed or featured posts. - type: model - name: thumbImage - label: Thumbnail image + name: featuredImage + label: Featured image models: - ImageBlock default: type: ImageBlock url: /images/post-1.jpeg altText: Post thumbnail image - - type: list - name: topSections - label: Top sections - items: - type: model - groups: - - sectionComponent - type: list name: bottomSections - label: Bottom sections + label: Sections items: type: model groups: - sectionComponent + - type: boolean + name: draft + group: settings + label: Draft + default: false + - type: model + name: seo + group: seo + models: + - stackbit_page_meta diff --git a/public/models/QuoteSection.yaml b/public/models/QuoteSection.yaml index 09c13733..b1dca668 100644 --- a/public/models/QuoteSection.yaml +++ b/public/models/QuoteSection.yaml @@ -6,10 +6,10 @@ extends: groups: - sectionComponent fieldGroups: - - name: settings - label: Settings - name: styles label: Styles + - name: settings + label: Settings fields: - type: markdown name: quote @@ -27,6 +27,7 @@ fields: default: Product Marketing Manager at Acme - type: model name: backgroundImage + group: styles label: Background image models: - ImageBlock diff --git a/public/models/Section.yaml b/public/models/Section.yaml index 4ee112fc..fadca9c7 100644 --- a/public/models/Section.yaml +++ b/public/models/Section.yaml @@ -2,17 +2,11 @@ type: object name: Section label: Section fieldGroups: - - name: settings - label: Settings - 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: enum name: colors group: styles @@ -119,3 +113,9 @@ fields: - center - right default: left + - 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/public/models/SelectFormControl.yaml b/public/models/SelectFormControl.yaml index 1c47eb20..28090062 100644 --- a/public/models/SelectFormControl.yaml +++ b/public/models/SelectFormControl.yaml @@ -1,6 +1,9 @@ type: object name: SelectFormControl label: Select +fieldGroups: + - name: styles + label: Styles fields: - type: string name: name @@ -25,6 +28,7 @@ fields: default: false - type: enum name: width + group: styles label: Width options: - label: Full diff --git a/public/models/Social.yaml b/public/models/Social.yaml index c34c71e3..d7c45efa 100644 --- a/public/models/Social.yaml +++ b/public/models/Social.yaml @@ -1,12 +1,12 @@ type: object name: Social label: Social +fieldGroups: + - name: styles + label: Styles + - name: settings + label: Settings fields: - - type: string - name: elementId - label: Element ID - description: The unique ID for an HTML element, must not contain whitespace - default: '' - type: string name: label label: Label @@ -20,10 +20,12 @@ fields: default: '#' - type: boolean name: showIcon + group: styles label: Show icon default: false - type: enum name: icon + group: styles label: Icon options: - facebook @@ -34,6 +36,7 @@ fields: default: facebook - type: enum name: style + group: styles label: Style options: - label: Link @@ -43,3 +46,9 @@ fields: - label: Secondary value: secondary default: secondary + - 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/public/models/Testimonial.yaml b/public/models/Testimonial.yaml index bb9e56c5..80cdce7f 100644 --- a/public/models/Testimonial.yaml +++ b/public/models/Testimonial.yaml @@ -1,6 +1,9 @@ type: object name: Testimonial label: Testimonial +fieldGroups: + - name: settings + label: Settings fields: - type: markdown name: quote @@ -20,7 +23,7 @@ fields: name: image label: Author image models: [ImageBlock] - default: + default: url: /images/dianne-ameter.jpg altText: Product Marketing Manager - type: model @@ -28,4 +31,8 @@ fields: label: Company logo models: [ImageBlock] - type: string - name: elementId \ No newline at end of file + name: elementId + group: settings + label: Element ID + description: The unique ID for an HTML element, must not contain whitespace + default: '' diff --git a/public/models/TestimonialsSection.yaml b/public/models/TestimonialsSection.yaml index c60bbea7..8c265c4c 100644 --- a/public/models/TestimonialsSection.yaml +++ b/public/models/TestimonialsSection.yaml @@ -6,10 +6,10 @@ extends: groups: - sectionComponent fieldGroups: - - name: settings - label: Settings - name: styles label: Styles + - name: settings + label: Settings fields: - name: colors default: colors-h @@ -32,6 +32,7 @@ fields: - type: enum name: variant label: Arrangement + group: styles options: - label: Testimonial with author image at the bottom value: variant-a @@ -40,6 +41,7 @@ fields: default: variant-b - type: model name: badge + group: styles label: Badge models: - Badge diff --git a/public/models/TextFormControl.yaml b/public/models/TextFormControl.yaml index bbc7b43a..83af371d 100644 --- a/public/models/TextFormControl.yaml +++ b/public/models/TextFormControl.yaml @@ -1,6 +1,9 @@ type: object name: TextFormControl label: Text +fieldGroups: + - name: styles + label: Styles fields: - type: string name: name @@ -19,6 +22,7 @@ fields: default: false - type: enum name: width + group: styles label: Width options: - label: Full diff --git a/public/models/TextSection.yaml b/public/models/TextSection.yaml index 6bc87e44..bed68e51 100644 --- a/public/models/TextSection.yaml +++ b/public/models/TextSection.yaml @@ -6,10 +6,10 @@ extends: groups: - sectionComponent fieldGroups: - - name: settings - label: Settings - name: styles label: Styles + - name: settings + label: Settings fields: - name: colors default: colors-f @@ -31,6 +31,7 @@ fields: default: center - type: model name: badge + group: styles label: Badge models: - Badge diff --git a/public/models/TextareaFormControl.yaml b/public/models/TextareaFormControl.yaml index c5fadcd7..05813c4c 100644 --- a/public/models/TextareaFormControl.yaml +++ b/public/models/TextareaFormControl.yaml @@ -1,6 +1,9 @@ type: object name: TextareaFormControl label: Textarea +fieldGroups: + - name: styles + label: Styles fields: - type: string name: name @@ -19,6 +22,7 @@ fields: default: false - type: enum name: width + group: styles label: Width options: - label: Full diff --git a/public/models/VideoBlock.yaml b/public/models/VideoBlock.yaml index 5e290664..5d5338b8 100644 --- a/public/models/VideoBlock.yaml +++ b/public/models/VideoBlock.yaml @@ -1,12 +1,10 @@ type: object name: VideoBlock label: Video +fieldGroups: + - name: settings + label: Settings fields: - - type: string - name: elementId - label: Element ID - description: The unique ID for an HTML element, must not contain whitespace - default: '' - type: string name: url label: Video @@ -31,3 +29,9 @@ fields: name: controls label: Controls default: false + - 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/src/base/DefaultBaseLayout/index.js b/src/base/DefaultBaseLayout/index.js index ce9d58e6..05dc24fc 100644 --- a/src/base/DefaultBaseLayout/index.js +++ b/src/base/DefaultBaseLayout/index.js @@ -10,12 +10,7 @@ export default function DefaultBaseLayout(props) { const pageMeta = page?.__metadata || {}; return (
-
+
{page.title} diff --git a/src/components/ContactSection/contact-section.stories.js b/src/components/ContactSection/contact-section.stories.js index 6fe4788a..0daa8367 100644 --- a/src/components/ContactSection/contact-section.stories.js +++ b/src/components/ContactSection/contact-section.stories.js @@ -86,7 +86,7 @@ const args = { }, form: { type: 'FormBlock', - idAttr: 'contact-form', + elementId: 'contact-form', fields: [ { type: 'TextFormControl', diff --git a/src/components/FeaturedPostsSection/featured-posts-section.stories.js b/src/components/FeaturedPostsSection/featured-posts-section.stories.js index 25a656c1..bf218ef6 100644 --- a/src/components/FeaturedPostsSection/featured-posts-section.stories.js +++ b/src/components/FeaturedPostsSection/featured-posts-section.stories.js @@ -91,7 +91,7 @@ const args = { title: 'Post Title Three', date: '2021-07-03', excerpt: 'Primum divisit ineleganter; Hoc unum Aristo tenuit: praeter vitia atque virtutes negavit rem esse ullam aut fugiendam.', - thumbImage: { + featuredImage: { type: 'ImageBlock', url: '/images/post-3.jpeg', altText: 'Post Image' @@ -104,7 +104,7 @@ const args = { title: 'Post Title Two', date: '2021-07-01', excerpt: 'otius inflammat, ut coercendi magis quam dedocendi esse videantur.', - thumbImage: { + featuredImage: { type: 'ImageBlock', url: '/images/post-2.jpeg', altText: 'Post Image' @@ -117,7 +117,7 @@ const args = { title: 'Post Title One', date: '2021-06-28', excerpt: 'Quo plebiscito decreta a senatu est consuli quaestio Cn. Illud non continuo, ut aeque incontentae. Atqui pugnantibus et contrariis.', - thumbImage: { + featuredImage: { type: 'ImageBlock', url: '/images/post-1.jpeg', altText: 'Post Image' diff --git a/src/components/FeaturedPostsSection/index.js b/src/components/FeaturedPostsSection/index.js index f2f179fd..0c6c9b86 100644 --- a/src/components/FeaturedPostsSection/index.js +++ b/src/components/FeaturedPostsSection/index.js @@ -160,9 +160,9 @@ function postsVariantA(props) { return (
- {post.thumbImage && ( -
- + {post.featuredImage && ( +
+
)}
@@ -201,14 +201,14 @@ function postsVariantB(props) { const formattedDate = dayjs(post.date).format('MMMM D, YYYY'); return (
- {post.thumbImage && ( + {post.featuredImage && (
- +
)} diff --git a/src/components/Footer/footer.stories.js b/src/components/Footer/footer.stories.js index 7026f8d0..6785c7dd 100644 --- a/src/components/Footer/footer.stories.js +++ b/src/components/Footer/footer.stories.js @@ -24,7 +24,6 @@ const args = { colors: 'colors-c', width: 'wide', title: 'Starter', - isTitleVisible: true, logo: { type: 'ImageBlock', url: '/images/logo-alt.svg', diff --git a/src/components/Footer/index.js b/src/components/Footer/index.js index 374dec8f..b6bf0b14 100644 --- a/src/components/Footer/index.js +++ b/src/components/Footer/index.js @@ -43,20 +43,30 @@ export default function Footer(props) { 'md:py-20' )} > - {((props.title && props.isTitleVisible) || props.logo || props.text) && ( + {(props.logo || props.title || props.text) && (
- {((props.title && props.isTitleVisible) || props.logo) && ( - - {props.logo && } - {props.isTitleVisible && ( -
- {props.title} -
- )} + {props.logo && ( + + {props.logo && } )} + {props.title && ( +
+ {props.title} +
+ )} {props.text && ( - + {props.text} )} diff --git a/src/components/FormBlock/form-block.stories.js b/src/components/FormBlock/form-block.stories.js index 5e6f95e8..e58c5e24 100644 --- a/src/components/FormBlock/form-block.stories.js +++ b/src/components/FormBlock/form-block.stories.js @@ -10,7 +10,7 @@ const Template = (args) => ; const args = { type: 'FormBlock', - idAttr: 'contact-form', + elementId: 'contact-form', fields: [ { type: 'TextFormControl', diff --git a/src/components/FormBlock/index.js b/src/components/FormBlock/index.js index d3e5f061..c0cfdbe7 100644 --- a/src/components/FormBlock/index.js +++ b/src/components/FormBlock/index.js @@ -54,24 +54,24 @@ export default class FormBlock extends React.Component { } render() { - const { fields = [], idAttr, action, destination, submitLabel, className } = this.props; + const { fields = [], elementId, action, destination, submitLabel, className } = this.props; if (fields.length === 0) { return null; } - const formHoneypotName = `${idAttr}-bot-field`; + const formHoneypotName = `${elementId}-bot-field`; return (
this.handleSubmit(e, action)} data-netlify="true" ref={this.formRef} data-netlify-honeypot={formHoneypotName} - data-sb-field-path=".idAttr#@name .idAttr#@id .action#@action" + data-sb-field-path=".elementId#@name .elementId#@id .action#@action" >
- + {fields.map((field, index) => { const fieldType = field.type; diff --git a/src/components/HeroSection/hero-section.stories.js b/src/components/HeroSection/hero-section.stories.js index 54e6751a..a85e9ff9 100644 --- a/src/components/HeroSection/hero-section.stories.js +++ b/src/components/HeroSection/hero-section.stories.js @@ -13,11 +13,6 @@ export default { elementId: { defaultValue: '' }, - variant: { - options: ['variant-a', 'variant-b', 'variant-c', 'variant-d'], - defaultValue: 'variant-a', - control: { type: 'select' } - }, colors: { options: ['colors-a', 'colors-b', 'colors-c', 'colors-d', 'colors-e', 'colors-f', 'colors-g', 'colors-h', 'colors-i'], defaultValue: 'colors-a', @@ -62,6 +57,11 @@ export default { options: ['left', 'center', 'right'], defaultValue: 'left', control: { type: 'select' } + }, + featurePosition: { + options: ['right', 'left', 'top', 'bottom'], + defaultValue: 'right', + control: { type: 'select' } } }, parameters: { @@ -104,7 +104,6 @@ const Template = (args) => ; const args = { type: 'HeroSection', elementId: '', - variant: 'variant-a', colors: 'colors-a', width: 'wide', height: 'short', @@ -141,6 +140,7 @@ const args = { altText: 'Image alt text', caption: 'Image caption' }, + featurePosition: 'right', styles: { badge: { fontSize: 'x-small', @@ -173,7 +173,6 @@ export const HeroLeftVideo = Template.bind({}); HeroLeftVideo.storyName = 'Hero Section With Video on the Left'; HeroLeftVideo.args = { ...args, - variant: 'variant-b', colors: 'colors-c', width: 'full', height: 'tall', @@ -200,7 +199,6 @@ export const HeroBottomImage = Template.bind({}); HeroBottomImage.storyName = 'Hero Section With Image at the Bottom'; HeroBottomImage.args = { ...args, - variant: 'variant-d', colors: 'colors-c', width: 'full', contentWidth: 'small', @@ -225,7 +223,6 @@ export const HeroTextOnly = Template.bind({}); HeroTextOnly.storyName = 'Hero Section With Text Only'; HeroTextOnly.args = { ...args, - variant: 'variant-a', colors: 'colors-c', width: 'full', height: 'tall', @@ -265,7 +262,6 @@ export const HeroRightForm = Template.bind({}); HeroRightForm.storyName = 'Hero Section With Form on the Right'; HeroRightForm.args = { ...args, - variant: 'variant-a', colors: 'colors-f', contentWidth: 'medium', badge: null, @@ -281,7 +277,7 @@ HeroRightForm.args = { ], feature: { type: 'FormBlock', - idAttr: 'hero-form', + elementId: 'hero-form', fields: [ { type: 'TextFormControl', @@ -308,7 +304,6 @@ export const HeroBottomForm = Template.bind({}); HeroBottomForm.storyName = 'Hero Section With Form at the Bottom'; HeroBottomForm.args = { ...args, - variant: 'variant-d', colors: 'colors-i', contentWidth: 'small', contentAlignHoriz: 'center', @@ -317,7 +312,7 @@ HeroBottomForm.args = { actions: null, feature: { type: 'FormBlock', - idAttr: 'hero-form', + elementId: 'hero-form', fields: [ { type: 'EmailFormControl', diff --git a/src/components/HeroSection/index.js b/src/components/HeroSection/index.js index 1eb2d414..392419c3 100644 --- a/src/components/HeroSection/index.js +++ b/src/components/HeroSection/index.js @@ -15,6 +15,7 @@ export default function HeroSection(props) { const contentWidth = props.contentWidth || 'large'; const contentAlignHoriz = props.contentAlignHoriz || 'left'; const contentAlignVert = props.contentAlignVert || 'middle'; + const featurePosition = props.featurePosition || 'right'; return (
- {(width === 'full') && props.backgroundImage && heroBackgroundImage(props.backgroundImage)}
- {(width === 'wide') && props.backgroundImage && heroBackgroundImage(props.backgroundImage)} + {props.backgroundImage && heroBackgroundImage(props.backgroundImage)}
- {heroVariants(props)} +
+
+ {heroBody(props)} + {heroActions(props)} +
+ {props.feature && ( +
+ {heroFeature(props.feature)} +
+ )} +
); } -function heroVariants(props) { - const variant = props.variant || 'variant-a'; - switch (variant) { - case 'variant-a': - return heroFeatureRight(props); - case 'variant-b': - return heroFeatureLeft(props); - case 'variant-c': - return heroFeatureTop(props); - case 'variant-d': - return heroFeatureBottom(props); - } - return null; -} - -function heroFeatureRight(props) { - const contentAlignVert = props.contentAlignVert || 'middle'; - return ( -
-
- {heroBody(props)} - {heroActions(props)} -
- {props.feature &&
{heroFeature(props.feature)}
} -
- ); -} - -function heroFeatureLeft(props) { - const contentAlignVert = props.contentAlignVert || 'middle'; - return ( -
- {props.feature &&
{heroFeature(props.feature)}
} -
- {heroBody(props)} - {heroActions(props)} -
-
- ); -} - -function heroFeatureTop(props) { - return ( - <> - {props.feature && ( -
- {heroFeature(props.feature)} -
- )} -
- {heroBody(props)} - {heroActions(props)} -
- - ); -} - -function heroFeatureBottom(props) { - return ( - <> -
- {heroBody(props)} - {heroActions(props)} -
- {props.feature && ( -
- {heroFeature(props.feature)} -
- )} - - ); -} - function heroFeature(feature) { const featureType = feature.type; if (!featureType) { diff --git a/src/layouts/PageLayout/page-layout.stories.js b/src/layouts/PageLayout/page-layout.stories.js index 8f960589..3f87102d 100644 --- a/src/layouts/PageLayout/page-layout.stories.js +++ b/src/layouts/PageLayout/page-layout.stories.js @@ -46,7 +46,6 @@ Primary.args = { ] }, site: { - backgroundColor: 'bg-white', navBar: NavBarStories.Primary.args, footer: FooterStories.Primary.args } diff --git a/src/layouts/PostLayout/index.js b/src/layouts/PostLayout/index.js index 0dad123d..6b18eb3a 100644 --- a/src/layouts/PostLayout/index.js +++ b/src/layouts/PostLayout/index.js @@ -8,8 +8,7 @@ import { getDynamicComponent } from '../../components-registry'; export default function PostLayout(props) { const { page, site } = props; const BaseLayout = getBaseLayoutComponent(page.baseLayout, site.baseLayout); - const topSections = page.topSections || []; - const bottomSections = page.bottomSections || []; + const sections = page.bottomSections || []; const dateTimeAttr = dayjs(page.date).format('YYYY-MM-DD HH:mm:ss'); const formattedDate = dayjs(page.date).format('MMMM D, YYYY'); @@ -17,17 +16,6 @@ export default function PostLayout(props) { <>
- {topSections.length > 0 && ( -
- {topSections.map((section, index) => { - const Component = getDynamicComponent(section.type); - if (!Component) { - throw new Error(`no component matching the page section's type: ${section.type}`); - } - return ; - })} -
- )}
@@ -43,9 +31,9 @@ export default function PostLayout(props) { {page.author && postAuthor(page.author)}
- {page.thumbImage && ( -
- + {page.featuredImage && ( +
+
)} {page.markdown_content && ( @@ -59,9 +47,9 @@ export default function PostLayout(props) { )}
- {bottomSections.length > 0 && ( + {sections.length > 0 && (
- {bottomSections.map((section, index) => { + {sections.map((section, index) => { const Component = getDynamicComponent(section.type); if (!Component) { throw new Error(`no component matching the page section's type: ${section.type}`); diff --git a/src/layouts/PostLayout/post-layout.stories.js b/src/layouts/PostLayout/post-layout.stories.js index bd7dd478..da57cdd6 100644 --- a/src/layouts/PostLayout/post-layout.stories.js +++ b/src/layouts/PostLayout/post-layout.stories.js @@ -41,7 +41,7 @@ Primary.args = { } }, excerpt: 'Gracchum patrem non beatiorem fuisse quam fillum, cum alter stabilire rem publicam studuerit, alter evertere. Quo plebiscito decreta a senatu est consuli quaestio.', - thumbImage: { + featuredImage: { type: 'ImageBlock', url: '/images/post-1.jpeg', altText: 'Post Image' @@ -51,8 +51,6 @@ Primary.args = { bottomSections: [FeaturedPostsSectionStories.Primary.args, CtaSectionStories.Primary.args] }, site: { - __metadata: {}, - backgroundColor: 'bg-white', navBar: NavBarStories.Primary.args, footer: FooterStories.Primary.args } From 180dd201deb6e40c753aa40606ffeb655260b47a Mon Sep 17 00:00:00 2001 From: TomasBankauskas Date: Wed, 13 Oct 2021 15:32:18 +0300 Subject: [PATCH 3/4] fixed validation errors --- models/PageLayout.yaml | 16 ++-------------- models/PostLayout.yaml | 15 --------------- public/models/HeroSection.yaml | 23 +++++++++-------------- src/components/HeroSection/index.js | 17 ++++++++--------- 4 files changed, 19 insertions(+), 52 deletions(-) diff --git a/models/PageLayout.yaml b/models/PageLayout.yaml index 509ecbfe..91881389 100644 --- a/models/PageLayout.yaml +++ b/models/PageLayout.yaml @@ -2,11 +2,6 @@ name: PageLayout label: Page layout: PageLayout hideContent: true -fieldGroups: - - name: settings - label: Settings - - name: seo - label: SEO fields: - type: string name: title @@ -32,12 +27,12 @@ fields: contentAlignHoriz: center contentAlignVert: middle textAlign: left - title: This Is A Big Hero **Headline** + title: This Is A Big Hero Headline text: >- Aenean eros ipsum, interdum quis dignissim non, sollicitudin vitae nisl. Aenean vel aliquet elit, at blandit ipsum. Sed eleifend felis sit amet erat molestie, hendrerit malesuada justo ultrices. Nunc volutpat at erat - itae interdum. Ut nec massa eget lorem blandit condimentum et at risus. + itae interdum. Ut nec massa eget lorem blandit condimentum et at risus. actions: - type: Button label: Get Started @@ -52,10 +47,3 @@ fields: type: ImageBlock url: /images/hero.png altText: Image alt text - - type: model - name: seo - group: seo - models: - - stackbit_page_meta - - diff --git a/models/PostLayout.yaml b/models/PostLayout.yaml index 0a8d73cf..721a5057 100644 --- a/models/PostLayout.yaml +++ b/models/PostLayout.yaml @@ -1,11 +1,6 @@ name: PostLayout label: Post layout: PostLayout -fieldGroups: - - name: settings - label: Settings - - name: seo - label: SEO fields: - type: string name: title @@ -39,13 +34,3 @@ fields: type: model groups: - sectionComponent - - type: boolean - name: draft - group: settings - label: Draft - default: false - - type: model - name: seo - group: seo - models: - - stackbit_page_meta diff --git a/public/models/HeroSection.yaml b/public/models/HeroSection.yaml index 228ade97..f0a5b794 100644 --- a/public/models/HeroSection.yaml +++ b/public/models/HeroSection.yaml @@ -29,20 +29,6 @@ fields: default: none - name: textAlign default: left - - type: enum - name: variant - label: Arrangement - group: styles - options: - - label: Hero with feature on the right - value: variant-a - - label: Hero with feature on the left - value: variant-b - - label: Hero with feature at the top - value: variant-c - - label: Hero with feature at the bottom - value: variant-d - default: variant-a - type: model name: badge group: styles @@ -94,6 +80,15 @@ fields: type: ImageBlock url: /images/hero.png altText: Hero section image + - type: enum + name: featurePosition + label: Feature position + options: + - right + - left + - top + - bottom + default: right - type: model name: backgroundImage group: styles diff --git a/src/components/HeroSection/index.js b/src/components/HeroSection/index.js index 392419c3..be62977c 100644 --- a/src/components/HeroSection/index.js +++ b/src/components/HeroSection/index.js @@ -156,7 +156,6 @@ function heroBackgroundImage(image) { } function heroBody(props) { - return (
{props.badge && ( @@ -164,8 +163,8 @@ function heroBody(props) { className={classNames( 'component-section-badge', 'mb-4', - mapStyles(props.styles.badge)) - } + mapStyles(props.styles.badge) + )} data-sb-field-path=".badge" > @@ -176,8 +175,8 @@ function heroBody(props) { className={classNames( 'component-section-title', 'mb-6', - mapStyles(props.styles.title)) - } + mapStyles(props.styles.title) + )} data-sb-field-path=".title" > {props.title} @@ -188,8 +187,8 @@ function heroBody(props) { className={classNames( 'component-section-subtitle', 'mb-3', - mapStyles(props.styles.subtitle)) - } + mapStyles(props.styles.subtitle) + )} data-sb-field-path=".subtitle" > {props.subtitle} @@ -201,8 +200,8 @@ function heroBody(props) { className={classNames( 'component-section-text', 'mb-3', - mapStyles(props.styles.text)) - } + mapStyles(props.styles.text) + )} data-sb-field-path=".text" > {props.text} From 7e5d1e6e8dd28c3943935938880d6124434b1371 Mon Sep 17 00:00:00 2001 From: TomasBankauskas Date: Wed, 13 Oct 2021 16:05:53 +0300 Subject: [PATCH 4/4] updated models --- public/models/PageLayout.yaml | 16 ++-------------- public/models/PostLayout.yaml | 15 --------------- 2 files changed, 2 insertions(+), 29 deletions(-) diff --git a/public/models/PageLayout.yaml b/public/models/PageLayout.yaml index 509ecbfe..91881389 100644 --- a/public/models/PageLayout.yaml +++ b/public/models/PageLayout.yaml @@ -2,11 +2,6 @@ name: PageLayout label: Page layout: PageLayout hideContent: true -fieldGroups: - - name: settings - label: Settings - - name: seo - label: SEO fields: - type: string name: title @@ -32,12 +27,12 @@ fields: contentAlignHoriz: center contentAlignVert: middle textAlign: left - title: This Is A Big Hero **Headline** + title: This Is A Big Hero Headline text: >- Aenean eros ipsum, interdum quis dignissim non, sollicitudin vitae nisl. Aenean vel aliquet elit, at blandit ipsum. Sed eleifend felis sit amet erat molestie, hendrerit malesuada justo ultrices. Nunc volutpat at erat - itae interdum. Ut nec massa eget lorem blandit condimentum et at risus. + itae interdum. Ut nec massa eget lorem blandit condimentum et at risus. actions: - type: Button label: Get Started @@ -52,10 +47,3 @@ fields: type: ImageBlock url: /images/hero.png altText: Image alt text - - type: model - name: seo - group: seo - models: - - stackbit_page_meta - - diff --git a/public/models/PostLayout.yaml b/public/models/PostLayout.yaml index 0a8d73cf..721a5057 100644 --- a/public/models/PostLayout.yaml +++ b/public/models/PostLayout.yaml @@ -1,11 +1,6 @@ name: PostLayout label: Post layout: PostLayout -fieldGroups: - - name: settings - label: Settings - - name: seo - label: SEO fields: - type: string name: title @@ -39,13 +34,3 @@ fields: type: model groups: - sectionComponent - - type: boolean - name: draft - group: settings - label: Draft - default: false - - type: model - name: seo - group: seo - models: - - stackbit_page_meta