From ad8cc45251537f92e63344b123d6fa399456b152 Mon Sep 17 00:00:00 2001 From: Yangshun Date: Wed, 16 Mar 2022 13:37:31 +0800 Subject: [PATCH] website: add Carbon to homepage --- website/docusaurus.config.js | 2 +- website/src/components/CarbonAd/index.js | 51 ++++++++++++++++++++++++ website/src/pages/index.js | 22 ++++++++-- website/src/theme/DocItem/index.js | 14 +------ 4 files changed, 72 insertions(+), 17 deletions(-) create mode 100644 website/src/components/CarbonAd/index.js diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 106ba614..6bf80cbc 100755 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -40,7 +40,7 @@ module.exports = { href: '/algorithms/introduction', }, {label: 'Blog', to: 'blog', position: 'left'}, - {label: 'Advertise', to: '/advertise', position: 'left'}, + // {label: 'Advertise', to: '/advertise', position: 'left'}, { href: 'https://github.com/yangshun/tech-interview-handbook', position: 'right', diff --git a/website/src/components/CarbonAd/index.js b/website/src/components/CarbonAd/index.js new file mode 100644 index 00000000..2801eed6 --- /dev/null +++ b/website/src/components/CarbonAd/index.js @@ -0,0 +1,51 @@ +import React from 'react'; + +export default React.memo(() => { + return ( +
+