Skip to content

Commit 3520913

Browse files
committed
Merge branches
2 parents 9924ff5 + c19d833 commit 3520913

File tree

9 files changed

+64
-7
lines changed

9 files changed

+64
-7
lines changed

example/.env.development

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
DISQUS_SHORTNAME=
2-
FORM_URL=http://localhost:3000/api/project/5e81b8923d8c2d64d8549add/forms
2+
FORM_URL=http://localhost:3000/api/project/5e81b8923d8c2d64d8549add/forms
3+
GATSBY_FB_APP_ID=

example/.env.production

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
DISQUS_SHORTNAME=
2-
FORM_URL=http://localhost:3000/api/project/5e81b8923d8c2d64d8549add/forms
2+
FORM_URL=http://localhost:3000/api/project/5e81b8923d8c2d64d8549add/forms
3+
FB_APP_ID=

example/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"disqus-react": "^1.0.8",
1515
"gatsby": "2.20.24",
1616
"react": "^16.13.0",
17-
"react-dom": "^16.13.0"
17+
"react-dom": "^16.13.0",
18+
"react-facebook": "^8.1.4"
1819
}
1920
}

example/src/@draftbox-co/gatsby-wordpress-theme-libre/components/disqus.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import { DiscussionEmbed } from "disqus-react";
33

44
const Disqus = props => {
55
const disqusConfig = {
6-
shortname: process.env.DISQUS_SHORTNAME,
6+
shortname: process.env.GATSBY_DISQUS_SHORTNAME,
77
identifier: props.slug,
88
title: props.slug
99
};
1010

11-
return process.env.DISQUS_SHORTNAME ? (
11+
return process.env.GATSBY_DISQUS_SHORTNAME ? (
1212
<DiscussionEmbed {...disqusConfig} />
1313
) : (
1414
<></>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React from "react";
2+
import { FacebookProvider, Comments } from 'react-facebook';
3+
4+
const FbComments = props => {
5+
return process.env.GATSBY_FB_APP_ID ? (
6+
<FacebookProvider appId={process.env.GATSBY_FB_APP_ID}>
7+
<Comments href={props.href}/>
8+
</FacebookProvider>
9+
) : (
10+
<></>
11+
);
12+
};
13+
14+
export default FbComments;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const FbComments = () => {
2+
return <></>;
3+
};
4+
5+
export default FbComments;

gatsby-wordpress-theme-libre/src/styles/global.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2259,3 +2259,4 @@ object {
22592259
.icon-instagram:before {
22602260
content: "\f16d";
22612261
} /* '' */
2262+
.fb-comments iframe { width: 100% !important; }

gatsby-wordpress-theme-libre/src/templates/post.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Footer from "../components/footer";
66
import ArticleMeta from "../components/meta/article-meta";
77
import SubscribeForm from "../components/subscribe-form";
88
import Disqus from "../components/disqus";
9+
import FbComments from "../components/fb-comments";
910
import facebookShare from "../images/facebook-share.svg";
1011
import twitterShare from "../images/twitter-share.svg";
1112
import linkedInShare from "../images/linkedin.svg";
@@ -272,6 +273,7 @@ const Post = ({ data, location }) => {
272273
</article>
273274

274275
<Disqus />
276+
<FbComments href={href} />
275277
<SubscribeForm />
276278
</main>
277279
</div>

yarn.lock

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,6 +1738,11 @@
17381738
resolved "https://registry.yarnpkg.com/@types/debug/-/debug-0.0.30.tgz#dc1e40f7af3b9c815013a7860e6252f6352a84df"
17391739
integrity sha512-orGL5LXERPYsLov6CWs3Fh6203+dXzJkR7OnddIr2514Hsecwc8xRpzCapshBbKFImCsvS/mk6+FWiN5LyZJAQ==
17401740

1741+
"@types/eslint-visitor-keys@^1.0.0":
1742+
version "1.0.0"
1743+
resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d"
1744+
integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==
1745+
17411746
"@types/events@*":
17421747
version "3.0.0"
17431748
resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7"
@@ -3347,6 +3352,11 @@ camelcase@^5.0.0, camelcase@^5.3.1:
33473352
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
33483353
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
33493354

3355+
can-use-dom@^0.1.0:
3356+
version "0.1.0"
3357+
resolved "https://registry.yarnpkg.com/can-use-dom/-/can-use-dom-0.1.0.tgz#22cc4a34a0abc43950f42c6411024a3f6366b45a"
3358+
integrity sha1-IsxKNKCrxDlQ9CxkEQJKP2NmtFo=
3359+
33503360
caniuse-api@^3.0.0:
33513361
version "3.0.0"
33523362
resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-3.0.0.tgz#5e4d90e2274961d46291997df599e3ed008ee4c0"
@@ -11117,7 +11127,7 @@ prompts@^2.3.2:
1111711127
kleur "^3.0.3"
1111811128
sisteransi "^1.0.4"
1111911129

11120-
prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:
11130+
prop-types@^15.5.10, prop-types@^15.5.4, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:
1112111131
version "15.7.2"
1112211132
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
1112311133
integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==
@@ -11405,6 +11415,15 @@ react-error-overlay@^6.0.3:
1140511415
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.6.tgz#ac4d9dc4c1b5c536c2c312bf66aa2b09bfa384e2"
1140611416
integrity sha512-Yzpno3enVzSrSCnnljmr4b/2KUQSMZaPuqmS26t9k4nW7uwJk6STWmH9heNjPuvqUTO3jOSPkHoKgO4+Dw7uIw==
1140711417

11418+
react-facebook@^8.1.4:
11419+
version "8.1.4"
11420+
resolved "https://registry.yarnpkg.com/react-facebook/-/react-facebook-8.1.4.tgz#77703557594be4ef188e33c42a4b2aa9aa9d048c"
11421+
integrity sha512-OVV9+h8jR4Us94ymHyrKpf33WqPX4+3vJvCFEV6ynaW80TC6rucYouQtRSv7G3oW+Tb+qAx8z8DZPYJfIVRW+A==
11422+
dependencies:
11423+
"@babel/runtime" "^7.7.2"
11424+
can-use-dom "^0.1.0"
11425+
react-spinner-children "^1.0.8"
11426+
1140811427
react-fast-compare@^2.0.2:
1140911428
version "2.0.4"
1141011429
resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-2.0.4.tgz#e84b4d455b0fec113e0402c329352715196f81f9"
@@ -11471,6 +11490,14 @@ react-side-effect@^1.1.0:
1147111490
dependencies:
1147211491
shallowequal "^1.0.1"
1147311492

11493+
react-spinner-children@^1.0.8:
11494+
version "1.0.8"
11495+
resolved "https://registry.yarnpkg.com/react-spinner-children/-/react-spinner-children-1.0.8.tgz#6fdd6a89593c5f233bb56f4deccb812382e6ca74"
11496+
integrity sha1-b91qiVk8XyM7tW9N7MuBI4LmynQ=
11497+
dependencies:
11498+
prop-types "^15.6.0"
11499+
spin.js "^2.3.2"
11500+
1147411501
react@^16.13.0, react@^16.8.0:
1147511502
version "16.13.0"
1147611503
resolved "https://registry.yarnpkg.com/react/-/react-16.13.0.tgz#d046eabcdf64e457bbeed1e792e235e1b9934cf7"
@@ -12291,7 +12318,7 @@ shallowequal@^1.0.1, shallowequal@^1.1.0:
1229112318
resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8"
1229212319
integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==
1229312320

12294-
sharp@0.23.4, sharp@^0.23.4:
12321+
sharp@^0.23.4:
1229512322
version "0.23.4"
1229612323
resolved "https://registry.yarnpkg.com/sharp/-/sharp-0.23.4.tgz#ca36067cb6ff7067fa6c77b01651cb9a890f8eb3"
1229712324
integrity sha512-fJMagt6cT0UDy9XCsgyLi0eiwWWhQRxbwGmqQT6sY8Av4s0SVsT/deg8fobBQCTDU5iXRgz0rAeXoE2LBZ8g+Q==
@@ -12683,6 +12710,11 @@ spdy@^4.0.1:
1268312710
select-hose "^2.0.0"
1268412711
spdy-transport "^3.0.0"
1268512712

12713+
spin.js@^2.3.2:
12714+
version "2.3.2"
12715+
resolved "https://registry.yarnpkg.com/spin.js/-/spin.js-2.3.2.tgz#6caa56d520673450fd5cfbc6971e6d0772c37a1a"
12716+
integrity sha1-bKpW1SBnNFD9XPvGlx5tB3LDeho=
12717+
1268612718
split-string@^3.0.1, split-string@^3.0.2:
1268712719
version "3.1.0"
1268812720
resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2"

0 commit comments

Comments
 (0)