add options
This commit is contained in:
parent
83e14e49c4
commit
0ff7cbd044
|
@ -1 +0,0 @@
|
|||
export { default as AppBar } from './AppBar'
|
|
@ -1,7 +1,7 @@
|
|||
import { Typography } from '@acid-info/lsd-react'
|
||||
import styled from '@emotion/styled'
|
||||
import { uiConfigs } from '@/configs/ui.configs'
|
||||
import { NavbarFiller } from '@/components/AppBar/NavbarFiller'
|
||||
import { NavbarFiller } from '@/components/NavBar/NavbarFiller'
|
||||
import { Searchbar } from '@/components/Searchbar'
|
||||
|
||||
export default function Hero() {
|
||||
|
|
|
@ -13,17 +13,17 @@ import Link from 'next/link'
|
|||
import { useRouter } from 'next/router'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { LogosIcon } from '../Icons/LogosIcon'
|
||||
import { MoonIcon } from '../Icons/MoonIcon'
|
||||
import { SunIcon } from '../Icons/SunIcon'
|
||||
import { useThemeState } from '@/states/themeState'
|
||||
import { NavbarLinks } from '@/components/AppBar/Navbar.Links'
|
||||
import { NavbarLinks } from '@/components/NavBar/Navbar.Links'
|
||||
import { NavLinksItems } from '@/configs/data.configs'
|
||||
import { NavbarMobileMenu } from '@/components/AppBar/Navbar.MobileMenu'
|
||||
import { NavbarMobileMenu } from '@/components/NavBar/Navbar.MobileMenu'
|
||||
import { ThemeSwitch } from '@/components/ThemeSwitch/ThemeSwitch'
|
||||
|
||||
interface AppBarProps {}
|
||||
export interface NavBarProps {
|
||||
showLogoType?: boolean
|
||||
}
|
||||
|
||||
export default function AppBar({}: AppBarProps) {
|
||||
export default function NavBar({ showLogoType = true }: NavBarProps) {
|
||||
const themeState = useThemeState()
|
||||
const { pathname } = useRouter()
|
||||
const isSearchPage = pathname === '/search'
|
||||
|
@ -44,9 +44,11 @@ export default function AppBar({}: AppBarProps) {
|
|||
<NavBarContainer>
|
||||
<LeftContainer href={'/'}>
|
||||
<LogosIcon color="primary" />
|
||||
<PressLogoType variant={'h6'} genericFontFamily={'serif'}>
|
||||
Press Engine
|
||||
</PressLogoType>
|
||||
{showLogoType && (
|
||||
<PressLogoType variant={'h6'} genericFontFamily={'serif'}>
|
||||
Press Engine
|
||||
</PressLogoType>
|
||||
)}
|
||||
</LeftContainer>
|
||||
<NavLinksContainer>
|
||||
<NavbarLinks links={NavLinksItems} />
|
|
@ -1,5 +1,5 @@
|
|||
import styled from '@emotion/styled'
|
||||
import { NavbarLinks } from '@/components/AppBar/Navbar.Links'
|
||||
import { NavbarLinks } from '@/components/NavBar/Navbar.Links'
|
||||
import { NavLinksItems } from '@/configs/data.configs'
|
||||
import { uiConfigs } from '@/configs/ui.configs'
|
||||
import { FooterOrgPanel } from '@/components/Footer/Footer.OrgPanel'
|
|
@ -0,0 +1 @@
|
|||
export { default as AppBar } from './NavBar'
|
|
@ -1,4 +1,4 @@
|
|||
import { AppBar } from '@/components/AppBar'
|
||||
import { AppBar } from '../../components/NavBar'
|
||||
import { Footer } from '@/components/Footer'
|
||||
import { Main } from '@/components/Main'
|
||||
import { useArticleContext } from '@/context/article.context'
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
import { Footer } from '@/components/Footer'
|
||||
import { Hero } from '@/components/Hero'
|
||||
import { Main } from '@/components/Main'
|
||||
import { Searchbar } from '@/components/Searchbar'
|
||||
import { uiConfigs } from '@/configs/ui.configs'
|
||||
import styled from '@emotion/styled'
|
||||
import { PropsWithChildren } from 'react'
|
||||
import { AppBar } from '../../components/AppBar'
|
||||
import { useThemeState } from '../../states/themeState'
|
||||
import { AppBar } from '../../components/NavBar'
|
||||
import { NavBarProps } from '@/components/NavBar/NavBar'
|
||||
|
||||
export default function DefaultLayout(props: PropsWithChildren<any>) {
|
||||
interface Props {
|
||||
navbarProps?: NavBarProps
|
||||
}
|
||||
|
||||
export default function DefaultLayout(props: PropsWithChildren<Props>) {
|
||||
const { navbarProps = {} } = props
|
||||
return (
|
||||
<>
|
||||
<AppBar />
|
||||
<AppBar {...navbarProps} />
|
||||
<Main>{props.children}</Main>
|
||||
<Footer />
|
||||
</>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { AppBar } from '@/components/AppBar'
|
||||
import { AppBar } from '../../components/NavBar'
|
||||
import { Footer } from '@/components/Footer'
|
||||
import { Main } from '@/components/Main'
|
||||
import { useEpisodeContext } from '@/context/episode.context'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { AppBar } from '@/components/AppBar'
|
||||
import { AppBar } from '../../components/NavBar'
|
||||
import { Footer } from '@/components/Footer'
|
||||
import { Main } from '@/components/Main'
|
||||
import { PropsWithChildren } from 'react'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { AppBar } from '@/components/AppBar'
|
||||
import { AppBar } from '../../components/NavBar'
|
||||
import { Footer } from '@/components/Footer'
|
||||
import { Main } from '@/components/Main'
|
||||
import { uiConfigs } from '@/configs/ui.configs'
|
||||
|
|
Loading…
Reference in New Issue