fix(client): set --header-height only if Header exists
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
d161459109
commit
9ce4331e25
@ -1,5 +1,6 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Helmet from 'react-helmet';
|
||||
import SearchBar from '../search/searchBar/SearchBar';
|
||||
|
||||
import NavigationMenu from './components/NavMenu';
|
||||
@ -15,15 +16,20 @@ const propTypes = {
|
||||
function Header(props) {
|
||||
const { disableSettings } = props;
|
||||
return (
|
||||
<header>
|
||||
<nav id='top-nav'>
|
||||
<Link className='home-link' to='/'>
|
||||
<NavLogo />
|
||||
</Link>
|
||||
<SearchBar />
|
||||
<NavigationMenu disableSettings={disableSettings} />
|
||||
</nav>
|
||||
</header>
|
||||
<>
|
||||
<Helmet>
|
||||
<style>{':root{--header-height: 38px}'}</style>
|
||||
</Helmet>
|
||||
<header>
|
||||
<nav id='top-nav'>
|
||||
<Link className='home-link' to='/'>
|
||||
<NavLogo />
|
||||
</Link>
|
||||
<SearchBar />
|
||||
<NavigationMenu disableSettings={disableSettings} />
|
||||
</nav>
|
||||
</header>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -15,12 +15,11 @@ body {
|
||||
}
|
||||
|
||||
.default-layout {
|
||||
margin-top: var(--header-height);
|
||||
margin-top: var(--header-height, 0px);
|
||||
background: var(--secondary-background);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: var(--header-height);
|
||||
min-height: calc(100vh - var(--header-height));
|
||||
min-height: calc(100vh - var(--header-height, 0px));
|
||||
}
|
||||
|
||||
h1 {
|
||||
|
@ -1,5 +1,5 @@
|
||||
#learn-app-wrapper .desktop-layout {
|
||||
height: calc(100vh - var(--header-height));
|
||||
height: calc(100vh - var(--header-height, 0px));
|
||||
}
|
||||
|
||||
#learn-app-wrapper .reflex-container.vertical > .reflex-splitter,
|
||||
|
@ -1,5 +1,4 @@
|
||||
:root {
|
||||
--header-height: 38px;
|
||||
--theme-color: #0a0a23;
|
||||
--gray-00: #ffffff;
|
||||
--gray-05: #f5f6f7;
|
||||
|
@ -26,7 +26,7 @@
|
||||
}
|
||||
|
||||
#challenge-page-tabs .tab-content {
|
||||
height: calc(100vh - var(--header-height) - 69px);
|
||||
height: calc(100vh - var(--header-height, 0px) - 69px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user