Skip to content

Commit

Permalink
Merge pull request #281 from tolgee/develop
Browse files Browse the repository at this point in the history
Update logo, font and images
  • Loading branch information
JanCizmar authored Mar 4, 2021
2 parents 2b1aa31 + 7fbc913 commit 75fbeab
Show file tree
Hide file tree
Showing 13 changed files with 21,689 additions and 156 deletions.
21,644 changes: 21,626 additions & 18 deletions webapp/package-lock.json

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"main": "dist/index.js",
"sideEffects": false,
"scripts": {
"start": "webpack-dev-server --env mode=development --hot",
"startProd": "webpack-dev-server --env mode=production",
"start": "webpack serve --env mode=development --hot",
"startProd": "webpack serve --env mode=production",
"build": "webpack --env mode=production",
"watch": "webpack --watch",
"test": "jest",
Expand All @@ -16,9 +16,9 @@
"author": "Jan Cizmar",
"license": "BSD",
"dependencies": {
"@sentry/browser": "^6.2.1",
"@tolgee/react": "^1.0.0-alpha.31",
"@tolgee/ui": "^1.0.0-alpha.31",
"@sentry/browser": "^6.2.1",
"@types/yup": "^0.29.11",
"clsx": "^1.1.1",
"formik": "^2.2.6",
Expand Down Expand Up @@ -85,7 +85,6 @@
"typescript": "^4.1.5",
"webpack": "^5.24.2",
"webpack-bundle-analyzer": "^4.4.0",
"webpack-conditional-loader": "^1.0.12",
"webpack-dev-server": "^3.11.2"
"webpack-conditional-loader": "^1.0.12"
}
}
4 changes: 2 additions & 2 deletions webapp/src/component/common/EmptyListMessage.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {default as React, FunctionComponent} from 'react';

import {SadGoatMessage} from "./SadGoatMessage";
import {SadEmotionMessage} from "./SadEmotionMessage";
import {Box} from "@material-ui/core";
import {T} from '@tolgee/react';

export const EmptyListMessage: FunctionComponent = (props) => {
return <Box p={8}><SadGoatMessage>{props.children || <T>global_empty_list_message</T>}</SadGoatMessage></Box>
return <Box p={8}><SadEmotionMessage>{props.children || <T>global_empty_list_message</T>}</SadEmotionMessage></Box>
};
4 changes: 2 additions & 2 deletions webapp/src/component/common/GlobalError.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Box from '@material-ui/core/Box';
import Typography from '@material-ui/core/Typography';
import Container from '@material-ui/core/Container';
import {GlobalError as GlobalErrorError} from "../../error/GlobalError";
import {SadGoatMessage} from "./SadGoatMessage";
import {SadEmotionMessage} from "./SadEmotionMessage";
import {GlobalActions} from "../../store/global/globalActions";
import {container} from "tsyringe";

Expand All @@ -23,7 +23,7 @@ export default function GlobalError(props: { error: GlobalErrorError }) {

{!dev &&
<Box>
<SadGoatMessage>{null}</SadGoatMessage>
<SadEmotionMessage>{null}</SadEmotionMessage>
</Box>}

{props.error.publicInfo &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import makeStyles from '@material-ui/core/styles/makeStyles';
import createStyles from "@material-ui/core/styles/createStyles";
import {Theme, Typography} from "@material-ui/core";
import Box from "@material-ui/core/Box";
import SadGoat from '../../svgs/sadGoat.svg'

const useStyles = makeStyles((theme: Theme) =>
createStyles({
Expand All @@ -17,14 +16,14 @@ const useStyles = makeStyles((theme: Theme) =>
}),
);

export const SadGoatMessage: FunctionComponent<{ children: ReactNode }> = (props) => {
export const SadEmotionMessage: FunctionComponent<{ children: ReactNode }> = (props) => {
const classes = useStyles({});

return (
<>
<Box display="flex" justifyContent="center" flexDirection="column" alignItems="center">
<Box className={classes.goat}>
<SadGoat width={200}/>
<Box className={classes.goat} style={{fontSize: "200px"}}>
😢
</Box>
{props.children &&
<Box p={4} className={classes.text}>
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/component/layout/TopBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function TopBar(props: TopBarProps) {
<Box pr={1} display="flex" justifyItems="center">
<TolgeeLogo fontSize="large"/>
</Box>
<Typography variant="h6" color="inherit">
<Typography variant="h6" color="inherit" style={{fontFamily: "Righteous, Rubik, Arial"}}>
Tolgee
</Typography>
</Box>
Expand Down
Binary file not shown.
Binary file added webapp/src/fonts/Righteous/righteous-latin.woff2
Binary file not shown.
46 changes: 38 additions & 8 deletions webapp/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ import {container} from 'tsyringe';
import {dispatchService} from './service/dispatchService';

import ErrorBoundary from "./component/ErrorBoundary";
import RubikTTf from './fonts/Rubik/Rubik-Regular.woff2';
import {blue, red} from "@material-ui/core/colors";
import RubikWoff2 from './fonts/Rubik/Rubik-Regular.woff2';
import RighteousLatinWoff2 from './fonts/Righteous/righteous-latin.woff2';
import RighteousLatinExtWoff2 from './fonts/Righteous/righteous-latin-ext.woff2';

import {createMuiTheme, ThemeProvider} from '@material-ui/core/styles';
import {TolgeeProvider} from "@tolgee/react";
import {UI} from "@tolgee/ui";
Expand All @@ -28,38 +30,66 @@ const SnackbarProvider = React.lazy(() => import(/* webpackChunkName: "notistack

container.resolve(dispatchService).store = store;

const raleway = {
const rubik = {
fontFamily: 'Rubik',
fontStyle: 'normal',
fontDisplay: 'swap',
fontWeight: 400,
src: `
local('Rubik'),
local('Rubik-Regular'),
url(${RubikTTf}) format('woff2')
url(${RubikWoff2}) format('woff2')
`,
unicodeRange:
'U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF',
};


const righteousLatin = {
fontFamily: 'Righteous',
fontStyle: 'normal',
fontDisplay: 'swap',
fontWeight: 400,
src: `
local('Righteous'),
local('Righteous-Regular'),
url(${RighteousLatinWoff2}) format('woff2')
`,
unicodeRange:
"U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD"
};

const righteousLatinExt = {
fontFamily: 'Righteous',
fontStyle: 'normal',
fontDisplay: 'swap',
fontWeight: 400,
src: `
local('Righteous'),
local('Righteous-Regular'),
url(${RighteousLatinExtWoff2}) format('woff2')
`,
unicodeRange: "U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF"
};

const theme = createMuiTheme({
typography: {
fontFamily: 'Rubik, Arial',
},
palette: {
primary: {
main: blue['600'],
main: "#822B55"
},
secondary: {
main: red['300'],
},
main: "#2B5582"
}
},
overrides: {
MuiCssBaseline: {
// @ts-ignore
'@global': {
// @ts-ignore
'@font-face': [raleway],
'@font-face': [rubik, righteousLatinExt, righteousLatin]
},
},
MuiButton: {
Expand Down
62 changes: 0 additions & 62 deletions webapp/src/svgs/happyGoat.svg

This file was deleted.

Loading

0 comments on commit 75fbeab

Please sign in to comment.