From 9a3bbde7f0499c47cf7b734660e0c1975f83c871 Mon Sep 17 00:00:00 2001 From: Kichiyaki Date: Wed, 15 Jul 2020 12:36:24 +0200 Subject: [PATCH] move theme.js to src/gatsby-theme-material-ui-top-layout | add new command showennobledbarbs --- gatsby-config.js | 4 ++-- nginx.conf | 2 +- src/components/Layout/Layout.js | 9 ++++----- src/features/CommandsPage/commands.en.js | 15 +++++++++++---- src/features/CommandsPage/commands.pl.js | 7 +++++++ src/features/IndexPage/translations.en.js | 2 +- .../theme.js | 2 +- 7 files changed, 27 insertions(+), 14 deletions(-) rename src/{components/Layout => gatsby-theme-material-ui-top-layout}/theme.js (97%) diff --git a/gatsby-config.js b/gatsby-config.js index 913b0fb..60607bb 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -27,8 +27,8 @@ module.exports = { name: `Tribal Wars Bot`, short_name: `twdcbot`, start_url: `/`, - background_color: `#330033`, - theme_color: `#330033`, + background_color: `#303032`, + theme_color: `#303032`, display: `minimal-ui`, icon: `src/images/icon.svg`, // This path is relative to the root of the site. }, diff --git a/nginx.conf b/nginx.conf index 7def831..26b277b 100644 --- a/nginx.conf +++ b/nginx.conf @@ -41,7 +41,7 @@ http { } # Javascript and CSS files - location ~* \.(?:css|js)$ { + location ~* \.(?:css|js|woff2)$ { try_files $uri =404; expires 1y; access_log off; diff --git a/src/components/Layout/Layout.js b/src/components/Layout/Layout.js index 7e5c96e..f578ce1 100644 --- a/src/components/Layout/Layout.js +++ b/src/components/Layout/Layout.js @@ -1,12 +1,11 @@ -import React from "react"; +import React, { Fragment } from "react"; import PropTypes from "prop-types"; import { useStaticQuery, graphql } from "gatsby"; -import { ThemeProvider, makeStyles } from "@material-ui/core/styles"; +import { makeStyles } from "@material-ui/core/styles"; import { CssBaseline } from "@material-ui/core"; import Header from "./Header"; import Footer from "./Footer"; -import theme from "./theme"; const useStyles = makeStyles(theme => ({ main: { @@ -45,7 +44,7 @@ const Layout = ({ ); return ( - + {showHeader && (
{showFooter &&