From 82db874c9c216ee9d1de2dc6eb5b50f94915249f Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Tue, 23 Mar 2021 22:34:47 +0300 Subject: [PATCH 1/8] Re-format --- gatsby-config.js | 1 + src/components/footer.js | 24 +- src/components/language.js | 54 +- src/components/layout.js | 29 +- src/components/navBar.js | 84 +- src/components/redirect.js | 4 +- src/components/seo.js | 90 +- src/components/templates/news.js | 133 +-- src/files/plotly.html | 1216 ++++++++++++++++++------- src/images/index/npm-logo-no-text.svg | 200 ++-- src/images/partners/JBR.svg | 577 ++++++------ src/images/partners/jetbrains.svg | 72 +- src/images/partners/mtl_logo.svg | 132 +-- src/intl/ru.json | 69 +- src/pages/404.js | 23 +- src/pages/about.js | 160 ++-- src/pages/partners.js | 167 ++-- src/pages/projects/education.js | 109 ++- src/pages/projects/physics.js | 94 +- src/pages/quarks.js | 70 +- src/styles/footer.css | 26 +- src/styles/layout.css | 132 +-- src/styles/main.css | 407 ++++++--- src/styles/navbar.css | 149 ++- static/admin/config.yml | 104 +-- 25 files changed, 2516 insertions(+), 1610 deletions(-) diff --git a/gatsby-config.js b/gatsby-config.js index d02ee8b..490b35d 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -49,6 +49,7 @@ module.exports = { icon: `src/images/icon.png`, // This path is relative to the root of the site. }, }, + `gatsby-plugin-netlify-cms`, { resolve: `gatsby-plugin-react-intl`, options: { diff --git a/src/components/footer.js b/src/components/footer.js index b89b667..f8bc199 100644 --- a/src/components/footer.js +++ b/src/components/footer.js @@ -3,18 +3,18 @@ import "../styles/footer.css" const Footer = () => ( - ) +) export default Footer \ No newline at end of file diff --git a/src/components/language.js b/src/components/language.js index 7d7e434..05e42a2 100644 --- a/src/components/language.js +++ b/src/components/language.js @@ -2,36 +2,36 @@ import React from "react" import {changeLocale, IntlContextConsumer} from "gatsby-plugin-react-intl" const languageName = { - ru: "Russian", - en: "English", + ru: "Russian", + en: "English", } const Language = () => { - return ( -
- - {({ languages, language: currentLocale }) => - languages.map(language => ( - changeLocale(language)} - style={{ - color: currentLocale === language ? `white` : `rgb(170,172,173)`, - backgroundColor: currentLocale === language ? `#db4446`: ``, - marginLeft: -11, - margin: 10, - cursor: `pointer`, - opacity: 1 - }} - > - {languageName[language]} - - )) - } - -
- ) + return ( +
+ + {({languages, language: currentLocale}) => + languages.map(language => ( + changeLocale(language)} + style={{ + color: currentLocale === language ? `white` : `rgb(170,172,173)`, + backgroundColor: currentLocale === language ? `#db4446` : ``, + marginLeft: -11, + margin: 10, + cursor: `pointer`, + opacity: 1 + }} + > + {languageName[language]} + + )) + } + +
+ ) } export default Language diff --git a/src/components/layout.js b/src/components/layout.js index 49d4d38..0398f92 100644 --- a/src/components/layout.js +++ b/src/components/layout.js @@ -10,22 +10,23 @@ import "../styles/layout.css" import "../styles/main.css" import "katex/dist/katex.min.css" -const Layout = ({ children }) => { - const intl = useIntl(); - const lang = intl.locale; - return ( - <> - - -
-
{children}
-
-