@@ -31,18 +31,20 @@ class DefaultLayout extends React.Component {
3131 const isTutorial =
3232 this . props . location . pathname . slice ( 0 , 10 ) === `/tutorial/`
3333 const isFeature = this . props . location . pathname . slice ( 0 , 9 ) === `/features`
34- const isPackage = this . props . location . pathname . slice ( 0 , 9 ) === `/packages`
34+ const isPackageSearchPage =
35+ this . props . location . pathname . slice ( 0 , 8 ) === `/plugins` ||
36+ this . props . location . pathname . slice ( 0 , 9 ) === `/packages`
3537 const isPackageReadme =
3638 this . props . location . pathname . slice ( 0 , 16 ) === `/packages/gatsby`
3739
3840 const hasSidebar =
39- isDoc || isTutorial || isFeature || isPackage || isPackageReadme
41+ isDoc || isTutorial || isFeature || isPackageSearchPage || isPackageReadme
4042 const isSearchSource = hasSidebar || isBlog
4143
4244 const packageSidebarWidth = rhythm ( 17 )
4345
4446 const leftPadding = rhythmSize => {
45- if ( this . props . location . pathname . slice ( 0 , 9 ) === `/packages` ) {
47+ if ( isPackageReadme || isPackageSearchPage ) {
4648 return packageSidebarWidth
4749 } else if ( hasSidebar ) {
4850 return rhythm ( rhythmSize )
@@ -83,11 +85,11 @@ class DefaultLayout extends React.Component {
8385 let searchBarDisplayProperty
8486 let childrenMobileDisplay
8587 let childrenTabletDisplay
86- if ( isPackage && ! isPackageReadme ) {
88+ if ( isPackageSearchPage && ! isPackageReadme ) {
8789 searchBarDisplayProperty = { display : `block` }
8890 childrenMobileDisplay = { display : `none` }
8991 childrenTabletDisplay = { display : `block` }
90- } else if ( isPackage && isPackageReadme ) {
92+ } else if ( isPackageSearchPage && isPackageReadme ) {
9193 searchBarDisplayProperty = {
9294 [ presets . Mobile ] : {
9395 display : `none` ,
@@ -155,9 +157,9 @@ class DefaultLayout extends React.Component {
155157 css = { {
156158 ...searchbarStyles ,
157159 [ presets . Tablet ] : {
158- display : isPackage
160+ display : isPackageSearchPage
159161 ? `block`
160- : isPackage && isPackageReadme ? `block` : `none` ,
162+ : isPackageSearchPage && isPackageReadme ? `block` : `none` ,
161163 width : packageSidebarWidth ,
162164 position : `fixed` ,
163165 background : colors . ui . whisper ,
0 commit comments