From efb8e69c91b31bbcc959536038a9b0ed30984d1c Mon Sep 17 00:00:00 2001 From: Phuoc Nguyen Date: Tue, 26 Nov 2019 23:33:52 +0700 Subject: [PATCH] react-snap can't export correct font family --- README.md | 3 ++- client/Home.tsx | 1 - client/index.css | 4 +++- client/layouts/Footer.tsx | 6 ++++++ client/layouts/Layout.tsx | 9 ++++++++- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1cb2117..c172850 100644 --- a/README.md +++ b/README.md @@ -28,12 +28,13 @@ The entire website is powered by ~~~ javascript this .madeWith([react,typescript]) + .then(r => lint(tslint)) .then(r => lazyLoad(@loadable/component)) .then(r => optimizeAndBundle(webpack)) .then(r => exportHtml(react-snap)) .then(r => deploy(Netlify)) .assert([scalableCode, superFastWebsite, seoFriendly]) - .done(/* Give me 1 star */) 🎉 + .finally(/* Give me 1 star */) 🎉 ~~~ ## Running it on local diff --git a/client/Home.tsx b/client/Home.tsx index 2935c1d..042a2b1 100644 --- a/client/Home.tsx +++ b/client/Home.tsx @@ -60,7 +60,6 @@ const Home = () => { style={{ alignItems: 'center', display: 'flex', - fontFamily: '\'Source Code Pro\'', fontSize: '16px', justifyContent: 'center', lineHeight: 1.5, diff --git a/client/index.css b/client/index.css index 140749e..88b06da 100644 --- a/client/index.css +++ b/client/index.css @@ -1,7 +1,9 @@ body { -webkit-font-smoothing: antialiased; } -code { +.hljs, code { font-family: 'Source Code Pro', monospace; +} +code { font-size: 14px; } diff --git a/client/layouts/Footer.tsx b/client/layouts/Footer.tsx index 2d3f683..6678707 100644 --- a/client/layouts/Footer.tsx +++ b/client/layouts/Footer.tsx @@ -47,6 +47,12 @@ const Footer: React.FC<{}> = () => { {