From bc37c7868fc33abf76fc4b215cab5c4986f98160 Mon Sep 17 00:00:00 2001 From: Avinash Date: Thu, 4 Jun 2020 12:44:52 +0530 Subject: [PATCH 1/8] meta tags added for pages --- packages/docs/package.json | 1 + packages/docs/src/components/head.js | 30 +++++++++++++++++++++++ packages/docs/src/components/index.js | 1 + packages/docs/src/components/page.js | 34 +++++++++++++++++---------- yarn.lock | 15 ++++++++++++ 5 files changed, 68 insertions(+), 13 deletions(-) create mode 100644 packages/docs/src/components/head.js diff --git a/packages/docs/package.json b/packages/docs/package.json index 13e4d9d..3b79e72 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -20,6 +20,7 @@ "prismjs": "^1.19.0", "react": "^16.8.9", "react-dom": "^16.8.9", + "react-helmet": "^6.0.0", "react-scripts": "^3.4.0", "react-twitter-embed": "^3.0.3", "react-ui": "1.0.0-beta.26", diff --git a/packages/docs/src/components/head.js b/packages/docs/src/components/head.js new file mode 100644 index 0000000..e64a096 --- /dev/null +++ b/packages/docs/src/components/head.js @@ -0,0 +1,30 @@ +import React from "react"; +import { Helmet } from "react-helmet"; +import PropTypes from 'prop-types'; + +export const Head = ({title, description}) =>{ + return( + + + {title} + + + {/* twitter */} + + + + + + {/* facebook */} + + + + + + ) +} + +Head.propTypes = { + description: PropTypes.string, + title: PropTypes.string, + }; \ No newline at end of file diff --git a/packages/docs/src/components/index.js b/packages/docs/src/components/index.js index c9da0c0..4a218f6 100644 --- a/packages/docs/src/components/index.js +++ b/packages/docs/src/components/index.js @@ -7,3 +7,4 @@ export * from '../components/page' export * from '../components/section' export * from '../components/list' export * from '../components/divider' +export * from '../components/head' diff --git a/packages/docs/src/components/page.js b/packages/docs/src/components/page.js index 7c08e26..db1e2d9 100644 --- a/packages/docs/src/components/page.js +++ b/packages/docs/src/components/page.js @@ -2,19 +2,27 @@ import React from 'react' import { Stack, calc } from 'react-ui' import { Heading, Tagline } from './typography' +import { Head } from './head' -export const Page = ({ title, tagline, badges, ...props }) => ( - - {title ? ( - - - {title} +export const Page = ({ title, tagline, badges, ...props }) => { + debugger + return ( + <> + + + {title ? ( + + + {title} - {badges || null} - - {tagline} + {badges || null} + + {tagline} + + ) : null} + {props.children} - ) : null} - {props.children} - -) + + + ) +} diff --git a/yarn.lock b/yarn.lock index 369f06e..b489657 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13930,6 +13930,16 @@ react-helmet-async@^1.0.2: react-fast-compare "^2.0.4" shallowequal "^1.1.0" +react-helmet@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/react-helmet/-/react-helmet-6.0.0.tgz#fcb93ebaca3ba562a686eb2f1f9d46093d83b5f8" + integrity sha512-My6S4sa0uHN/IuVUn0HFmasW5xj9clTkB9qmMngscVycQ5vVG51Qp44BEvLJ4lixupTwDlU9qX1/sCrMN4AEPg== + dependencies: + object-assign "^4.1.1" + prop-types "^15.7.2" + react-fast-compare "^2.0.4" + react-side-effect "^2.1.0" + react-hotkeys@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/react-hotkeys/-/react-hotkeys-2.0.0.tgz#a7719c7340cbba888b0e9184f806a9ec0ac2c53f" @@ -14096,6 +14106,11 @@ react-scripts@^3.4.0: optionalDependencies: fsevents "2.1.2" +react-side-effect@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/react-side-effect/-/react-side-effect-2.1.0.tgz#1ce4a8b4445168c487ed24dab886421f74d380d3" + integrity sha512-IgmcegOSi5SNX+2Snh1vqmF0Vg/CbkycU9XZbOHJlZ6kMzTmi3yc254oB1WCkgA7OQtIAoLmcSFuHTc/tlcqXg== + react-sizeme@^2.6.7: version "2.6.12" resolved "https://registry.yarnpkg.com/react-sizeme/-/react-sizeme-2.6.12.tgz#ed207be5476f4a85bf364e92042520499455453e" From d10c6da6120e31bc46013b4523ed8aa32c73074a Mon Sep 17 00:00:00 2001 From: Avinash Date: Fri, 5 Jun 2020 09:26:52 +0530 Subject: [PATCH 2/8] removed debugger --- packages/docs/src/components/page.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/docs/src/components/page.js b/packages/docs/src/components/page.js index db1e2d9..f85dd51 100644 --- a/packages/docs/src/components/page.js +++ b/packages/docs/src/components/page.js @@ -5,7 +5,6 @@ import { Heading, Tagline } from './typography' import { Head } from './head' export const Page = ({ title, tagline, badges, ...props }) => { - debugger return ( <> From d78016fc8385dc11da57e17fda3b8e14b0885497 Mon Sep 17 00:00:00 2001 From: Avinash Date: Fri, 26 Jun 2020 18:01:13 +0530 Subject: [PATCH 3/8] og-img added --- packages/docs/src/components/head.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/docs/src/components/head.js b/packages/docs/src/components/head.js index e64a096..4c8717f 100644 --- a/packages/docs/src/components/head.js +++ b/packages/docs/src/components/head.js @@ -14,11 +14,13 @@ export const Head = ({title, description}) =>{ + {/* facebook */} + ) From 042618af61dac587b47b04a2886fb474487d438d Mon Sep 17 00:00:00 2001 From: Avinash Date: Tue, 30 Jun 2020 10:14:19 +0530 Subject: [PATCH 4/8] site name fixed --- packages/docs/src/components/head.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docs/src/components/head.js b/packages/docs/src/components/head.js index 4c8717f..569cec3 100644 --- a/packages/docs/src/components/head.js +++ b/packages/docs/src/components/head.js @@ -11,7 +11,7 @@ export const Head = ({title, description}) =>{ {/* twitter */} - + From c56727f973997c7a8d191a36ce60bc75712ac249 Mon Sep 17 00:00:00 2001 From: Avinash Date: Tue, 30 Jun 2020 10:25:02 +0530 Subject: [PATCH 5/8] twitter img alternate added --- packages/docs/src/components/head.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/docs/src/components/head.js b/packages/docs/src/components/head.js index 569cec3..bcc7dd0 100644 --- a/packages/docs/src/components/head.js +++ b/packages/docs/src/components/head.js @@ -15,6 +15,7 @@ export const Head = ({title, description}) =>{ + {/* facebook */} From 39690acbb9b4ff43f93b0c4107377ba3c7ebb4d1 Mon Sep 17 00:00:00 2001 From: Avinash Date: Tue, 30 Jun 2020 11:18:22 +0530 Subject: [PATCH 6/8] compressed card:img hosted it on imgbb --- packages/docs/src/components/head.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/docs/src/components/head.js b/packages/docs/src/components/head.js index bcc7dd0..e27e75f 100644 --- a/packages/docs/src/components/head.js +++ b/packages/docs/src/components/head.js @@ -14,14 +14,14 @@ export const Head = ({title, description}) =>{ - + {/* facebook */} - + ) From 738d8ab7e8724cc93b993e6d83752d31637c7a1f Mon Sep 17 00:00:00 2001 From: Avinash Date: Tue, 30 Jun 2020 11:33:38 +0530 Subject: [PATCH 7/8] default props added --- packages/docs/src/components/head.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docs/src/components/head.js b/packages/docs/src/components/head.js index e27e75f..1607173 100644 --- a/packages/docs/src/components/head.js +++ b/packages/docs/src/components/head.js @@ -2,7 +2,7 @@ import React from "react"; import { Helmet } from "react-helmet"; import PropTypes from 'prop-types'; -export const Head = ({title, description}) =>{ +export const Head = ({title='React-UI', description='React UI comes with a set of components that are accessible, responsive and customisable.'}) =>{ return( From 551d3c2cded637116a2f96fa96c6c530126c6630 Mon Sep 17 00:00:00 2001 From: Avinash Date: Tue, 30 Jun 2020 11:50:11 +0530 Subject: [PATCH 8/8] content changed --- packages/docs/src/components/head.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docs/src/components/head.js b/packages/docs/src/components/head.js index 1607173..c88acd8 100644 --- a/packages/docs/src/components/head.js +++ b/packages/docs/src/components/head.js @@ -10,7 +10,7 @@ export const Head = ({title='React-UI', description='React UI comes with a set o {/* twitter */} - +