diff --git a/.babelrc b/.babelrc index b9ce499..b26c4fe 100644 --- a/.babelrc +++ b/.babelrc @@ -6,7 +6,7 @@ { "@": ["./src"], "alias": { - "@components": "./src/components", + "@common": "./src/common", "@config": "./src/config", "@features": "./src/features", "@images": "./src/images", diff --git a/gatsby-config.js b/gatsby-config.js index 79ddc9c..a0cb5fa 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -9,7 +9,8 @@ module.exports = { dcbotUrl: 'https://dcbot.' + baseUrl, apiUrl, author: 'Dawid WysokiƄski', - contactUrl: 'http://dwysokinski.me/#contact', + authorEmail: 'contact@dwysokinski.me', + contactUrl: 'https://dwysokinski.me/#contact', scriptsUrl: 'https://github.com/tribalwarshelp/scripts', siteUrl, baseUrl, diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..4264767 --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@/*": ["src/*"], + "@common/*": ["src/common/*"], + "@config/*": ["src/config/*"], + "@features/*": ["src/features/*"], + "@images/*": ["src/images/*"] + } + }, + "exclude": ["node_modules"] +} diff --git a/src/common/Layout.js b/src/common/Layout.js new file mode 100644 index 0000000..27dcd9b --- /dev/null +++ b/src/common/Layout.js @@ -0,0 +1,18 @@ +import React from 'react'; +import { Box } from '@material-ui/core'; + +const Layout = ({ children }) => { + return ( + + {children} + + ); +}; + +export default Layout; diff --git a/src/components/Link.js b/src/common/Link.js similarity index 100% rename from src/components/Link.js rename to src/common/Link.js diff --git a/src/components/Seo.js b/src/common/Seo.js similarity index 99% rename from src/components/Seo.js rename to src/common/Seo.js index 78adf15..d8e5a61 100644 --- a/src/components/Seo.js +++ b/src/common/Seo.js @@ -67,7 +67,7 @@ function Seo({ description, lang, meta, title, pathname }) { }, { property: `og:locale`, - content: `pl`, + content: `en`, }, { name: `twitter:card`, diff --git a/src/config/routing.js b/src/config/routing.js new file mode 100644 index 0000000..de8623f --- /dev/null +++ b/src/config/routing.js @@ -0,0 +1,4 @@ +export const Route = { + IndexPage: '/', + SupportedVersions: '/supported-versions/', +}; diff --git a/src/pages/404.js b/src/pages/404.js index 7148a0c..1e11b06 100644 --- a/src/pages/404.js +++ b/src/pages/404.js @@ -1,28 +1,22 @@ import React from 'react'; - -import { Typography, Box, Container } from '@material-ui/core'; +import { Route } from '@config/routing'; +import { Typography, Container } from '@material-ui/core'; import { Link } from 'gatsby-theme-material-ui'; -import Seo from '../components/Seo'; +import Seo from '@common/Seo'; +import Layout from '@common/Layout'; const NotFoundPage = ({ location }) => ( - + - + Page not found - - Back to our site + + Back to our site - + ); export default NotFoundPage; diff --git a/src/pages/index.js b/src/pages/index.js index d63d3be..07b5d8b 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -1,10 +1,12 @@ import React from 'react'; -import { useStaticQuery, graphql } from 'gatsby'; +import { graphql, useStaticQuery } from 'gatsby'; +import { Route } from '@config/routing'; import { makeStyles } from '@material-ui/core/styles'; -import { Typography, Button, Box, Container } from '@material-ui/core'; -import Seo from '../components/Seo'; -import Link from '../components/Link'; +import { Button, Container, Typography } from '@material-ui/core'; +import Seo from '@common/Seo'; +import Link from '@common/Link'; +import Layout from '@common/Layout'; const LinkButton = ({ children, href, to }) => { return ( @@ -31,6 +33,9 @@ const useStyles = makeStyles(theme => ({ flexDirection: 'column', }, }, + container: { + textAlign: 'center', + }, })); const IndexPage = ({ location }) => { @@ -46,6 +51,7 @@ const IndexPage = ({ location }) => { dcbotUrl apiUrl author + authorEmail contactUrl scriptsUrl } @@ -55,17 +61,9 @@ const IndexPage = ({ location }) => { ); return ( - + - +
TWHelp @@ -79,7 +77,7 @@ const IndexPage = ({ location }) => { Discord Bot
- + Stat tracking website
@@ -89,17 +87,17 @@ const IndexPage = ({ location }) => {
Contact
- - More coming soon... -
- © {new Date().getFullYear()} {siteMetadata.author} + © {new Date().getFullYear()}{' '} + + {siteMetadata.author} +
- + ); }; diff --git a/src/pages/supported-versions.js b/src/pages/supported-versions.js index 0e414df..3d1fc94 100644 --- a/src/pages/supported-versions.js +++ b/src/pages/supported-versions.js @@ -1,16 +1,17 @@ import React from 'react'; -import { useStaticQuery, graphql } from 'gatsby'; +import { graphql, useStaticQuery } from 'gatsby'; +import { Route } from '@config/routing'; import { - Box, Card, CardHeader, - Grid, Container, + Grid, Typography, } from '@material-ui/core'; -import Link from '../components/Link'; -import Seo from '../components/Seo'; +import Link from '@common/Link'; +import Seo from '@common/Seo'; +import Layout from '@common/Layout'; const buildURLToVersionPage = (baseUrl, code) => { return `https://${code}.${baseUrl}`; @@ -43,19 +44,12 @@ function SupportedVersionsPage({ location }) { `); return ( - +
- TWHelp + TWHelp Supported versions @@ -77,7 +71,7 @@ function SupportedVersionsPage({ location }) { ))} - + ); }