From 58836d3ab2863e5419c8f9bee8f4393f6e1dd39d Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Thu, 1 Feb 2024 15:10:30 +0900 Subject: [PATCH] docs: show links to other sidebars when the navbar is collapsed (#6096) This change adds links to Unleash Academy from the docs sidebar and vice versa when the nav bar is collapsed (on narrow screens). --- website/sidebars.js | 12 ++++++++++++ website/src/css/custom.css | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/website/sidebars.js b/website/sidebars.js index ccc22319bc..1444e8728b 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -29,6 +29,12 @@ module.exports = { 'unleash-academy/managing-unleash-for-devops', ], }, + { + type: 'ref', + id:'welcome', + label: 'Docs', + className: 'show-when-collapsed', + } ], documentation: [ 'welcome', @@ -488,5 +494,11 @@ module.exports = { }, ], }, + { + type: 'ref', + id:'unleash-academy/introduction', + label: 'Unleash Academy', + className: 'show-when-collapsed', + } ], }; diff --git a/website/src/css/custom.css b/website/src/css/custom.css index b031103840..b858c036ba 100644 --- a/website/src/css/custom.css +++ b/website/src/css/custom.css @@ -58,6 +58,12 @@ } } +@media (min-width: 997px) { + .show-when-collapsed { + display: none; + } +} + footer { --ifm-footer-link-hover-color: var(--ifm-footer-link-color); }