Ott 304 responsive main screen (#99)
parent
c5b6991c3b
commit
21df1f11e8
|
After Width: | Height: | Size: 290 B |
|
After Width: | Height: | Size: 277 B |
|
After Width: | Height: | Size: 277 B |
@ -0,0 +1,5 @@ |
|||||||
|
export const devices = { |
||||||
|
laptop: '(max-width: 1280px)', |
||||||
|
mobile: '(max-width: 640px)', |
||||||
|
tablet: '(max-width: 1024px)', |
||||||
|
} |
||||||
@ -0,0 +1,40 @@ |
|||||||
|
import React from 'react' |
||||||
|
// import { useRouteMatch } from 'react-router-dom'
|
||||||
|
|
||||||
|
import { ToggleScore } from 'features/ToggleScore' |
||||||
|
import { Logo } from 'features/Logo' |
||||||
|
import { Menu } from 'features/Menu' |
||||||
|
import { Search } from 'features/Search' |
||||||
|
import { |
||||||
|
DateFilter, |
||||||
|
MatchStatusFilter, |
||||||
|
} from 'features/HeaderFilters' |
||||||
|
|
||||||
|
import { |
||||||
|
HeaderMobileWrapper, |
||||||
|
HeaderMobileTop, |
||||||
|
HeaderMobileMidle, |
||||||
|
HeaderMobileBottom, |
||||||
|
HeaderIconsWrapper, |
||||||
|
IconFavWrapper, |
||||||
|
} from './styled' |
||||||
|
|
||||||
|
export const HeaderMobile = () => ( |
||||||
|
<HeaderMobileWrapper> |
||||||
|
<HeaderMobileTop> |
||||||
|
<ToggleScore /> |
||||||
|
<Logo /> |
||||||
|
<HeaderIconsWrapper> |
||||||
|
<IconFavWrapper /> |
||||||
|
<Search /> |
||||||
|
<Menu /> |
||||||
|
</HeaderIconsWrapper> |
||||||
|
</HeaderMobileTop> |
||||||
|
<HeaderMobileMidle> |
||||||
|
<DateFilter /> |
||||||
|
</HeaderMobileMidle> |
||||||
|
<HeaderMobileBottom> |
||||||
|
<MatchStatusFilter /> |
||||||
|
</HeaderMobileBottom> |
||||||
|
</HeaderMobileWrapper> |
||||||
|
) |
||||||
@ -0,0 +1,67 @@ |
|||||||
|
import styled from 'styled-components/macro' |
||||||
|
|
||||||
|
export const HeaderMobileWrapper = styled.div` |
||||||
|
width: 100%; |
||||||
|
top: 0; |
||||||
|
left: 0; |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
` |
||||||
|
export const HeaderMobileTop = styled.div` |
||||||
|
width: 100%; |
||||||
|
height: 40px; |
||||||
|
background-color: rgba(255, 255, 255, 0.1); |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: space-between; |
||||||
|
padding: 12px 18px; |
||||||
|
` |
||||||
|
export const HeaderMobileMidle = styled.div` |
||||||
|
width: 100%; |
||||||
|
height: 44px; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: center; |
||||||
|
padding: 12px 18px; |
||||||
|
margin-top: 6px |
||||||
|
` |
||||||
|
export const HeaderMobileBottom = styled.div` |
||||||
|
width: 100%; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: center; |
||||||
|
padding: 5px 18px; |
||||||
|
` |
||||||
|
|
||||||
|
export const HeaderIconsWrapper = styled.div` |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: space-around; |
||||||
|
min-width: 100px; |
||||||
|
` |
||||||
|
|
||||||
|
export const IconSearchWrapper = styled.div` |
||||||
|
width: 20px; |
||||||
|
height: 20px; |
||||||
|
margin-left: 23px; |
||||||
|
background-image: url(/images/search-mobile.svg); |
||||||
|
` |
||||||
|
export const IconFavWrapper = styled.div` |
||||||
|
width: 20px; |
||||||
|
height: 20px; |
||||||
|
background-image: url(/images/star-white.svg); |
||||||
|
` |
||||||
|
export const DateFilterMobileWrapper = styled.div` |
||||||
|
width: 100%; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: center; |
||||||
|
` |
||||||
|
export const BottomMenuWrapper = styled.div`
|
||||||
|
width: 100%; |
||||||
|
position: fixed; |
||||||
|
bottom: 0; |
||||||
|
display: flex; |
||||||
|
height: 40px; |
||||||
|
background: radial-gradient( 49.07% 49.07% at 50% 29.54%, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 100% ), rgba(0,0,0,0.95); |
||||||
|
` |
||||||
@ -1,6 +1,15 @@ |
|||||||
import styled from 'styled-components/macro' |
import styled from 'styled-components/macro' |
||||||
|
|
||||||
|
import { devices } from 'config/devices' |
||||||
|
|
||||||
export const Content = styled.main` |
export const Content = styled.main` |
||||||
margin-top: 75px; |
margin-top: 75px; |
||||||
padding: 0 16px; |
padding: 0 16px; |
||||||
|
@media${devices.tablet} { |
||||||
|
margin-top: 9px; |
||||||
|
} |
||||||
|
|
||||||
|
@media${devices.mobile} { |
||||||
|
padding: 0; |
||||||
|
} |
||||||
` |
` |
||||||
|
|||||||
@ -1,6 +1,12 @@ |
|||||||
import styled from 'styled-components/macro' |
import styled from 'styled-components/macro' |
||||||
|
|
||||||
|
import { devices } from 'config/devices' |
||||||
|
|
||||||
export const MainWrapper = styled.div` |
export const MainWrapper = styled.div` |
||||||
width: 100%; |
width: 100%; |
||||||
padding-left: 80px; |
padding-left: 80px; |
||||||
|
|
||||||
|
@media${devices.tablet} { |
||||||
|
padding: 0 |
||||||
|
} |
||||||
` |
` |
||||||
|
|||||||
@ -1,9 +1,17 @@ |
|||||||
import styled from 'styled-components/macro' |
import styled from 'styled-components/macro' |
||||||
|
|
||||||
import { MATCH_CARD_WIDTH } from 'features/MatchCard/config' |
import { devices } from 'config/devices' |
||||||
|
|
||||||
export const Wrapper = styled.ul` |
export const Wrapper = styled.ul` |
||||||
display: grid; |
display: grid; |
||||||
grid-template-columns: repeat(6, ${MATCH_CARD_WIDTH}px); |
grid-template-columns: repeat(auto-fill, minmax(279px, 288px)); |
||||||
grid-gap: 13px; |
grid-gap: 13px; |
||||||
|
|
||||||
|
@media${devices.laptop} { |
||||||
|
grid-template-columns: repeat(4, 279px); |
||||||
|
} |
||||||
|
|
||||||
|
@media${devices.tablet} { |
||||||
|
grid-template-columns: repeat(auto-fit, minmax(279px, 1fr)); |
||||||
|
} |
||||||
` |
` |
||||||
|
|||||||
@ -0,0 +1 @@ |
|||||||
|
export * from 'react-responsive' |
||||||
Loading…
Reference in new issue