Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion models/ContactSection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ fields:
- type: enum
name: variant
label: Arrangement
controlType: thumbnails
options:
- label: Contact form with feature on the left
value: variant-a
Expand Down
1 change: 0 additions & 1 deletion models/CtaSection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ fields:
- type: enum
name: variant
label: Arrangement
controlType: thumbnails
options:
- label: CTA with buttons at the bottom
value: variant-a
Expand Down
1 change: 0 additions & 1 deletion models/FeaturedPeopleSection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ fields:
- type: enum
name: variant
label: Arrangement
controlType: thumbnails
options:
- label: Four columns, person info with image at the top
value: variant-a
Expand Down
3 changes: 1 addition & 2 deletions models/FeaturedPostsSection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ fields:
- type: enum
name: variant
label: Arrangement
controlType: thumbnails
options:
- label: Three columns, post thumbnail at the top
value: variant-a
Expand Down Expand Up @@ -53,4 +52,4 @@ fields:
default:
- content/pages/blog/post-three.md
- content/pages/blog/post-two.md
- content/pages/blog/post-one.md
- content/pages/blog/post-one.md
5 changes: 4 additions & 1 deletion models/HeroSection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ fields:
- type: enum
name: variant
label: Arrangement
controlType: thumbnails
options:
- label: Hero with feature on the right
value: variant-a
Expand All @@ -48,6 +47,10 @@ fields:
name: title
label: Title
default: This Is A Big Hero Headline
- type: string
name: subtitle
label: Subtitle
default: This Is Subtitle
- type: markdown
name: text
label: Text
Expand Down
1 change: 0 additions & 1 deletion models/TestimonialsSection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ fields:
- type: enum
name: variant
label: Arrangement
controlType: thumbnails
options:
- label: Testimonial with author image at the bottom
value: variant-a
Expand Down
1 change: 0 additions & 1 deletion public/models/ContactSection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ fields:
- type: enum
name: variant
label: Arrangement
controlType: thumbnails
options:
- label: Contact form with feature on the left
value: variant-a
Expand Down
1 change: 0 additions & 1 deletion public/models/CtaSection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ fields:
- type: enum
name: variant
label: Arrangement
controlType: thumbnails
options:
- label: CTA with buttons at the bottom
value: variant-a
Expand Down
1 change: 0 additions & 1 deletion public/models/FeaturedPeopleSection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ fields:
- type: enum
name: variant
label: Arrangement
controlType: thumbnails
options:
- label: Four columns, person info with image at the top
value: variant-a
Expand Down
3 changes: 1 addition & 2 deletions public/models/FeaturedPostsSection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ fields:
- type: enum
name: variant
label: Arrangement
controlType: thumbnails
options:
- label: Three columns, post thumbnail at the top
value: variant-a
Expand Down Expand Up @@ -53,4 +52,4 @@ fields:
default:
- content/pages/blog/post-three.md
- content/pages/blog/post-two.md
- content/pages/blog/post-one.md
- content/pages/blog/post-one.md
5 changes: 4 additions & 1 deletion public/models/HeroSection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ fields:
- type: enum
name: variant
label: Arrangement
controlType: thumbnails
options:
- label: Hero with feature on the right
value: variant-a
Expand All @@ -48,6 +47,10 @@ fields:
name: title
label: Title
default: This Is A Big Hero Headline
- type: string
name: subtitle
label: Subtitle
default: This Is Subtitle
- type: markdown
name: text
label: Text
Expand Down
1 change: 0 additions & 1 deletion public/models/TestimonialsSection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ fields:
- type: enum
name: variant
label: Arrangement
controlType: thumbnails
options:
- label: Testimonial with author image at the bottom
value: variant-a
Expand Down
2 changes: 1 addition & 1 deletion src/components/ContactSection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function contactContent(props) {
>
{props.badge && <Badge {...props.badge} className="inline-block mb-4 text-xs" annotationPrefix=".badge" />}
{props.title && (
<h2 className="text-4xl tracking-tight sm:text-5xl mb-6" data-sb-field-path=".title">
<h2 className="component-section-title text-4xl tracking-tight sm:text-5xl mb-6" data-sb-field-path=".title">
<InlineMarkdown>{props.title}</InlineMarkdown>
</h2>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/CtaSection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ function ctaContent(props) {
<>
{props.badge && <Badge {...props.badge} className="inline-block inline-block mb-4 text-xs" annotationPrefix=".badge" />}
{props.title && (
<h2 className="text-3xl tracking-tight sm:text-4xl mb-6" data-sb-field-path=".title">
<h2 className="component-section-title text-3xl tracking-tight sm:text-4xl mb-6" data-sb-field-path=".title">
<InlineMarkdown>{props.title}</InlineMarkdown>
</h2>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/FeaturedPeopleSection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function featuredPeopleHeader(props) {
>
{props.badge && <Badge {...props.badge} className="inline-block mb-4 text-xs" annotationPrefix=".badge" />}
{props.title && (
<h2 className="text-3xl tracking-tight sm:text-4xl" data-sb-field-path=".title">
<h2 className="component-section-title text-3xl tracking-tight sm:text-4xl" data-sb-field-path=".title">
<InlineMarkdown>{props.title}</InlineMarkdown>
</h2>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/FeaturedPostsSection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function featuredPostsHeader(props) {
>
{props.badge && <Badge {...props.badge} className="inline-block inline-block mb-4 text-xs" annotationPrefix=".badge" />}
{props.title && (
<h2 className="text-3xl tracking-tight sm:text-4xl" data-sb-field-path=".title">
<h2 className="component-section-title text-3xl tracking-tight sm:text-4xl" data-sb-field-path=".title">
<InlineMarkdown>{props.title}</InlineMarkdown>
</h2>
)}
Expand Down
13 changes: 2 additions & 11 deletions src/components/HeroSection/hero-section.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ const args = {
contentAlignHoriz: 'center',
contentAlignVert: 'middle',
textAlign: 'left',
title: 'The quick, brown fox jumps over **a lazy dog**',
subtitle: 'Section subtitle',
badge: {
type: 'Badge',
label: 'Brand new'
Expand Down Expand Up @@ -154,10 +156,6 @@ HeroLeftVideo.args = {
colors: 'colors-c',
width: 'full',
height: 'tall',
badge: {
type: 'Badge',
label: 'Brand new'
},
actions: [
{
type: 'Button',
Expand Down Expand Up @@ -186,11 +184,6 @@ HeroBottomImage.args = {
width: 'full',
contentWidth: 'small',
textAlign: 'center',
badge: {
type: 'Badge',
label: 'Brand new'
},
title: 'The quick, brown fox jumps over **a lazy dog**',
actions: [
{
type: 'Button',
Expand Down Expand Up @@ -219,7 +212,6 @@ HeroTextOnly.args = {
contentAlignHoriz: 'left',
contentAlignVert: 'bottom',
badge: null,
title: 'The quick, brown fox jumps over **a lazy dog**',
actions: [
{
type: 'Button',
Expand Down Expand Up @@ -256,7 +248,6 @@ HeroRightForm.args = {
colors: 'colors-f',
contentWidth: 'medium',
badge: null,
title: 'The quick, brown fox jumps over **a lazy dog**',
actions: [
{
type: 'Link',
Expand Down
7 changes: 6 additions & 1 deletion src/components/HeroSection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,15 @@ function heroBody(props) {
>
{props.badge && <Badge {...props.badge} className="inline-block mb-4 text-xs" annotationPrefix=".badge" />}
{props.title && (
<h2 className="text-4xl tracking-tight sm:text-5xl mb-6" data-sb-field-path=".title">
<h2 className="component-section-title text-4xl tracking-tight sm:text-5xl mb-6" data-sb-field-path=".title">
<InlineMarkdown>{props.title}</InlineMarkdown>
</h2>
)}
{props.subtitle && (
<p className="text-2xl mb-3" data-sb-field-path=".subtitle">
{props.subtitle}
</p>
)}
{props.text && (
<Markdown options={{ forceBlock: true }} className="md:text-lg" data-sb-field-path=".text">
{props.text}
Expand Down
13 changes: 9 additions & 4 deletions src/components/InlineMarkdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@ import Markdown from 'markdown-to-jsx';

export default function InlineMarkdown(props) {
return (
<Markdown options={{ forceInline: true, overrides }}>
<Markdown options={{ wrapper: React.Fragment, overrides }}>
{props.children}
</Markdown>
);
}

const overrides = {
strong: {
div: {
component: (props) => {
return <span className="sb-highlight">{props.children}</span>;
return props.children;
}
},
p: {
component: (props) => {
return props.children;
}
}
};
};
2 changes: 1 addition & 1 deletion src/components/TestimonialsSection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function testimonialsHeader(props) {
>
{props.badge && <Badge {...props.badge} className="inline-block mb-4 text-xs" annotationPrefix=".badge" />}
{props.title && (
<h2 className="text-3xl tracking-tight sm:text-4xl" data-sb-field-path=".title">
<h2 className="component-section-title text-3xl tracking-tight sm:text-4xl" data-sb-field-path=".title">
<InlineMarkdown>{props.title}</InlineMarkdown>
</h2>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/TextSection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function textSectionBody(props) {
>
{props.badge && <Badge {...props.badge} className="inline-block mb-4 text-xs" annotationPrefix=".badge" />}
{props.title && (
<h2 className="text-3xl tracking-tight sm:text-4xl" data-sb-field-path=".title">
<h2 className="component-section-title text-3xl tracking-tight sm:text-4xl" data-sb-field-path=".title">
<InlineMarkdown>{props.title}</InlineMarkdown>
</h2>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/TextSection/text-section.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const args = {
type: 'Badge',
label: 'Small text'
},
title: 'The Section Title',
title: 'The Section **Title**',
subtitle: 'The section subtitle',
text: 'Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam. Eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Sed ut perspiciatis undeomnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam. Eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.'
};
Expand Down
2 changes: 1 addition & 1 deletion styles/default/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
.sb-divider {
@apply flex items-center h-4 before:flex-grow before:h-px;
}
.sb-highlight {
.component-section-title strong {
@apply text-info;
}
.sb-form-control {
Expand Down