Ott 304 responsive main screen fn (#100)

keep-around/af30b88d367751c9e05a735e4a0467a96238ef47
Sergiu 5 years ago committed by GitHub
parent 21df1f11e8
commit 09ecd956f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/config/devices.tsx
  2. 6
      src/features/Header/styled.tsx
  3. 6
      src/features/HeaderFilters/components/TournamentFilter/styled.tsx
  4. 8
      src/features/MatchCard/styled.tsx
  5. 10
      src/features/MatchesGrid/styled.tsx
  6. 13
      src/features/Menu/styled.tsx
  7. 6
      src/features/Search/styled.tsx

@ -1,5 +1,7 @@
export const devices = { export const devices = {
desktop: '(max-width: 1784px)',
laptop: '(max-width: 1280px)', laptop: '(max-width: 1280px)',
large: '(max-width: 1900px)',
mobile: '(max-width: 640px)', mobile: '(max-width: 640px)',
tablet: '(max-width: 1024px)', tablet: '(max-width: 1024px)',
} }

@ -38,7 +38,7 @@ export const SearchWrapper = styled(FilterWrapper)`
margin-right: 16px; margin-right: 16px;
display: flex; display: flex;
@media${devices.laptop} { @media${devices.desktop} {
width: 51px; width: 51px;
margin-right: 9px; margin-right: 9px;
@ -51,6 +51,10 @@ export const SearchWrapper = styled(FilterWrapper)`
export const SportFilterWrapper = styled(FilterWrapper)` export const SportFilterWrapper = styled(FilterWrapper)`
width: 400px; width: 400px;
@media${devices.desktop} {
width: 350px;
}
@media${devices.laptop} { @media${devices.laptop} {
width: 234px; width: 234px;
} }

@ -12,6 +12,12 @@ export const ListWrapper = styled.div`
overflow-y: scroll; overflow-y: scroll;
z-index: 2; z-index: 2;
@media${devices.laptop} {
right: 0;
bottom: -1px;
left: auto;
}
@media${devices.tablet} { @media${devices.tablet} {
width: 200%; width: 200%;
left: -100%; left: -100%;

@ -2,15 +2,14 @@ import styled from 'styled-components/macro'
import { devices } from 'config/devices' import { devices } from 'config/devices'
import { T9n } from 'features/T9n' import { T9n } from 'features/T9n'
import { MATCH_CARD_WIDTH, MATCH_CARD_GAP } from './config' import { MATCH_CARD_WIDTH } from './config'
export const CardWrapper = styled.li.attrs({ export const CardWrapper = styled.li.attrs({
tabIndex: 0, tabIndex: 0,
})` })`
position: relative; position: relative;
flex: 0 0 auto; flex: 0 0 auto;
width: ${MATCH_CARD_WIDTH}px; min-width: ${MATCH_CARD_WIDTH}px;
margin-right: ${MATCH_CARD_GAP}px;
padding-bottom: 18px; padding-bottom: 18px;
border-radius: 2px; border-radius: 2px;
border: 2px solid transparent; border: 2px solid transparent;
@ -19,8 +18,9 @@ export const CardWrapper = styled.li.attrs({
cursor: pointer; cursor: pointer;
transition: border 0.5s ease-out; transition: border 0.5s ease-out;
@media${devices.laptop} { @media${devices.laptop} {
width: 279px; min-width: 279px;
height: 279px; height: 279px;
margin: 0; margin: 0;
} }

@ -4,14 +4,10 @@ import { devices } from 'config/devices'
export const Wrapper = styled.ul` export const Wrapper = styled.ul`
display: grid; display: grid;
grid-template-columns: repeat(auto-fill, minmax(279px, 288px)); grid-template-columns: repeat(6, 288px);
grid-gap: 13px; grid-gap: 13px;
@media${devices.laptop} { @media${devices.large} {
grid-template-columns: repeat(4, 279px);
}
@media${devices.tablet} {
grid-template-columns: repeat(auto-fit, minmax(279px, 1fr)); grid-template-columns: repeat(auto-fit, minmax(279px, 1fr));
} }
` `

@ -14,7 +14,7 @@ export const Wrapper = styled.nav`
margin-left: 90px; margin-left: 90px;
margin-right: 14px; margin-right: 14px;
@media${devices.laptop} { @media${devices.desktop} {
margin-left: 23px; margin-left: 23px;
margin-right: 0; margin-right: 0;
} }
@ -44,6 +44,13 @@ export const MenuList = styled.ul`
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
z-index: 1; z-index: 1;
@media${devices.laptop} {
top: 55px;
left: 0;
width: 288px;
}
@media${devices.tablet} { @media${devices.tablet} {
right: 0; right: 0;
left: auto; left: auto;
@ -60,6 +67,10 @@ export const MenuList = styled.ul`
transform: translate(-50%, -50%) rotate(45deg); transform: translate(-50%, -50%) rotate(45deg);
background-color: #666; background-color: #666;
@media${devices.laptop} {
left: 4%;
}
@media${devices.tablet} { @media${devices.tablet} {
left: 97%; left: 97%;
} }

@ -21,7 +21,7 @@ export const Form = styled.form`
margin: 0; margin: 0;
padding-bottom: 13px; padding-bottom: 13px;
@media${devices.laptop} { @media${devices.desktop} {
padding-left: 12px; padding-left: 12px;
} }
@ -33,7 +33,7 @@ export const Form = styled.form`
} }
} }
@media${devices.laptop} { @media${devices.desktop} {
width: 51px; width: 51px;
:focus-within { :focus-within {
@ -76,7 +76,7 @@ export const Form = styled.form`
background-image: url(/images/search.svg); background-image: url(/images/search.svg);
background-repeat: no-repeat; background-repeat: no-repeat;
@media${devices.laptop} { @media${devices.desktop} {
margin-right: 0; margin-right: 0;
} }
@media${devices.tablet} { @media${devices.tablet} {

Loading…
Cancel
Save