forked from emre/www_projectmycelium_com
refactor: extract hero content from aurora background component
- Separated HomeAurora into pure background component and new HomeHero for content - Converted aurora to absolute positioned background layer in Layout for homepage - Removed z-index conflicts and cleaned up background color declarations
This commit is contained in:
@@ -1,16 +1,22 @@
|
||||
import { Outlet } from 'react-router-dom'
|
||||
import { Outlet, useLocation } from 'react-router-dom'
|
||||
import { Footer } from './Footer'
|
||||
import { Header } from './Header'
|
||||
import { HomeAurora } from '../pages/home/HomeAurora'
|
||||
|
||||
export function Layout() {
|
||||
const location = useLocation()
|
||||
const isHomePage = location.pathname === '/'
|
||||
|
||||
return (
|
||||
<div className="bg-white antialiased" style={{ fontFamily: 'var(--font-inter)' }}>
|
||||
<Header />
|
||||
<main className="">
|
||||
<Outlet />
|
||||
</main>
|
||||
<Footer />
|
||||
<div className="bg-transparent antialiased relative" style={{ fontFamily: 'var(--font-inter)' }}>
|
||||
{isHomePage && <HomeAurora />}
|
||||
<div className="relative z-10">
|
||||
<Header />
|
||||
<main>
|
||||
<Outlet />
|
||||
</main>
|
||||
<Footer />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user