update prettier config, add @kichiyaki/roboto

This commit is contained in:
Dawid Wysokiński 2021-01-04 18:03:27 +01:00
parent 4a4003eff6
commit 970b8cf033
11 changed files with 68 additions and 63 deletions

View File

@ -1,4 +1,4 @@
{ {
"arrowParens": "avoid", "arrowParens": "avoid",
"semi": false "semi": true
} }

View File

@ -1,7 +1 @@
/** import "@kichiyaki/roboto";
* Implement Gatsby's Browser APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/browser-apis/
*/
// You can delete this file if you're not using it

View File

@ -1,6 +1,6 @@
const baseUrl = "tribalwarshelp.com" const baseUrl = "tribalwarshelp.com";
const siteUrl = "https://" + baseUrl const siteUrl = "https://" + baseUrl;
const apiUrl = "https://api." + baseUrl const apiUrl = "https://api." + baseUrl;
module.exports = { module.exports = {
siteMetadata: { siteMetadata: {
@ -37,7 +37,12 @@ module.exports = {
icon: `src/images/icon.svg`, // This path is relative to the root of the site. icon: `src/images/icon.svg`, // This path is relative to the root of the site.
}, },
}, },
`gatsby-theme-material-ui`, {
resolve: `gatsby-theme-material-ui`,
options: {
webFontsConfig: null,
},
},
`gatsby-plugin-sitemap`, `gatsby-plugin-sitemap`,
{ {
resolve: "gatsby-plugin-robots-txt", resolve: "gatsby-plugin-robots-txt",
@ -66,4 +71,4 @@ module.exports = {
}, },
}, },
], ],
} };

View File

@ -5,6 +5,7 @@
"version": "0.1.0", "version": "0.1.0",
"author": "Dawid Wysokiński <dawidwysokinski000@gmail.com>", "author": "Dawid Wysokiński <dawidwysokinski000@gmail.com>",
"dependencies": { "dependencies": {
"@kichiyaki/roboto": "^1.0.0",
"@material-ui/core": "^4.11.0", "@material-ui/core": "^4.11.0",
"@material-ui/icons": "^4.9.1", "@material-ui/icons": "^4.9.1",
"@material-ui/styles": "^4.10.0", "@material-ui/styles": "^4.10.0",

View File

@ -1,12 +1,12 @@
import React from "react" import React from "react";
import { Link as GatsbyLink } from "gatsby" import { Link as GatsbyLink } from "gatsby";
import { Link as MUILink } from "@material-ui/core" import { Link as MUILink } from "@material-ui/core";
function Link({ href, to, ...rest }) { function Link({ href, to, ...rest }) {
if (to) { if (to) {
return <MUILink component={GatsbyLink} to={to} {...rest} /> return <MUILink component={GatsbyLink} to={to} {...rest} />;
} }
return <MUILink href={href} {...rest} /> return <MUILink href={href} {...rest} />;
} }
export default Link export default Link;

View File

@ -5,11 +5,11 @@
* See: https://www.gatsbyjs.org/docs/use-static-query/ * See: https://www.gatsbyjs.org/docs/use-static-query/
*/ */
import React from "react" import React from "react";
import PropTypes from "prop-types" import PropTypes from "prop-types";
import { Helmet } from "react-helmet" import { Helmet } from "react-helmet";
import { useStaticQuery, graphql } from "gatsby" import { useStaticQuery, graphql } from "gatsby";
import seoBG from "@images/seo-bg.png" import seoBG from "@images/seo-bg.png";
function SEO({ description, lang, meta, title, pathname }) { function SEO({ description, lang, meta, title, pathname }) {
const { site } = useStaticQuery( const { site } = useStaticQuery(
@ -24,9 +24,9 @@ function SEO({ description, lang, meta, title, pathname }) {
} }
} }
` `
) );
const metaDescription = description || site.siteMetadata.description const metaDescription = description || site.siteMetadata.description;
return ( return (
<Helmet <Helmet
@ -107,20 +107,20 @@ function SEO({ description, lang, meta, title, pathname }) {
content={`${site.siteMetadata.siteUrl}${pathname}`} content={`${site.siteMetadata.siteUrl}${pathname}`}
></link> ></link>
</Helmet> </Helmet>
) );
} }
SEO.defaultProps = { SEO.defaultProps = {
lang: `en`, lang: `en`,
meta: [], meta: [],
description: ``, description: ``,
} };
SEO.propTypes = { SEO.propTypes = {
description: PropTypes.string, description: PropTypes.string,
lang: PropTypes.string, lang: PropTypes.string,
meta: PropTypes.arrayOf(PropTypes.object), meta: PropTypes.arrayOf(PropTypes.object),
title: PropTypes.string.isRequired, title: PropTypes.string.isRequired,
} };
export default SEO export default SEO;

View File

@ -1,9 +1,9 @@
import { createMuiTheme, responsiveFontSizes } from "@material-ui/core/styles" import { createMuiTheme, responsiveFontSizes } from "@material-ui/core/styles";
const theme = createMuiTheme({ const theme = createMuiTheme({
palette: { palette: {
type: "dark", type: "dark",
}, },
}) });
export default responsiveFontSizes(theme) export default responsiveFontSizes(theme);

View File

@ -1,8 +1,8 @@
import React from "react" import React from "react";
import { Typography, Box, Container } from "@material-ui/core" import { Typography, Box, Container } from "@material-ui/core";
import { Link } from "gatsby-theme-material-ui" import { Link } from "gatsby-theme-material-ui";
import SEO from "../components/SEO" import SEO from "../components/SEO";
const NotFoundPage = ({ location }) => ( const NotFoundPage = ({ location }) => (
<Box <Box
@ -24,6 +24,6 @@ const NotFoundPage = ({ location }) => (
</Typography> </Typography>
</Container> </Container>
</Box> </Box>
) );
export default NotFoundPage export default NotFoundPage;

View File

@ -1,10 +1,10 @@
import React from "react" import React from "react";
import { useStaticQuery, graphql } from "gatsby" import { useStaticQuery, graphql } from "gatsby";
import { makeStyles } from "@material-ui/core/styles" import { makeStyles } from "@material-ui/core/styles";
import { Typography, Button, Box, Container } from "@material-ui/core" import { Typography, Button, Box, Container } from "@material-ui/core";
import SEO from "../components/SEO" import SEO from "../components/SEO";
import Link from "../components/Link" import Link from "../components/Link";
const LinkButton = ({ children, href, to }) => { const LinkButton = ({ children, href, to }) => {
return ( return (
@ -13,8 +13,8 @@ const LinkButton = ({ children, href, to }) => {
<Typography variant="h4">{children}</Typography> <Typography variant="h4">{children}</Typography>
</Button> </Button>
</Link> </Link>
) );
} };
const useStyles = makeStyles(theme => ({ const useStyles = makeStyles(theme => ({
nav: { nav: {
@ -31,10 +31,10 @@ const useStyles = makeStyles(theme => ({
flexDirection: "column", flexDirection: "column",
}, },
}, },
})) }));
const IndexPage = ({ location }) => { const IndexPage = ({ location }) => {
const classes = useStyles() const classes = useStyles();
const { const {
site: { siteMetadata }, site: { siteMetadata },
@ -52,7 +52,7 @@ const IndexPage = ({ location }) => {
} }
} }
` `
) );
return ( return (
<Box <Box
@ -100,7 +100,7 @@ const IndexPage = ({ location }) => {
</footer> </footer>
</Container> </Container>
</Box> </Box>
) );
} };
export default IndexPage export default IndexPage;

View File

@ -1,5 +1,5 @@
import React from "react" import React from "react";
import { useStaticQuery, graphql } from "gatsby" import { useStaticQuery, graphql } from "gatsby";
import { import {
Box, Box,
@ -8,13 +8,13 @@ import {
Grid, Grid,
Container, Container,
Typography, Typography,
} from "@material-ui/core" } from "@material-ui/core";
import Link from "../components/Link" import Link from "../components/Link";
import SEO from "../components/SEO" import SEO from "../components/SEO";
const buildURLToVersionPage = (baseUrl, code) => { const buildURLToVersionPage = (baseUrl, code) => {
return `https://${code}.${baseUrl}` return `https://${code}.${baseUrl}`;
} };
function SupportedVersionsPage({ location }) { function SupportedVersionsPage({ location }) {
const { const {
@ -40,7 +40,7 @@ function SupportedVersionsPage({ location }) {
} }
} }
} }
`) `);
return ( return (
<Box <Box
@ -84,7 +84,7 @@ function SupportedVersionsPage({ location }) {
</Grid> </Grid>
</Container> </Container>
</Box> </Box>
) );
} }
export default SupportedVersionsPage export default SupportedVersionsPage;

View File

@ -1485,6 +1485,11 @@
core-js "^3.4.1" core-js "^3.4.1"
regenerator-runtime "^0.13.3" regenerator-runtime "^0.13.3"
"@kichiyaki/roboto@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@kichiyaki/roboto/-/roboto-1.0.0.tgz#6f5dfb40e2423940588946c952490b123ca8088b"
integrity sha512-4pfkzXOqtSWZvvkA6jI30h+y2vDOvhEavYo4O32C98jPk2zqIiFwd4SwiiFe9xzjQsPURqO89rUTZlChU255bQ==
"@material-ui/core@^4.11.0": "@material-ui/core@^4.11.0":
version "4.11.0" version "4.11.0"
resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.11.0.tgz#b69b26e4553c9e53f2bfaf1053e216a0af9be15a" resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.11.0.tgz#b69b26e4553c9e53f2bfaf1053e216a0af9be15a"