diff --git a/index.html b/index.html index 166c2ea77b..c4e83dac7d 100644 --- a/index.html +++ b/index.html @@ -73,6 +73,10 @@ rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto+Serif:wght@400;600;700;800&display=swap" /> + {showLoginButton ? ( diff --git a/src/components/App/App.tsx b/src/components/App/App.tsx index a5a3262168..f0d126ea46 100644 --- a/src/components/App/App.tsx +++ b/src/components/App/App.tsx @@ -40,7 +40,7 @@ const darkTheme = createTheme({ display: "flex-inline", alignItems: "center", textTransform: "none", - fontFamily: constants.fontFamilySerif, + fontFamily: constants.fontFamilyFuturistic, fontSize: constants.fontSizeSmall, fontWeight: 300, "&:hover": { diff --git a/src/components/App/AppLogo.tsx b/src/components/App/AppLogo.tsx index 0c10108eda..3bc9480765 100644 --- a/src/components/App/AppLogo.tsx +++ b/src/components/App/AppLogo.tsx @@ -28,7 +28,13 @@ const AppLogo = ({ size, onClick }: AppLogoProps) => { to="/" onClick={onClick} > - + {strings.app_name && `<${strings.app_name}/>`} diff --git a/src/components/Footer/Footer.tsx b/src/components/Footer/Footer.tsx index c924a78153..5e2bb30d8c 100644 --- a/src/components/Footer/Footer.tsx +++ b/src/components/Footer/Footer.tsx @@ -126,6 +126,10 @@ const StyledFooter = styled.footer` } } + .about { + font-family: ${constants.fontFamilyFuturistic}; + } + @media only screen and (max-width: 960px) { padding: 20px 25px 15px; flex-direction: column; diff --git a/src/components/Footer/PageLinks.tsx b/src/components/Footer/PageLinks.tsx index 9223cee0a4..499750d90e 100644 --- a/src/components/Footer/PageLinks.tsx +++ b/src/components/Footer/PageLinks.tsx @@ -1,5 +1,6 @@ import React from "react"; import useStrings from "../../hooks/useStrings.hook"; +import constants from "../constants"; const PageLinks = () => { const strings = useStrings(); @@ -37,6 +38,10 @@ const PageLinks = () => { key={link.path} target="_blank" rel="noopener noreferrer" + style={{ + fontFamily: constants.fontFamilyFuturistic, + fontSize: constants.fontSizeSmall, + }} > {link.name} diff --git a/src/components/GamemodeToggle/GamemodeToggle.tsx b/src/components/GamemodeToggle/GamemodeToggle.tsx index 4c2ca2d15c..fb85be5242 100644 --- a/src/components/GamemodeToggle/GamemodeToggle.tsx +++ b/src/components/GamemodeToggle/GamemodeToggle.tsx @@ -3,6 +3,7 @@ import * as React from "react"; import { FormControlLabel, Switch } from "@mui/material"; import { useStrings } from "../../hooks/useStrings.hook"; +import constants from "../constants"; const GamemodeToggle = () => { const strings = useStrings(); @@ -25,9 +26,15 @@ const GamemodeToggle = () => { return ( diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx index fb6d1f9895..eca783cbf9 100644 --- a/src/components/Header/Header.tsx +++ b/src/components/Header/Header.tsx @@ -112,13 +112,23 @@ const DrawerLink = styled(Link)` background-color: rgba(0, 0, 0, 0.08); transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms; } + + span { + font-family: ${constants.fontFamilyFuturistic}; + font-size: ${constants.fontSizeSmall}; + } +`; + +const LinkGroupLink = styled(Link)` + font-family: ${constants.fontFamilyFuturistic}; + font-size: ${constants.fontSizeSmall} !important; `; const LinkGroup = ({ navbarPages }: { navbarPages: any[] }) => ( {navbarPages.map((page: any) => ( - {page.label} + {page.label} {Boolean(page.feature) && (
{ - - - + + value?.toLocaleString()} + axisLine={false} + tickLine={false} + /> + value?.toLocaleString()} + axisLine={false} + tickLine={false} + /> { title={strings.tab_players} subtitle={strings.hero_disclaimer_pro} /> - +
), route: `/heroes/${tabsHeroId}/players`, diff --git a/src/components/Hero/ItemSuggestion.tsx b/src/components/Hero/ItemSuggestion.tsx index be6db5bb1a..4f2c911bbe 100644 --- a/src/components/Hero/ItemSuggestion.tsx +++ b/src/components/Hero/ItemSuggestion.tsx @@ -54,7 +54,7 @@ function ItemSuggestion(props: ItemSuggestionProps) { ]; const itemsPopularityData = props.data; return props.isLoading ? ( - + ) : ( ); diff --git a/src/components/Hero/Players.tsx b/src/components/Hero/Players.tsx index 2aab27e29b..f0c3e2d878 100644 --- a/src/components/Hero/Players.tsx +++ b/src/components/Hero/Players.tsx @@ -9,6 +9,7 @@ import { proPlayersSelector } from "../../reducers/selectors"; class Players extends React.Component<{ isLoading: boolean; + loadingText?: string; data: { account_id: number; games_played: number; @@ -32,7 +33,7 @@ class Players extends React.Component<{ } render() { - const { data, isLoading, proPlayers, strings } = this.props; + const { data, isLoading, proPlayers, strings, loadingText } = this.props; const playersColumns = [ { @@ -66,7 +67,7 @@ class Players extends React.Component<{ ]; if (isLoading) { - return ; + return ; } const preparedData = data diff --git a/src/components/Home/Buttons.tsx b/src/components/Home/Buttons.tsx index b6eef23c11..b7259bc603 100644 --- a/src/components/Home/Buttons.tsx +++ b/src/components/Home/Buttons.tsx @@ -3,6 +3,7 @@ import { Button } from "@mui/material"; import { connect } from "react-redux"; import { IconSteam } from "../Icons"; import config from "../../config"; +import constants from "../constants"; import { HomePageProps } from "./Home"; import useStrings from "../../hooks/useStrings.hook"; @@ -13,9 +14,15 @@ const Buttons = ({ user }: HomePageProps) => {
{!user && ( diff --git a/src/components/Home/Sponsors.tsx b/src/components/Home/Sponsors.tsx index 6366234c5f..daca707815 100644 --- a/src/components/Home/Sponsors.tsx +++ b/src/components/Home/Sponsors.tsx @@ -2,7 +2,6 @@ import React from "react"; import { Button } from "@mui/material"; import styled from "styled-components"; import config from "../../config"; - import useStrings from "../../hooks/useStrings.hook"; const StyledDiv = styled.div` diff --git a/src/components/Home/Styled.tsx b/src/components/Home/Styled.tsx index 73ffa5f751..3a896c9d20 100644 --- a/src/components/Home/Styled.tsx +++ b/src/components/Home/Styled.tsx @@ -16,7 +16,7 @@ export const HeadlineDiv = styled.div` margin-top: 10%; text-transform: uppercase; font-size: 4rem; - font-family: ${constants.fontFamilySerif}; + font-family: ${constants.fontFamilyFuturistic}; font-weight: ${constants.fontWeightMedium}; line-height: 1.2; letter-spacing: 0.02em; @@ -36,6 +36,7 @@ export const HeadlineDiv = styled.div` } `; export const DescriptionDiv = styled.div` + font-family: ${constants.fontFamilyFuturistic}; font-weight: ${constants.fontWeightLight}; margin-bottom: 20px; text-shadow: #000 0 0 3px; @@ -61,10 +62,11 @@ export const ButtonContainer = styled.div` } `; export const BottomTextDiv = styled.div` + font-family: ${constants.fontFamilyFuturistic}; font-size: ${constants.fontSizeMedium}; - opacity: 0.6; font-weight: ${constants.fontWeightLight}; text-align: right; + opacity: 0.6; @media only screen and (max-width: 425px) { text-align: center; diff --git a/src/components/Home/Why.tsx b/src/components/Home/Why.tsx index 190cf4b285..eb219ad573 100644 --- a/src/components/Home/Why.tsx +++ b/src/components/Home/Why.tsx @@ -37,12 +37,13 @@ const StyledDiv = styled.div` & .headline { margin-top: 8px; - font-family: ${constants.fontFamilySerif}; + font-family: ${constants.fontFamilyFuturistic}; font-size: 1.25rem; line-height: 2; } & .description { + font-family: ${constants.fontFamilyFuturistic}; font-size: 0.875rem; font-weight: ${constants.fontWeightLight}; line-height: 1.5; diff --git a/src/components/Match/Laning/Graph.tsx b/src/components/Match/Laning/Graph.tsx index 6aba5cb35e..40e2a84b8a 100644 --- a/src/components/Match/Laning/Graph.tsx +++ b/src/components/Match/Laning/Graph.tsx @@ -21,6 +21,7 @@ import { import useStrings from "../../../hooks/useStrings.hook"; import { Spacer } from "../../Spacer/Spacer"; import constants from "../../constants"; +import Grid from "../../Visualizations/Graph/Grid"; const formatGraphTime = (minutes: number) => `${minutes}:00`; @@ -149,13 +150,7 @@ const Graph = (props: GraphProps) => { axisLine={false} tickLine={false} /> - - + } /> {match.players.map((player) => { const hero = heroes[player.hero_id] || {}; diff --git a/src/components/Match/MatchHeader/MatchHeader.tsx b/src/components/Match/MatchHeader/MatchHeader.tsx index 8071bef646..34f1ae1562 100644 --- a/src/components/Match/MatchHeader/MatchHeader.tsx +++ b/src/components/Match/MatchHeader/MatchHeader.tsx @@ -51,7 +51,7 @@ const Styled = styled.header` background: rgba(0, 0, 0, 23%); font-size: 1.5rem; font-weight: 400; - font-family: ${constants.fontFamilySerif}; + font-family: ${constants.fontFamilyFuturistic}; letter-spacing: 1px; @media only screen and (max-width: 1023px) { @@ -125,7 +125,7 @@ const Styled = styled.header` } & .gameMode { - font-family: ${constants.fontFamilySerif}; + font-family: ${constants.fontFamilyFuturistic}; font-size: ${constants.fontSizeSmall}; letter-spacing: 0.02rem; margin-top: -16px; @@ -141,7 +141,8 @@ const Styled = styled.header` } & .ended { - font-size: ${constants.fontSizeSmall}; + font-family: ${constants.fontFamilyFuturistic}; + font-size: ${constants.fontSizeTiny}; color: ${constants.colorMutedLight}; margin-top: 6px; @@ -152,7 +153,7 @@ const Styled = styled.header` } .killScore { - font-family: ${constants.fontFamilySerif}; + font-family: ${constants.fontFamilyFuturistic}; font-size: 2.5rem; text-align: center; @@ -181,10 +182,6 @@ const Styled = styled.header` @media only screen and (max-width: 1023px) { text-align: center; - - & span { - margin-bottom: 5px; - } } & ul { @@ -205,6 +202,7 @@ const Styled = styled.header` .infoKey { display: block; text-transform: uppercase; + font-family: ${constants.fontFamilyFuturistic}; font-size: ${constants.fontSizeSmall}; color: ${constants.colorMutedLight}; } @@ -212,7 +210,7 @@ const Styled = styled.header` .infoValue { margin-top: 8px; display: block; - font-family: ${constants.fontFamilySerif}; + font-family: ${constants.fontFamilyFuturistic}; font-size: ${constants.fontSizeSmall}; color: ${constants.colorWhite}; } diff --git a/src/components/Player/Header/PlayerButtons.tsx b/src/components/Player/Header/PlayerButtons.tsx index 6ba1414616..d27558be98 100644 --- a/src/components/Player/Header/PlayerButtons.tsx +++ b/src/components/Player/Header/PlayerButtons.tsx @@ -7,10 +7,12 @@ import styled from "styled-components"; import { toggleShowForm as toggleShowFormAction } from "../../../actions/formActions"; import GamemodeToggle from "../../GamemodeToggle/GamemodeToggle"; import config from "../../../config"; +import constants from "../../constants"; const Styled = styled.div` display: flex; flex-direction: row; + align-items: center; flex-wrap: nowrap; font-size: 14px; @@ -52,7 +54,7 @@ class PlayerButtons extends React.Component<
diff --git a/src/components/Player/Header/Styled.tsx b/src/components/Player/Header/Styled.tsx index 9e21674e9f..bd8eae1d39 100644 --- a/src/components/Player/Header/Styled.tsx +++ b/src/components/Player/Header/Styled.tsx @@ -1,15 +1,18 @@ import { CardHeader } from "@mui/material"; import styled from "styled-components"; +import constants from "../../constants"; export const PlayerStatsCard = styled(CardHeader)` & span:last-child { + font-family: ${constants.fontFamilyFuturistic}; font-size: 24px !important; color: rgba(255, 255, 255, 0.87) !important; line-height: 36px !important; } & span:first-child { - font-size: 14px !important; + font-family: ${constants.fontFamilyFuturistic}; + font-size: ${constants.fontSizeSmall}; color: rgba(255, 255, 255, 0.54) !important; line-height: 1 !important; text-transform: uppercase; diff --git a/src/components/Player/Pages/Histograms/Histograms.tsx b/src/components/Player/Pages/Histograms/Histograms.tsx index 20c413931f..5e5a8ac84d 100644 --- a/src/components/Player/Pages/Histograms/Histograms.tsx +++ b/src/components/Player/Pages/Histograms/Histograms.tsx @@ -1,7 +1,6 @@ import React from "react"; import { connect } from "react-redux"; import { withRouter } from "react-router-dom"; - import { getPlayerHistograms } from "../../../../actions"; import ButtonGarden from "../../../ButtonGarden/ButtonGarden"; import Container from "../../../Container/Container"; @@ -10,6 +9,7 @@ import { HistogramGraph } from "../../../Visualizations"; import dataColumns from "../matchDataColumns"; import { formatGraphValueData } from "../../../../utility"; import useStrings from "../../../../hooks/useStrings.hook"; +import { Spacer } from "../../../Spacer/Spacer"; const getMedian = (columns: any[], midpoint: number) => { let sum = 0; @@ -46,6 +46,9 @@ const Histogram = ({ history, }: HistogramsProps) => { const strings = useStrings(); + const match = window.location.pathname.match(/\/histograms\/([^/?]+)/); + const buttonKey = match?.[1]; + const buttonName = strings[`heading_${buttonKey}` as keyof Strings]; return (
- +
- + +
diff --git a/src/components/Request/Request.tsx b/src/components/Request/Request.tsx index 060de5abfd..49e2d68e7f 100644 --- a/src/components/Request/Request.tsx +++ b/src/components/Request/Request.tsx @@ -6,6 +6,8 @@ import Heading from "../Heading/Heading"; import { LazyLog, ScrollFollow } from "@melloware/react-logviewer"; import useStrings from "../../hooks/useStrings.hook"; import config from "../../config"; +import constants from "../constants"; +import { Spacer } from "../Spacer/Spacer"; const Request = () => { const strings = useStrings(); @@ -51,6 +53,7 @@ const Request = () => {
+
{ onChange={(e) => { setMatchId(e.target.value); }} + sx={{ + "& .MuiInputLabel-root": { + fontFamily: constants.fontFamilyFuturistic, + fontSize: constants.fontSizeSmall, + }, + "& .MuiInputBase-input": { + fontFamily: constants.fontFamilyFuturistic, + fontSize: constants.fontSizeSmall, + }, + }} /> */} + +
{ }} sx={{ "& .MuiInputBase-input": { - fontSize: "0.8rem", + fontFamily: constants.fontFamilyFuturistic, + fontSize: constants.fontSizeSmall, color: "#f0f0f0", }, "& .MuiInputBase-input::placeholder": { + fontFamily: constants.fontFamilyFuturistic, + fontSize: constants.fontSizeSmall, color: "#bebebe", - fontSize: "0.8rem", }, }} /> diff --git a/src/components/Skeletons/BenchmarkSkeleton.tsx b/src/components/Skeletons/BenchmarkSkeleton.tsx index 20b977cf24..5bdf22ef75 100644 --- a/src/components/Skeletons/BenchmarkSkeleton.tsx +++ b/src/components/Skeletons/BenchmarkSkeleton.tsx @@ -1,14 +1,8 @@ import React from "react"; -import ContentLoader from "react-content-loader"; +import { LoadingOverlayUpper30 } from "../LoadingOverlay"; const BenchmarkSkeleton = (props: any) => ( - - - - - - - + ); export default BenchmarkSkeleton; diff --git a/src/components/Skeletons/DurationsSkeleton.tsx b/src/components/Skeletons/DurationsSkeleton.tsx index c83f9695aa..197401c587 100644 --- a/src/components/Skeletons/DurationsSkeleton.tsx +++ b/src/components/Skeletons/DurationsSkeleton.tsx @@ -1,30 +1,8 @@ import React from "react"; -import ContentLoader from "react-content-loader"; +import { LoadingOverlayUpper30 } from "../LoadingOverlay"; const DurationsSkeleton = (props: any) => ( - - - - - - - - - - - - - - - - - - - - - - - + ); export default DurationsSkeleton; diff --git a/src/components/Skeletons/MatchupsSkeleton.tsx b/src/components/Skeletons/MatchupsSkeleton.tsx index 3f6d1f0a68..ca250e022c 100644 --- a/src/components/Skeletons/MatchupsSkeleton.tsx +++ b/src/components/Skeletons/MatchupsSkeleton.tsx @@ -1,14 +1,8 @@ import React from "react"; -import ContentLoader from "react-content-loader"; +import { LoadingOverlayUpper30 } from "../LoadingOverlay"; const MatchupsSkeleton = (props: any) => ( - - - - - - - + ); export default MatchupsSkeleton; diff --git a/src/components/Skeletons/PlayersSkeleton.tsx b/src/components/Skeletons/PlayersSkeleton.tsx index fcf401bd2f..f21f1a8681 100644 --- a/src/components/Skeletons/PlayersSkeleton.tsx +++ b/src/components/Skeletons/PlayersSkeleton.tsx @@ -1,14 +1,11 @@ import React from "react"; -import ContentLoader from "react-content-loader"; +import { LoadingOverlayUpper30 } from "../LoadingOverlay"; -const PlayersSkeleton = (props: any) => ( - - - - - - - -); +type PlayersSkeletonProps = { + loadingText?: string; +}; +const PlayersSkeleton = ({ + loadingText = "Loading...", +}: PlayersSkeletonProps) => ; export default PlayersSkeleton; diff --git a/src/components/Skeletons/RankingSkeleton.tsx b/src/components/Skeletons/RankingSkeleton.tsx index 7cd1f348a4..900eac5e2c 100644 --- a/src/components/Skeletons/RankingSkeleton.tsx +++ b/src/components/Skeletons/RankingSkeleton.tsx @@ -2,7 +2,7 @@ import React from "react"; import { LoadingOverlayUpper30 } from "../LoadingOverlay"; const RankingSkeleton = (props: any) => ( - + ); export default RankingSkeleton; diff --git a/src/components/Skeletons/RecentSkeleton.tsx b/src/components/Skeletons/RecentSkeleton.tsx index 5ad5a5618e..1feec1cb28 100644 --- a/src/components/Skeletons/RecentSkeleton.tsx +++ b/src/components/Skeletons/RecentSkeleton.tsx @@ -1,14 +1,8 @@ import React from "react"; -import ContentLoader from "react-content-loader"; +import { LoadingOverlayUpper30 } from "../LoadingOverlay"; const RecentSkeleton = (props: any) => ( - - - - - - - + ); export default RecentSkeleton; diff --git a/src/components/Spinner/Spinner.tsx b/src/components/Spinner/Spinner.tsx index b63c61306a..27ebc9c9a8 100644 --- a/src/components/Spinner/Spinner.tsx +++ b/src/components/Spinner/Spinner.tsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from "react"; +import React from "react"; import { CircularProgress } from "@mui/material"; import styled from "styled-components"; import constants from "../constants"; @@ -24,13 +24,14 @@ const SpinnerContainer = styled.div` `; const SpinnerText = styled.span` - font-size: 0.8rem; + font-family: ${constants.fontFamilyFuturistic}; + font-size: ${constants.fontSizeSmall}; letter-spacing: 0.05em; color: ${constants.colorBlue}; `; const Spinner = ({ - size = 32, + size = 24, text, }: { size?: number; diff --git a/src/components/Subscription/Subscription.tsx b/src/components/Subscription/Subscription.tsx index a419a2788f..3a63c202f1 100644 --- a/src/components/Subscription/Subscription.tsx +++ b/src/components/Subscription/Subscription.tsx @@ -16,6 +16,7 @@ const stripePromise = config.VITE_STRIPE_PUBLIC_KEY const PageContainer = styled.div` width: 80%; margin: 0 auto; + font-family: ${constants.fontFamilyFuturistic}; @media only screen and (max-width: 768px) { width: 100%; @@ -42,7 +43,7 @@ const SubHeader = styled.div` const BannerTitle = styled.h1` margin: 48px 0 8px; - font-family: ${constants.fontFamilySerif}; + font-family: ${constants.fontFamilyFuturistic}; font-size: 2.25rem; font-weight: 400; letter-spacing: 0.02em; @@ -97,7 +98,7 @@ const SubRight = styled.div` `; const ThankYouTitle = styled.h4` - font-family: ${constants.fontFamilySerif}; + font-family: ${constants.fontFamilyFuturistic}; font-weight: 400; `; @@ -211,7 +212,7 @@ const Subscription = ({ )} {!user && (