1- import { Fragment , useState } from 'react'
1+ import { Fragment , useMemo , useState } from 'react'
22import { Layout as AntLayout , Button , Menu , Grid , Divider } from 'antd'
33import { LinkOutlined } from '@ant-design/icons'
44import { useLocation , useNavigate , Link } from '@gatsbyjs/reach-router'
@@ -14,7 +14,7 @@ export const Layout = ({ children }) => {
1414 const { helxAppstoreUrl, routes, context, basePath } = useEnvironment ( )
1515 const { api, loading : apiLoading , loggedIn, appstoreContext } = useWorkspacesAPI ( )
1616 const { analyticsEvents } = useAnalytics ( )
17- const { md } = useBreakpoint ( )
17+ const { sm , md , lg } = useBreakpoint ( )
1818 const baseLinkPath = context . workspaces_enabled === 'true' ? '/helx' : ''
1919 const location = useLocation ( ) ;
2020 const navigate = useNavigate ( )
@@ -42,7 +42,10 @@ export const Layout = ({ children }) => {
4242
4343 return (
4444 < AntLayout className = "layout" >
45- < Header className = "helx-header" style = { { display : 'flex' , zIndex : 1 , width : '100%' , background : '#fff' } } >
45+ < Header
46+ className = { `helx-header ${ context . brand === 'ai_sandbox' && 'ai-sandbox-theme' } ` }
47+ style = { { display : 'flex' , zIndex : 1 , width : '100%' } }
48+ >
4649 { context !== undefined ? < Link to = { basePath } > < img className = "brand_img" src = { '' + context . logo_url } alt = { context . brand } > </ img > </ Link > : < span /> }
4750 { md ? (
4851 < div style = { { flexGrow : 1 , display : "flex" , justifyContent : "flex-end" } } >
@@ -51,7 +54,7 @@ export const Layout = ({ children }) => {
5154 theme = "light"
5255 mode = "horizontal"
5356 selectedKeys = { activeRoutes }
54- style = { { display : "flex" , flexGrow : 1 , justifyContent : "flex-end" } }
57+ style = { { display : "flex" , flexGrow : 1 , justifyContent : "flex-end" , background : 'transparent' , border : 0 } }
5558 >
5659 < Menu . Item style = { { visibility : 'hidden' } } > </ Menu . Item >
5760 < Menu . Item style = { { visibility : 'hidden' } } > </ Menu . Item >
@@ -75,7 +78,7 @@ export const Layout = ({ children }) => {
7578 { context . workspaces_enabled === 'true' && ! apiLoading && loggedIn && (
7679 < div style = { { height : "100%" } } >
7780 < Button
78- type = " primary"
81+ type = { context . brand === 'ai_sandbox' ? 'default' : ' primary' }
7982 ghost
8083 className = "logout-button"
8184 // Could use `loading` property but logout tends to happen so quickly that it doesn't work well.
@@ -91,6 +94,30 @@ export const Layout = ({ children }) => {
9194 < MobileMenu menu = { routes } />
9295 ) }
9396 </ Header >
97+ { context . brand === 'ai_sandbox' && (
98+ < div style = { {
99+ width : '100%' ,
100+ height : 64 ,
101+ display : 'flex' ,
102+ alignItems : 'center' ,
103+ justifyContent : 'center' ,
104+ backgroundImage : "url('" + context . logo_url . substring ( 0 , context . logo_url . lastIndexOf ( '/' ) ) + '/banner.png' + "')" ,
105+ backgroundSize : 'cover' ,
106+ backgroundPosition : 'center' ,
107+ backgroundRepeat : 'no-repeat' ,
108+ } } >
109+ < span style = { {
110+ color : '#fff' ,
111+ fontSize : md ? 40 : sm ? 32 : 24 ,
112+ fontWeight : 300 ,
113+ letterSpacing : 2 ,
114+ textAlign : 'center' ,
115+ padding : '0 16px'
116+ } } >
117+ AI Applied Research Collaborations
118+ </ span >
119+ </ div >
120+ ) }
94121 < Content className >
95122 { children }
96123 { context . workspaces_enabled === 'true' && < SidePanel /> }
0 commit comments