Ott 2118 facr logo

keep-around/023687a6c04fec548f943a7344664691428f80e6
Макситалиев Мирлан 4 years ago
parent 368a945826
commit 023687a6c0
  1. 26
      Makefile
  2. 10
      public/images/powered-instat-logo.svg
  3. 15
      src/config/clients/facr.tsx
  4. 5
      src/config/clients/instat.tsx
  5. 5
      src/config/clients/types.tsx
  6. 12
      src/features/HomePage/components/Header/index.tsx
  7. 5
      src/features/Logo/index.tsx
  8. 3
      src/features/MatchSwitches/styled.tsx
  9. 10
      src/features/ProfileHeader/index.tsx
  10. 25
      src/features/ProfileHeader/styled.tsx
  11. 36
      src/features/UserAccount/components/Header/index.tsx
  12. 3
      src/features/UserAccount/index.tsx
  13. 13
      src/features/UserAccount/styled.tsx

@ -51,9 +51,9 @@ prod: clean
REACT_APP_STRIPE_PK=pk_live_ANI76cBhSo69DZUxPmyRVIZW \ REACT_APP_STRIPE_PK=pk_live_ANI76cBhSo69DZUxPmyRVIZW \
npm run build npm run build
rsync -zavP build/ -e 'ssh -p 666' ott@de.instat.tv:/usr/local/www/ott/wwwroot/ rsync -zavP --delete-before build/ -e 'ssh -p 666' ott@de.instat.tv:/usr/local/www/ott/wwwroot/
rsync -zavP build/ -e 'ssh -p 666' ott@fr.instat.tv:/usr/local/www/ott/wwwroot/ rsync -zavP --delete-before build/ -e 'ssh -p 666' ott@fr.instat.tv:/usr/local/www/ott/wwwroot/
rsync -zavP build/ -e 'ssh -p 666' ott@bkup.instat.tv:/usr/local/www/ott/wwwroot/ rsync -zavP --delete-before build/ -e 'ssh -p 666' ott@bkup.instat.tv:/usr/local/www/ott/wwwroot/
preprod: clean preprod: clean
REACT_APP_TYPE=ott \ REACT_APP_TYPE=ott \
@ -62,7 +62,7 @@ preprod: clean
REACT_APP_STRIPE_PK=pk_live_ANI76cBhSo69DZUxPmyRVIZW \ REACT_APP_STRIPE_PK=pk_live_ANI76cBhSo69DZUxPmyRVIZW \
npm run build npm run build
rsync -zavP build/ -e 'ssh -p 666' ott-test@test.instat.tv:/usr/local/www/ott-test/wwwroot/ rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-test@test.instat.tv:/usr/local/www/ott-test/wwwroot/
facr-prod: clean facr-prod: clean
REACT_APP_TYPE=ott \ REACT_APP_TYPE=ott \
@ -71,29 +71,29 @@ facr-prod: clean
REACT_APP_CLIENT=facr \ REACT_APP_CLIENT=facr \
npm run build npm run build
rsync -zavP build/ -e 'ssh -p 666' ott@de.instat.tv:/usr/local/www/ott/facr-wwwroot/ rsync -zavP --delete-before build/ -e 'ssh -p 666' ott@de.instat.tv:/usr/local/www/ott/facr-wwwroot/
rsync -zavP build/ -e 'ssh -p 666' ott@fr.instat.tv:/usr/local/www/ott/facr-wwwroot/ rsync -zavP --delete-before build/ -e 'ssh -p 666' ott@fr.instat.tv:/usr/local/www/ott/facr-wwwroot/
rsync -zavP build/ -e 'ssh -p 666' ott@bkup.instat.tv:/usr/local/www/ott/facr-wwwroot/ rsync -zavP --delete-before build/ -e 'ssh -p 666' ott@bkup.instat.tv:/usr/local/www/ott/facr-wwwroot/
deploy-all: prod preprod facr-prod deploy-all: prod preprod facr-prod
stage: build stage: build
rsync -zavP build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/wwwroot/ rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/wwwroot/
a-stage: build a-stage: build
rsync -zavP build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/a-wwwroot/ rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/a-wwwroot/
b-stage: build b-stage: build
rsync -zavP build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/b-wwwroot/ rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/b-wwwroot/
c-stage: build c-stage: build
rsync -zavP build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/c-wwwroot/ rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/c-wwwroot/
d-stage: build d-stage: build
rsync -zavP build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/d-wwwroot/ rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/d-wwwroot/
e-stage: build e-stage: build
rsync -zavP build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/e-wwwroot/ rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@staging.instat.tv:/usr/local/www/ott-staging/e-wwwroot/
test: test:
npm test npm test

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 15 KiB

@ -32,7 +32,6 @@ export const facr: ClientConfig = {
[PROCEDURES.get_player_matches]: params, [PROCEDURES.get_player_matches]: params,
[PROCEDURES.get_tournament_matches]: params, [PROCEDURES.get_tournament_matches]: params,
}, },
showPoweredByLogo: true,
showSearch: false, showSearch: false,
styles: { styles: {
background: '', background: '',
@ -44,13 +43,13 @@ export const facr: ClientConfig = {
#000000; #000000;
`, `,
logo: 'facr-logo.svg', logo: 'facr-logo.svg',
logoHeight: 5, logoHeight: 4.76,
logoWidth: 6.45, logoLeft: 1.17,
matchLogoHeight: 3.7, logoTop: 1.74,
matchLogoTopMargin: 0.6, logoWidth: 6.22,
matchLogoWidth: 3.5, matchLogoHeight: 2.6,
userAccountLogoHeight: 3, matchLogoTopMargin: 0.9,
userAccountLogoWidth: 3.5, matchLogoWidth: 3.4,
}, },
title: 'FACR.TV - The home of Czech football streaming', title: 'FACR.TV - The home of Czech football streaming',
} }

@ -16,12 +16,11 @@ export const instat: ClientConfig = {
background: 'background-image: url(/images/Checker.png);', background: 'background-image: url(/images/Checker.png);',
logo: 'logo.svg', logo: 'logo.svg',
logoHeight: 1.465, logoHeight: 1.465,
logoLeft: 1.7,
logoTop: 1.5,
logoWidth: 6.37, logoWidth: 6.37,
matchLogoHeight: 1.465, matchLogoHeight: 1.465,
matchLogoTopMargin: 1.14,
matchLogoWidth: 6.37, matchLogoWidth: 6.37,
userAccountLogoHeight: 1.465,
userAccountLogoWidth: 6.37,
}, },
title: 'InStat TV - The Home of Sports Streaming', title: 'InStat TV - The Home of Sports Streaming',
} }

@ -27,19 +27,18 @@ export type ClientConfig = {
name: ClientNames, name: ClientNames,
privacyLink: string, privacyLink: string,
requests?: Record<ProcedureName, RequestParameters>, requests?: Record<ProcedureName, RequestParameters>,
showPoweredByLogo?: boolean,
showSearch?: boolean, showSearch?: boolean,
styles: { styles: {
background?: string, background?: string,
homePageHeader?: StyledCss, homePageHeader?: StyledCss,
logo: string, logo: string,
logoHeight?: number, logoHeight?: number,
logoLeft?: number,
logoTop?: number,
logoWidth?: number, logoWidth?: number,
matchLogoHeight?: number, matchLogoHeight?: number,
matchLogoTopMargin?: number, matchLogoTopMargin?: number,
matchLogoWidth?: number, matchLogoWidth?: number,
userAccountLogoHeight?: number,
userAccountLogoWidth?: number,
}, },
title: string, title: string,
} }

@ -1,6 +1,7 @@
import { Link } from 'react-router-dom' import { Link } from 'react-router-dom'
import { PAGES } from 'config' import { PAGES } from 'config/pages'
import { client } from 'config/clients'
import { Menu } from 'features/Menu' import { Menu } from 'features/Menu'
import { ScoreSwitch } from 'features/MatchSwitches' import { ScoreSwitch } from 'features/MatchSwitches'
@ -16,8 +17,11 @@ import {
export const Header = () => ( export const Header = () => (
<HeaderStyled> <HeaderStyled>
<Position left={1.7}> <Position
<HeaderGroup marginTop={0.19}> top={client.styles.logoTop}
left={client.styles.logoLeft}
>
<HeaderGroup>
<Link to={PAGES.home}> <Link to={PAGES.home}>
<HeaderLogo /> <HeaderLogo />
</Link> </Link>
@ -26,7 +30,7 @@ export const Header = () => (
</Position> </Position>
<DateFilter /> <DateFilter />
<Position right={0.71}> <Position right={0.71}>
<HeaderGroup height={2.28}> <HeaderGroup>
<ScoreSwitch /> <ScoreSwitch />
<Menu /> <Menu />
</HeaderGroup> </HeaderGroup>

@ -14,15 +14,16 @@ export const Logo = styled.div<Props>`
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
background-image: url(/images/${client.styles.logo}); background-image: url(/images/${client.styles.logo});
background-position: center;
width: ${client.styles.logoWidth}rem; width: ${client.styles.logoWidth}rem;
height: ${client.styles.logoHeight}rem; height: ${client.styles.logoHeight}rem;
${isMobileDevice ${isMobileDevice
? css` ? css`
width: 144px; width: 144px;
height: 33px; height: 33px;
@media screen and (orientation: landscape){ @media screen and (orientation: landscape){
width: 92px; width: 92px;
height: 22px; height: 22px;

@ -45,7 +45,6 @@ export const Icon = styled.div<IconProps>`
width: ${({ width = 1.7 }) => width}rem; width: ${({ width = 1.7 }) => width}rem;
height: ${({ height = 2.28 }) => height}rem; height: ${({ height = 2.28 }) => height}rem;
position: relative; position: relative;
top: 3px;
color: white; color: white;
background-size: contain; background-size: contain;
background-repeat: no-repeat; background-repeat: no-repeat;
@ -59,7 +58,7 @@ export const Icon = styled.div<IconProps>`
background-image: url(/images/${iconName}-off.svg); background-image: url(/images/${iconName}-off.svg);
` `
)}; )};
${isMobileDevice ${isMobileDevice
? css` ? css`
width: 51px; width: 51px;

@ -44,8 +44,12 @@ export const ProfileHeader = ({
color={headerColor || color} color={headerColor || color}
height={height} height={height}
> >
<Position isMatchPage={isMatchPage()} left={1.7}> <Position
<HeaderGroup marginTop={0.19}> isMatchPage={isMatchPage()}
top={client.styles.logoTop}
left={client.styles.logoLeft}
>
<HeaderGroup>
<Link to={PAGES.home}> <Link to={PAGES.home}>
<HeaderLogo isMatchPage={isMatchPage()} /> <HeaderLogo isMatchPage={isMatchPage()} />
</Link> </Link>
@ -57,7 +61,7 @@ export const ProfileHeader = ({
{children} {children}
<Position right={0.71}> <Position right={0.71}>
<HeaderGroup height={2.28}> <HeaderGroup>
<ScoreSwitch /> <ScoreSwitch />
<Menu /> <Menu />
</HeaderGroup> </HeaderGroup>

@ -33,12 +33,12 @@ export const HeaderStyled = styled.header<HeaderProps>`
@media (max-width: 450px){ @media (max-width: 450px){
height: 124px; height: 124px;
} }
${({ color, headerImage }) => (headerImage ${({ color, headerImage }) => (headerImage
? css`background: url(${headerImage});` ? css`background: url(${headerImage});`
: client.styles.homePageHeader || defaultHeaderStyles(color) : client.styles.homePageHeader || defaultHeaderStyles(color)
)} )}
${isMobileDevice ${isMobileDevice
? css` ? css`
height: auto; height: auto;
@ -54,10 +54,10 @@ type Props = {
export const HeaderGroup = styled.div<Props>` export const HeaderGroup = styled.div<Props>`
display: flex; display: flex;
${({ height }) => (height ? `height: ${height}rem` : '')}; ${({ height }) => (height ? `height: ${height}rem` : '')};
${({ marginTop }) => (marginTop ? `margin-top: ${marginTop}rem` : '')}; ${({ marginTop }) => (marginTop ? `margin-top: ${marginTop}rem` : '')};
${isMobileDevice ${isMobileDevice
? css` ? css`
position: relative; position: relative;
@ -67,18 +67,16 @@ export const HeaderGroup = styled.div<Props>`
` `
export const HeaderLogo = styled(Logo)` export const HeaderLogo = styled(Logo)`
margin-top: ${({ isMatchPage }) => (isMatchPage ? '4px' : '10px')};
${({ isMatchPage }) => (isMatchPage ? css` ${({ isMatchPage }) => (isMatchPage ? css`
width: ${client.styles.matchLogoWidth}rem; width: ${client.styles.matchLogoWidth}rem;
height: ${client.styles.matchLogoHeight}rem; height: ${client.styles.matchLogoHeight}rem;
` : '')} ` : '')}
${isMobileDevice ${isMobileDevice
? css` ? css`
width: 85px; width: 85px;
height: 20px; height: 20px;
@media (max-width: 450px){ @media (max-width: 450px){
left: 48vw; left: 48vw;
top: 5px; top: 5px;
@ -93,15 +91,18 @@ type PositionProps = {
isMatchPage?: boolean, isMatchPage?: boolean,
left?: number, left?: number,
right?: number, right?: number,
top?: number,
} }
export const Position = styled.div<PositionProps>` export const Position = styled.div<PositionProps>`
position: absolute; position: absolute;
top: ${({ isMatchPage }) => ( top: ${({ isMatchPage, top = 1.14 }) => (
isMatchPage ? client.styles.matchLogoTopMargin : '1.14' isMatchPage
? client.styles.matchLogoTopMargin ?? top
: top
)}rem; )}rem;
${({ left }) => (isUndefined(left) ? '' : `left: ${left}rem`)}; ${({ left }) => (isUndefined(left) ? '' : `left: ${left}rem`)};
${({ right }) => (isUndefined(right) ? '' : `right: ${right}rem`)}; ${({ right }) => (isUndefined(right) ? '' : `right: ${right}rem`)};
` `

@ -6,14 +6,15 @@ import { devices, PAGES } from 'config'
import { isMobileDevice } from 'config/userAgent' import { isMobileDevice } from 'config/userAgent'
import { client } from 'config/clients' import { client } from 'config/clients'
import { HeaderGroup } from 'features/ProfileHeader/styled'
import { Logo } from 'features/Logo' import { Logo } from 'features/Logo'
const HeaderStyled = styled.header` const HeaderStyled = styled.header`
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 65px; margin-bottom: 65px;
width: 100%;
height: ${client.styles.logoHeight}rem;
justify-content: space-between;
@media ${devices.tablet} { @media ${devices.tablet} {
margin-bottom: 0; margin-bottom: 0;
@ -21,7 +22,6 @@ const HeaderStyled = styled.header`
${isMobileDevice ${isMobileDevice
? css` ? css`
justify-content: center;
@media (max-width: 650px){ @media (max-width: 650px){
margin-bottom: 20px; margin-bottom: 20px;
} }
@ -31,10 +31,6 @@ const HeaderStyled = styled.header`
` `
: ''}; : ''};
` `
const CustomHeaderGroup = styled(HeaderGroup)`
width: 100%;
justify-content: space-between;
`
const HomeIcon = styled.div` const HomeIcon = styled.div`
display: block; display: block;
@ -46,19 +42,25 @@ const HomeIcon = styled.div`
` `
export const HeaderLogo = styled(Logo)` export const HeaderLogo = styled(Logo)`
width: ${client.styles.userAccountLogoWidth}rem; position: absolute;
height: ${client.styles.userAccountLogoHeight}rem; top: ${client.styles.logoTop}rem;
left: ${client.styles.logoLeft}rem;
${isMobileDevice
? css`
left: 50%;
transform: translateX(-50%);
`
: ''}
` `
export const Header = () => ( export const Header = () => (
<HeaderStyled> <HeaderStyled>
<CustomHeaderGroup> <Link to={PAGES.home}>
<Link to={PAGES.home}> <HeaderLogo />
<HeaderLogo /> </Link>
</Link> <Link to={PAGES.home}>
<Link to={PAGES.home}> <HomeIcon />
<HomeIcon /> </Link>
</Link>
</CustomHeaderGroup>
</HeaderStyled> </HeaderStyled>
) )

@ -2,7 +2,6 @@ import { Route } from 'react-router-dom'
import { PAGES } from 'config' import { PAGES } from 'config'
import { isProduction } from 'config/env' import { isProduction } from 'config/env'
import { client } from 'config/clients'
import { userAccountLexics } from 'config/lexics/userAccount' import { userAccountLexics } from 'config/lexics/userAccount'
import { usePageLogger } from 'hooks/usePageLogger' import { usePageLogger } from 'hooks/usePageLogger'
@ -21,7 +20,6 @@ import {
Aside, Aside,
Body, Body,
ContentWrapper, ContentWrapper,
Logo,
Navigations, Navigations,
StyledLink, StyledLink,
UserAccountWrapper, UserAccountWrapper,
@ -71,7 +69,6 @@ const UserAccount = () => {
<PagePaymentsHistory /> <PagePaymentsHistory />
</Route> </Route>
</ContentWrapper> </ContentWrapper>
{client.showPoweredByLogo && <Logo />}
</Body> </Body>
</UserAccountWrapper> </UserAccountWrapper>
) )

@ -248,16 +248,3 @@ export const InlineButton = styled.button<InlineButtonProps>`
opacity: 0.5; opacity: 0.5;
} }
` `
export const Logo = styled.div`
display: block;
background-size: contain;
background-repeat: no-repeat;
background-image: url(/images/powered-instat-logo.svg);
position: absolute;
bottom: 4rem;
right: 0;
margin-right: 2.7rem;
width: 4rem;
height: 2.5rem;
`

Loading…
Cancel
Save