-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reapply Prettier formatting to merged files
- Loading branch information
Showing
25 changed files
with
652 additions
and
628 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,58 @@ | ||
import React from 'react'; | ||
import { Helmet } from 'react-helmet'; | ||
|
||
const Metadata = (props) => { | ||
const Metadata = props => { | ||
return ( | ||
<Helmet> | ||
{!props.title ? <title>Dancing Goat</title> : <title>{props.title.value.trim()}</title>} | ||
{!props.description ? null : <meta name="description" content={props.description.value.trim()} />} | ||
{!props.title ? ( | ||
<title>Dancing Goat</title> | ||
) : ( | ||
<title>{props.title.value.trim()}</title> | ||
)} | ||
{!props.description ? null : ( | ||
<meta name="description" content={props.description.value.trim()} /> | ||
)} | ||
|
||
{!props.ogTitle ? null : <meta property="og:title" content={props.ogTitle.value.trim()} />} | ||
{!props.ogTitle ? null : ( | ||
<meta property="og:title" content={props.ogTitle.value.trim()} /> | ||
)} | ||
{!props.ogTitle ? null : <meta property="og:type" content="website" />} | ||
{!props.ogTitle ? null : <meta property="og:url" content={window.location.href} />} | ||
{!props.ogImage ? null : <meta property="og:image" content={props.ogImage.value[0].url} />} | ||
{!props.ogDescription ? null : <meta property="og:description" content={props.ogDescription.value} />} | ||
{!props.ogTitle ? null : ( | ||
<meta property="og:url" content={window.location.href} /> | ||
)} | ||
{!props.ogImage ? null : ( | ||
<meta property="og:image" content={props.ogImage.value[0].url} /> | ||
)} | ||
{!props.ogDescription ? null : ( | ||
<meta property="og:description" content={props.ogDescription.value} /> | ||
)} | ||
|
||
{!props.twitterTitle ? null : <meta name="twitter:title" content={props.twitterTitle.value.trim()} />} | ||
{!props.twitterTitle ? null : <meta name="twitter:card" content="summary_large_image" />} | ||
{!props.twitterSite ? null : <meta name="twitter:site" content={props.twitterSite.value.trim()} />} | ||
{!props.twitterCreator ? null : <meta name="twitter:creator" content={props.twitterCreator.value.trim()} />} | ||
{!props.twitterDescription ? null : <meta name="twitter:description" content={props.twitterDescription.value.trim()} />} | ||
{!props.twitterImage ? null : <meta name="twitter:image" content={props.twitterImage.value[0].url} />} | ||
{!props.twitterTitle ? null : ( | ||
<meta name="twitter:title" content={props.twitterTitle.value.trim()} /> | ||
)} | ||
{!props.twitterTitle ? null : ( | ||
<meta name="twitter:card" content="summary_large_image" /> | ||
)} | ||
{!props.twitterSite ? null : ( | ||
<meta name="twitter:site" content={props.twitterSite.value.trim()} /> | ||
)} | ||
{!props.twitterCreator ? null : ( | ||
<meta | ||
name="twitter:creator" | ||
content={props.twitterCreator.value.trim()} | ||
/> | ||
)} | ||
{!props.twitterDescription ? null : ( | ||
<meta | ||
name="twitter:description" | ||
content={props.twitterDescription.value.trim()} | ||
/> | ||
)} | ||
{!props.twitterImage ? null : ( | ||
<meta name="twitter:image" content={props.twitterImage.value[0].url} /> | ||
)} | ||
</Helmet> | ||
); | ||
} | ||
}; | ||
|
||
export default Metadata; | ||
export default Metadata; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,58 @@ | ||
|
||
import { ContentItem } from 'kentico-cloud-delivery'; | ||
import { resolveContentLink } from '../Utilities/ContentLinks'; | ||
|
||
export class Accessory extends ContentItem { | ||
constructor() { | ||
super({ | ||
propertyResolver: ((fieldName) => { | ||
if (fieldName === 'metadata__og_description') { | ||
return 'metadataOgDescription'; | ||
} | ||
if (fieldName === 'metadata__meta_title') { | ||
return 'metadataMetaTitle'; | ||
} | ||
if (fieldName === 'metadata__og_title') { | ||
return 'metadataOgTitle'; | ||
} | ||
if (fieldName === 'long_description') { | ||
return 'longDescription'; | ||
} | ||
if (fieldName === 'metadata__meta_description') { | ||
return 'metadataMetaDescription'; | ||
} | ||
if (fieldName === 'metadata__twitter_site') { | ||
return 'metadataTwitterSite'; | ||
} | ||
if (fieldName === 'metadata__twitter_image') { | ||
return 'metadataTwitterImage'; | ||
} | ||
if (fieldName === 'metadata__twitter_creator') { | ||
return 'metadataTwitterCreator'; | ||
} | ||
if (fieldName === 'url_pattern') { | ||
return 'urlPattern'; | ||
} | ||
if (fieldName === 'short_description') { | ||
return 'shortDescription'; | ||
} | ||
if (fieldName === 'metadata__twitter_title') { | ||
return 'metadataTwitterTitle'; | ||
} | ||
if (fieldName === 'metadata__twitter_description') { | ||
return 'metadataTwitterDescription'; | ||
} | ||
if (fieldName === 'metadata__og_image') { | ||
return 'metadataOgImage'; | ||
} | ||
if (fieldName === 'product_status') { | ||
return 'productStatus'; | ||
} | ||
if (fieldName === 'product_name') { | ||
return 'productName'; | ||
} | ||
return fieldName; | ||
}), | ||
linkResolver: (link) => resolveContentLink(link) | ||
}); | ||
} | ||
} | ||
constructor() { | ||
super({ | ||
propertyResolver: fieldName => { | ||
if (fieldName === 'metadata__og_description') { | ||
return 'metadataOgDescription'; | ||
} | ||
if (fieldName === 'metadata__meta_title') { | ||
return 'metadataMetaTitle'; | ||
} | ||
if (fieldName === 'metadata__og_title') { | ||
return 'metadataOgTitle'; | ||
} | ||
if (fieldName === 'long_description') { | ||
return 'longDescription'; | ||
} | ||
if (fieldName === 'metadata__meta_description') { | ||
return 'metadataMetaDescription'; | ||
} | ||
if (fieldName === 'metadata__twitter_site') { | ||
return 'metadataTwitterSite'; | ||
} | ||
if (fieldName === 'metadata__twitter_image') { | ||
return 'metadataTwitterImage'; | ||
} | ||
if (fieldName === 'metadata__twitter_creator') { | ||
return 'metadataTwitterCreator'; | ||
} | ||
if (fieldName === 'url_pattern') { | ||
return 'urlPattern'; | ||
} | ||
if (fieldName === 'short_description') { | ||
return 'shortDescription'; | ||
} | ||
if (fieldName === 'metadata__twitter_title') { | ||
return 'metadataTwitterTitle'; | ||
} | ||
if (fieldName === 'metadata__twitter_description') { | ||
return 'metadataTwitterDescription'; | ||
} | ||
if (fieldName === 'metadata__og_image') { | ||
return 'metadataOgImage'; | ||
} | ||
if (fieldName === 'product_status') { | ||
return 'productStatus'; | ||
} | ||
if (fieldName === 'product_name') { | ||
return 'productName'; | ||
} | ||
return fieldName; | ||
}, | ||
linkResolver: link => resolveContentLink(link) | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,64 @@ | ||
|
||
import { ContentItem } from 'kentico-cloud-delivery'; | ||
import { resolveContentLink } from '../Utilities/ContentLinks'; | ||
|
||
export class Article extends ContentItem { | ||
constructor() { | ||
super({ | ||
propertyResolver: ((fieldName) => { | ||
if (fieldName === 'metadata__og_description') { | ||
return 'metadataOgDescription'; | ||
} | ||
if (fieldName === 'metadata__meta_title') { | ||
return 'metadataMetaTitle'; | ||
} | ||
if (fieldName === 'body_copy') { | ||
return 'bodyCopy'; | ||
} | ||
if (fieldName === 'metadata__og_title') { | ||
return 'metadataOgTitle'; | ||
} | ||
if (fieldName === 'metadata__meta_description') { | ||
return 'metadataMetaDescription'; | ||
} | ||
if (fieldName === 'metadata__twitter_site') { | ||
return 'metadataTwitterSite'; | ||
} | ||
if (fieldName === 'post_date') { | ||
return 'postDate'; | ||
} | ||
if (fieldName === 'meta_keywords') { | ||
return 'metaKeywords'; | ||
} | ||
if (fieldName === 'teaser_image') { | ||
return 'teaserImage'; | ||
} | ||
if (fieldName === 'metadata__twitter_image') { | ||
return 'metadataTwitterImage'; | ||
} | ||
if (fieldName === 'metadata__twitter_creator') { | ||
return 'metadataTwitterCreator'; | ||
} | ||
if (fieldName === 'metadata__twitter_title') { | ||
return 'metadataTwitterTitle'; | ||
} | ||
if (fieldName === 'metadata__twitter_description') { | ||
return 'metadataTwitterDescription'; | ||
} | ||
if (fieldName === 'meta_description') { | ||
return 'metaDescription'; | ||
} | ||
if (fieldName === 'metadata__og_image') { | ||
return 'metadataOgImage'; | ||
} | ||
if (fieldName === 'related_articles') { | ||
return 'relatedArticles'; | ||
} | ||
if (fieldName === 'url_pattern') { | ||
return 'urlPattern'; | ||
} | ||
return fieldName; | ||
}), | ||
linkResolver: (link) => resolveContentLink(link) | ||
}); | ||
} | ||
constructor() { | ||
super({ | ||
propertyResolver: fieldName => { | ||
if (fieldName === 'metadata__og_description') { | ||
return 'metadataOgDescription'; | ||
} | ||
if (fieldName === 'metadata__meta_title') { | ||
return 'metadataMetaTitle'; | ||
} | ||
if (fieldName === 'body_copy') { | ||
return 'bodyCopy'; | ||
} | ||
if (fieldName === 'metadata__og_title') { | ||
return 'metadataOgTitle'; | ||
} | ||
if (fieldName === 'metadata__meta_description') { | ||
return 'metadataMetaDescription'; | ||
} | ||
if (fieldName === 'metadata__twitter_site') { | ||
return 'metadataTwitterSite'; | ||
} | ||
if (fieldName === 'post_date') { | ||
return 'postDate'; | ||
} | ||
if (fieldName === 'meta_keywords') { | ||
return 'metaKeywords'; | ||
} | ||
if (fieldName === 'teaser_image') { | ||
return 'teaserImage'; | ||
} | ||
if (fieldName === 'metadata__twitter_image') { | ||
return 'metadataTwitterImage'; | ||
} | ||
if (fieldName === 'metadata__twitter_creator') { | ||
return 'metadataTwitterCreator'; | ||
} | ||
if (fieldName === 'metadata__twitter_title') { | ||
return 'metadataTwitterTitle'; | ||
} | ||
if (fieldName === 'metadata__twitter_description') { | ||
return 'metadataTwitterDescription'; | ||
} | ||
if (fieldName === 'meta_description') { | ||
return 'metaDescription'; | ||
} | ||
if (fieldName === 'metadata__og_image') { | ||
return 'metadataOgImage'; | ||
} | ||
if (fieldName === 'related_articles') { | ||
return 'relatedArticles'; | ||
} | ||
if (fieldName === 'url_pattern') { | ||
return 'urlPattern'; | ||
} | ||
return fieldName; | ||
}, | ||
linkResolver: link => resolveContentLink(link) | ||
}); | ||
} | ||
} |
Oops, something went wrong.