From 5c2c85acdcd93773bcc8abf246a8ce6da26dab63 Mon Sep 17 00:00:00 2001 From: Harel M Date: Tue, 16 Apr 2024 07:11:08 +0000 Subject: [PATCH 1/3] An attempt to fixissue with navigation links on mobile --- src/lib/output/themes/default/partials/navigation.tsx | 7 ++++++- static/style.css | 9 +++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/lib/output/themes/default/partials/navigation.tsx b/src/lib/output/themes/default/partials/navigation.tsx index 6622fa70d..423da1252 100644 --- a/src/lib/output/themes/default/partials/navigation.tsx +++ b/src/lib/output/themes/default/partials/navigation.tsx @@ -27,12 +27,17 @@ function buildFilterItem(context: DefaultThemeRenderContext, name: string, displ export function sidebarLinks(context: DefaultThemeRenderContext) { const links = Object.entries(context.options.getValue("sidebarLinks")); - if (!links.length) return null; + const navLinks = Object.entries(context.options.getValue("navigationLinks")); + + if (!links.length && !navLinks.length) return null; return ( ); } diff --git a/static/style.css b/static/style.css index b1ef2fb7d..e0207cefa 100644 --- a/static/style.css +++ b/static/style.css @@ -762,6 +762,9 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { padding: 0; max-width: 100%; } +.tsd-navigation .tsd-nav-link { + display: none; +} .tsd-nested-navigation { margin-left: 3rem; } @@ -1340,6 +1343,12 @@ img { .has-menu .tsd-navigation { max-height: 100%; } + .tsd-toolbar-contents .tsd-toolbar-links { + display: none; + } + .tsd-navigation .tsd-nav-link { + display: unset; + } } /* one sidebar */ From 2ada569acfe77403323632dd52928505b7059882 Mon Sep 17 00:00:00 2001 From: Harel M Date: Tue, 16 Apr 2024 07:34:54 +0000 Subject: [PATCH 2/3] Fix lint --- src/lib/output/themes/default/partials/navigation.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/output/themes/default/partials/navigation.tsx b/src/lib/output/themes/default/partials/navigation.tsx index 423da1252..7ae6968ad 100644 --- a/src/lib/output/themes/default/partials/navigation.tsx +++ b/src/lib/output/themes/default/partials/navigation.tsx @@ -36,7 +36,9 @@ export function sidebarLinks(context: DefaultThemeRenderContext) { {label} ))} {navLinks.map(([label, url]) => ( - {label} + + {label} + ))} ); From bbb2a506e5eb4a73d66faafed743444f98bf07ea Mon Sep 17 00:00:00 2001 From: Harel M Date: Tue, 16 Apr 2024 08:12:03 +0000 Subject: [PATCH 3/3] Fix incorrect css --- static/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/style.css b/static/style.css index e0207cefa..da5e73a66 100644 --- a/static/style.css +++ b/static/style.css @@ -1343,11 +1343,11 @@ img { .has-menu .tsd-navigation { max-height: 100%; } - .tsd-toolbar-contents .tsd-toolbar-links { + #tsd-toolbar-links { display: none; } .tsd-navigation .tsd-nav-link { - display: unset; + display: flex; } }