From 0e57a84adfb1f0c163f4a57c5edbbe93c6225d8d Mon Sep 17 00:00:00 2001 From: Yangshun Date: Thu, 3 Feb 2022 14:35:09 +0800 Subject: [PATCH] website: add social links to docs pages --- contents/coding-signals.md | 1 + website/docusaurus.config.js | 12 ++++----- website/src/css/custom.css | 12 ++++++++- website/src/theme/PaginatorNavLink/index.js | 1 - website/src/theme/TOC/index.js | 28 +++++++++++++++++++++ website/src/theme/TOC/styles.module.css | 13 ++++++++++ website/static/img/icons8-facebook.svg | 2 +- website/static/img/icons8-github.svg | 2 +- website/static/img/icons8-telegram.svg | 2 +- website/static/img/icons8-twitter.svg | 2 +- 10 files changed, 63 insertions(+), 12 deletions(-) diff --git a/contents/coding-signals.md b/contents/coding-signals.md index 65f6a8fd..629457ec 100644 --- a/contents/coding-signals.md +++ b/contents/coding-signals.md @@ -2,6 +2,7 @@ id: coding-signals title: Coding interview signals keywords: [algorithm, coding, interview, signals, behavior] +toc_max_heading_level: 2 --- diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 6d02545d..7c45ce63 100755 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -49,18 +49,18 @@ module.exports = { className: 'navbar-icon navbar-icon-telegram', 'aria-label': 'Telegram channel', }, - { - href: 'https://www.facebook.com/techinterviewhandbook', - position: 'right', - className: 'navbar-icon navbar-icon-facebook', - 'aria-label': 'Facebook page', - }, { href: 'https://twitter.com/techinterviewhb', position: 'right', className: 'navbar-icon navbar-icon-twitter', 'aria-label': 'Twitter page', }, + { + href: 'https://www.facebook.com/techinterviewhandbook', + position: 'right', + className: 'navbar-icon navbar-icon-facebook', + 'aria-label': 'Facebook page', + }, ], }, footer: { diff --git a/website/src/css/custom.css b/website/src/css/custom.css index f200f5f1..aac2fc2a 100755 --- a/website/src/css/custom.css +++ b/website/src/css/custom.css @@ -22,6 +22,8 @@ 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; --ifm-font-size-base: 16px; + + --ifm-footer-padding-vertical: 3rem; } html[data-theme='dark'] { @@ -34,6 +36,14 @@ html[data-theme='dark'] { --ifm-color-primary-lightest: rgb(191, 191, 248); } +.footer__links { + margin-bottom: 3rem; +} + +.footer__copyright { + text-align: start; +} + .markdown h1 { margin-top: 1rem; } @@ -98,7 +108,7 @@ div[class^='announcementBar_'] { } .navbar-icon:hover { - opacity: 0.6; + opacity: 0.8; } .navbar-icon-github:before { diff --git a/website/src/theme/PaginatorNavLink/index.js b/website/src/theme/PaginatorNavLink/index.js index b5c3ea63..1ec231a4 100644 --- a/website/src/theme/PaginatorNavLink/index.js +++ b/website/src/theme/PaginatorNavLink/index.js @@ -3,7 +3,6 @@ import clsx from 'clsx'; import styles from './styles.module.css'; function PaginatorNavLink({hasArrow, permalink, title, subLabel, ...rest}) { - console.log(rest); return ( {subLabel &&
{subLabel}
} diff --git a/website/src/theme/TOC/index.js b/website/src/theme/TOC/index.js index 801e6ac0..ef136030 100644 --- a/website/src/theme/TOC/index.js +++ b/website/src/theme/TOC/index.js @@ -25,6 +25,34 @@ function TOC({className, ...props}) { linkClassName={LINK_CLASS_NAME} linkActiveClassName={LINK_ACTIVE_CLASS_NAME} /> +
+
+
+ Follow us + + + +
+
+
); } diff --git a/website/src/theme/TOC/styles.module.css b/website/src/theme/TOC/styles.module.css index 4b6d2bcc..3930e0d6 100644 --- a/website/src/theme/TOC/styles.module.css +++ b/website/src/theme/TOC/styles.module.css @@ -21,3 +21,16 @@ padding: 0 0.3rem; } } + +.socialLinksContainer { + background-color: var(--ifm-color-emphasis-100); + border-radius: var(--ifm-global-radius); +} + +.socialLinks { + align-items: center; + display: flex; + font-size: 0.9rem; + justify-content: center; + gap: 1rem; +} diff --git a/website/static/img/icons8-facebook.svg b/website/static/img/icons8-facebook.svg index 445765cb..5b472a93 100644 --- a/website/static/img/icons8-facebook.svg +++ b/website/static/img/icons8-facebook.svg @@ -1 +1 @@ - + diff --git a/website/static/img/icons8-github.svg b/website/static/img/icons8-github.svg index 856970fa..d198f327 100644 --- a/website/static/img/icons8-github.svg +++ b/website/static/img/icons8-github.svg @@ -1 +1 @@ - + diff --git a/website/static/img/icons8-telegram.svg b/website/static/img/icons8-telegram.svg index c5dcc7ba..1c595b00 100644 --- a/website/static/img/icons8-telegram.svg +++ b/website/static/img/icons8-telegram.svg @@ -1 +1 @@ - + diff --git a/website/static/img/icons8-twitter.svg b/website/static/img/icons8-twitter.svg index 858b14e6..8698c876 100644 --- a/website/static/img/icons8-twitter.svg +++ b/website/static/img/icons8-twitter.svg @@ -1 +1 @@ - +