Skip to content

Commit

Permalink
Merge pull request #86 from golemfactory/fix-navigation-menus
Browse files Browse the repository at this point in the history
Fix missing sidebars due to broken if statement
  • Loading branch information
cryptobench authored Sep 19, 2023
2 parents 063b3d0 + 52d5731 commit 1fc449f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions src/components/ArticleType.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { GuideIcon } from './icons/GuideIcon'

export function ArticleType({ type, children }) {
if (type.toLowerCase() === 'design') return null
if (type.toLowerCase() === 'noicon') return null

return (
<div className="inline-flex items-center gap-x-2 rounded-2xl bg-lightbluedarker px-1.5 py-1 font-medium">
Expand Down
19 changes: 10 additions & 9 deletions src/components/Layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ export function Layout({
return section.id === currentSection
}

console.log(type)

return (
<>
<VersionSwitcher />
Expand All @@ -229,18 +231,18 @@ export function Layout({
{isHomePage && <Hero />}

<div className="relative mx-auto flex max-w-8xl justify-center ">
{!isHomePage ||
!is404Page ||
(!is500Page && (
{type !== 'design' &&
(!isHomePage || !is404Page || !is500Page ? (
<div className="hidden lg:relative lg:block lg:flex-none">
<div className="absolute inset-y-0 right-0 w-[50vw] bg-lightblue dark:hidden" />
<div className="absolute bottom-0 right-0 top-16 hidden h-12 w-px bg-gradient-to-t from-slate-800 dark:block" />
<div className="absolute bottom-0 right-0 top-28 hidden w-px bg-slate-800 dark:block" />
<div className="sticky top-[4.5rem] -ml-0.5 h-[calc(100vh-4.5rem)] w-64 overflow-y-auto overflow-x-hidden py-16 pl-0.5 pr-8 xl:w-64 ">
<div className="sticky top-[4.5rem] -ml-0.5 h-[calc(100vh-4.5rem)] w-64 overflow-y-auto overflow-x-hidden py-16 pl-0.5 pr-8 xl:w-64">
<SideBar navigation={mergednavs} />
</div>
</div>
))}
) : null)}

<div className="min-w-0 max-w-5xl flex-auto px-4 py-16 lg:max-w-none lg:pl-8 lg:pr-0 xl:px-16">
<article>
<div className="flex items-center gap-x-4 pb-4">
Expand All @@ -259,9 +261,8 @@ export function Layout({
<Prose>{children}</Prose>
</article>
</div>
{!isHomePage ||
!is404Page ||
(!is500Page && (
{type !== 'design' &&
(!isHomePage || !is404Page || !is500Page ? (
<div className="hidden xl:sticky xl:top-[4.5rem] xl:-mr-6 xl:block xl:h-[calc(100vh-4.5rem)] xl:flex-none xl:overflow-y-auto xl:py-16 xl:pr-6">
<nav aria-labelledby="on-this-page-title" className="w-56">
{tableOfContents.length > 0 && (
Expand Down Expand Up @@ -293,7 +294,7 @@ export function Layout({
)}
</nav>
</div>
))}
) : null)}
</div>
<Footer />
</>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/docs/creators/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Golem Docs | How do you want to create?
pageTitle: Golem Docs | How do you want to create?
description: Dive into Golem's comprehensive software documentation for creators. Whether you're working with JS or prefer a no-code approach, our in-depth user guides provide all the information you need to streamline your development process.
type: design
type: noicon
---

# How do you want to create?
Expand Down

0 comments on commit 1fc449f

Please sign in to comment.