Merge pull request #16 from Discours/style-fix

footer style fix
This commit is contained in:
Igor Lobanov 2022-09-29 13:46:34 +02:00 committed by GitHub
commit d0fc63aa1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 15 deletions

View File

@ -3,21 +3,23 @@ import { Header } from '../Nav/Header'
import { Footer } from '../Discours/Footer' import { Footer } from '../Discours/Footer'
import '../../styles/app.scss' import '../../styles/app.scss'
import { Show } from 'solid-js'
type Props = { type MainLayoutProps = {
headerTitle?: string headerTitle?: string
children: JSX.Element children: JSX.Element
isHeaderFixed?: boolean isHeaderFixed?: boolean
hideFooter?: boolean
} }
export const MainLayout = (props: Props) => { export const MainLayout = (props: MainLayoutProps) => {
const isHeaderFixed = props.isHeaderFixed !== undefined ? props.isHeaderFixed : true
return ( return (
<> <>
<Header title={props.headerTitle} isHeaderFixed={isHeaderFixed} /> <Header title={props.headerTitle} isHeaderFixed={props.isHeaderFixed === true} />
<main class="main-content">{props.children}</main> <main class="main-content">{props.children}</main>
<Footer /> <Show when={props.hideFooter !== true}>
<Footer />
</Show>
</> </>
) )
} }

View File

@ -3,7 +3,7 @@ import { MainLayout } from '../Layouts/MainLayout'
export const FourOuFourPage = () => { export const FourOuFourPage = () => {
return ( return (
<MainLayout isHeaderFixed={false}> <MainLayout isHeaderFixed={false} hideFooter={true}>
<FourOuFourView /> <FourOuFourView />
</MainLayout> </MainLayout>
) )

View File

@ -1,11 +1,3 @@
header {
position: absolute;
}
footer {
display: none;
}
.main-logo { .main-logo {
height: 80px !important; height: 80px !important;
} }