-
Notifications
You must be signed in to change notification settings - Fork 25
Banner overflow #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Banner overflow #49
Changes from 4 commits
1540eeb
d652294
411c2db
57b6b2a
1284d8f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react'; | ||
|
||
const DemoBanner = () => ( | ||
<> | ||
<div className="demo-banner"> | ||
This is a demo intended for testing. Data and images are provided by{' '} | ||
<a href="https://www.themoviedb.org">TMDB</a>. | ||
</div> | ||
<style jsx>{` | ||
.demo-banner { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 30px; | ||
background-color: #ffee5b; | ||
color: #444; | ||
padding: 0.75rem 1rem; | ||
text-align: center; | ||
border-bottom: 1px solid #cc0; | ||
z-index: 1000; | ||
} | ||
`}</style> | ||
</> | ||
); | ||
|
||
export default DemoBanner; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,22 @@ import HamburgerButton from 'components/UI/HamburgerButton'; | |
import SearchBar from 'containers/SearchBar'; | ||
import DarkModeToggle from 'containers/DarkModeToggle'; | ||
import TheUser from 'containers/TheUser'; | ||
import { LOGO_IMAGE_PATH } from 'utils/constants/image-paths'; | ||
|
||
const BurgerHeader = ({ openMenu }) => ( | ||
<> | ||
<AppBar> | ||
<HamburgerButton onClick={openMenu} /> | ||
<div className='left-section'> | ||
<HamburgerButton onClick={openMenu} /> | ||
<div className='logo-container'> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] Same Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||
<img | ||
className='logo-img' | ||
width='56' | ||
height='56' | ||
src={LOGO_IMAGE_PATH} | ||
alt='movie ticket' /> | ||
</div> | ||
</div> | ||
<div className='sticky-bar-widgets-container'> | ||
<SearchBar id='mobile' /> | ||
<DarkModeToggle | ||
|
@@ -19,6 +30,24 @@ const BurgerHeader = ({ openMenu }) => ( | |
</div> | ||
</AppBar> | ||
<style jsx>{` | ||
.left-section { | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.logo-container { | ||
margin-left: 25px; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.logo-img { | ||
max-height: 56px; | ||
width: auto; | ||
margin-top: -10px; | ||
margin-bottom: -10px; | ||
} | ||
|
||
.sticky-bar-widgets-container { | ||
display: flex; | ||
align-items: center; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,14 +22,14 @@ const ContentWrapper = ({ | |
|
||
@media ${theme.mediaQueries.larger} { | ||
.content-wrapper { | ||
padding-top: 72px; | ||
padding-top: 100px; | ||
padding-bottom: 6rem; | ||
} | ||
} | ||
|
||
@media ${theme.mediaQueries.large} { | ||
.content-wrapper { | ||
padding-top: 72px; | ||
padding-top: 100px; | ||
Comment on lines
+25
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] This Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||
padding-bottom: 4rem; | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,4 +1,3 @@ | ||||||||||||||||||||
|
||||||||||||||||||||
import { useEffect } from 'react'; | ||||||||||||||||||||
import { useDispatch } from 'react-redux'; | ||||||||||||||||||||
|
||||||||||||||||||||
|
@@ -8,6 +7,8 @@ import MyHead from 'components/MyHead'; | |||||||||||||||||||
import SearchBar from 'containers/SearchBar'; | ||||||||||||||||||||
import DarkModeToggle from 'containers/DarkModeToggle'; | ||||||||||||||||||||
import TheUser from 'containers/TheUser'; | ||||||||||||||||||||
import DemoBanner from 'components/DemoBanner'; | ||||||||||||||||||||
import { LOGO_IMAGE_PATH } from 'utils/constants/image-paths'; | ||||||||||||||||||||
import MainWrapper from './MainWrapper'; | ||||||||||||||||||||
import ContentWrapper from './ContentWrapper'; | ||||||||||||||||||||
import init from 'actions/init'; | ||||||||||||||||||||
|
@@ -30,6 +31,7 @@ const Layout = ({ | |||||||||||||||||||
return ( | ||||||||||||||||||||
<> | ||||||||||||||||||||
<MyHead /> | ||||||||||||||||||||
<DemoBanner /> | ||||||||||||||||||||
{/** | ||||||||||||||||||||
* TODO: it could be more efficient in using markups. | ||||||||||||||||||||
* children is duplicated -> looks like it affects the performance (a little). | ||||||||||||||||||||
|
@@ -48,19 +50,52 @@ const Layout = ({ | |||||||||||||||||||
<Media greaterThan='sm'> | ||||||||||||||||||||
<MainWrapper theme={theme}> | ||||||||||||||||||||
<Sidebar /> | ||||||||||||||||||||
<div className='desktop-widgets-container'> | ||||||||||||||||||||
<SearchBar id='desktop' /> | ||||||||||||||||||||
<DarkModeToggle | ||||||||||||||||||||
id='desktop' | ||||||||||||||||||||
className='left-margin' /> | ||||||||||||||||||||
<TheUser /> | ||||||||||||||||||||
<div className='desktop-header-container'> | ||||||||||||||||||||
<div className='logo-container'> | ||||||||||||||||||||
<img | ||||||||||||||||||||
className='logo-img' | ||||||||||||||||||||
width='56' | ||||||||||||||||||||
height='56' | ||||||||||||||||||||
src={LOGO_IMAGE_PATH} | ||||||||||||||||||||
alt='movie ticket' /> | ||||||||||||||||||||
</div> | ||||||||||||||||||||
Comment on lines
+54
to
+61
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] The
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||||||||
<div className='desktop-widgets-container'> | ||||||||||||||||||||
<SearchBar id='desktop' /> | ||||||||||||||||||||
<DarkModeToggle | ||||||||||||||||||||
id='desktop' | ||||||||||||||||||||
className='left-margin' /> | ||||||||||||||||||||
<TheUser /> | ||||||||||||||||||||
</div> | ||||||||||||||||||||
</div> | ||||||||||||||||||||
<style jsx>{` | ||||||||||||||||||||
.desktop-widgets-container { | ||||||||||||||||||||
position: absolute; | ||||||||||||||||||||
top: 0; | ||||||||||||||||||||
.desktop-header-container { | ||||||||||||||||||||
position: fixed; | ||||||||||||||||||||
top: 30px; | ||||||||||||||||||||
left: 0; | ||||||||||||||||||||
right: 0; | ||||||||||||||||||||
padding: 2rem; | ||||||||||||||||||||
width: 100%; | ||||||||||||||||||||
display: flex; | ||||||||||||||||||||
justify-content: space-between; | ||||||||||||||||||||
align-items: center; | ||||||||||||||||||||
padding: 0.5rem 2rem; | ||||||||||||||||||||
z-index: ${theme.zIndex.appBar + 10}; | ||||||||||||||||||||
background-color: var(--palette-background-paper); | ||||||||||||||||||||
} | ||||||||||||||||||||
|
||||||||||||||||||||
.logo-container { | ||||||||||||||||||||
display: flex; | ||||||||||||||||||||
align-items: center; | ||||||||||||||||||||
margin-left: 15px; | ||||||||||||||||||||
} | ||||||||||||||||||||
|
||||||||||||||||||||
.logo-img { | ||||||||||||||||||||
max-height: 56px; | ||||||||||||||||||||
width: auto; | ||||||||||||||||||||
margin-top: -10px; | ||||||||||||||||||||
margin-bottom: -10px; | ||||||||||||||||||||
} | ||||||||||||||||||||
|
||||||||||||||||||||
.desktop-widgets-container { | ||||||||||||||||||||
display: flex; | ||||||||||||||||||||
align-items: center; | ||||||||||||||||||||
} | ||||||||||||||||||||
|
@@ -75,6 +110,7 @@ const Layout = ({ | |||||||||||||||||||
</MainWrapper> | ||||||||||||||||||||
</Media> | ||||||||||||||||||||
</MediaContextProvider> | ||||||||||||||||||||
<DemoBanner /> | ||||||||||||||||||||
</> | ||||||||||||||||||||
); | ||||||||||||||||||||
}; | ||||||||||||||||||||
|
Uh oh!
There was an error while loading. Please reload this page.