Migrate to gatsby 3
This commit is contained in:
parent
7ab78ee5b9
commit
73db17d161
122
gatsby-config.js
122
gatsby-config.js
@ -1,65 +1,63 @@
|
||||
module.exports = {
|
||||
siteMetadata: {
|
||||
title: `MIPT-NPM laboratory`,
|
||||
description: `Nuclear Physics Methods Laboratory`,
|
||||
},
|
||||
siteMetadata: {
|
||||
title: `MIPT-NPM laboratory`,
|
||||
description: `Nuclear Physics Methods Laboratory`,
|
||||
},
|
||||
|
||||
plugins: [
|
||||
`gatsby-plugin-sharp`,
|
||||
`gatsby-transformer-sharp`,
|
||||
{
|
||||
resolve: `gatsby-transformer-remark`,
|
||||
options: {
|
||||
plugins: [
|
||||
'gatsby-remark-katex',
|
||||
'gatsby-remark-relative-images',
|
||||
{
|
||||
resolve: 'gatsby-remark-images',
|
||||
options: {
|
||||
maxWidth: 100
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
`gatsby-plugin-catch-links`,
|
||||
`gatsby-plugin-react-helmet`,
|
||||
{
|
||||
resolve: 'gatsby-source-filesystem',
|
||||
options: {
|
||||
path: `${__dirname}/src/images`,
|
||||
name: 'images',
|
||||
},
|
||||
},
|
||||
{
|
||||
resolve: `gatsby-source-filesystem`,
|
||||
options: {
|
||||
name: `content`,
|
||||
path: `${__dirname}/src/content`,
|
||||
},
|
||||
},
|
||||
{
|
||||
resolve: `gatsby-plugin-manifest`,
|
||||
options: {
|
||||
name: `NPM group`,
|
||||
short_name: `npm`,
|
||||
lang: `ru`,
|
||||
start_url: `/`,
|
||||
// start_url: `/new`,
|
||||
display: `minimal-ui`,
|
||||
icon: `src/images/icon.png`, // This path is relative to the root of the site.
|
||||
},
|
||||
},
|
||||
`gatsby-plugin-netlify-cms`,
|
||||
{
|
||||
resolve: `gatsby-plugin-intl`,
|
||||
options: {
|
||||
path: `${__dirname}/src/intl`,
|
||||
languages: [`ru`, `en`],
|
||||
defaultLanguage: `ru`,
|
||||
redirect: true,
|
||||
redirectComponent: require.resolve(`./src/components/redirect.js`),
|
||||
},
|
||||
},
|
||||
],
|
||||
plugins: [
|
||||
{
|
||||
resolve: 'gatsby-source-filesystem',
|
||||
options: {
|
||||
path: `${__dirname}/src/images`,
|
||||
name: 'images',
|
||||
},
|
||||
},
|
||||
{
|
||||
resolve: `gatsby-source-filesystem`,
|
||||
options: {
|
||||
name: `content`,
|
||||
path: `${__dirname}/src/content`,
|
||||
},
|
||||
},
|
||||
`gatsby-plugin-sharp`,
|
||||
`gatsby-transformer-sharp`,
|
||||
{
|
||||
resolve: `gatsby-transformer-remark`,
|
||||
options: {
|
||||
plugins: [
|
||||
'gatsby-remark-katex',
|
||||
{
|
||||
resolve: 'gatsby-remark-images',
|
||||
options: {
|
||||
maxWidth: 100
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
`gatsby-plugin-catch-links`,
|
||||
`gatsby-plugin-react-helmet`,
|
||||
{
|
||||
resolve: `gatsby-plugin-manifest`,
|
||||
options: {
|
||||
name: `NPM group`,
|
||||
short_name: `npm`,
|
||||
lang: `ru`,
|
||||
start_url: `/`,
|
||||
// start_url: `/new`,
|
||||
display: `minimal-ui`,
|
||||
icon: `src/images/icon.png`, // This path is relative to the root of the site.
|
||||
},
|
||||
},
|
||||
{
|
||||
resolve: `gatsby-plugin-react-intl`,
|
||||
options: {
|
||||
path: `${__dirname}/src/intl`,
|
||||
languages: [`ru`, `en`],
|
||||
defaultLanguage: `ru`,
|
||||
redirect: true,
|
||||
redirectComponent: require.resolve(`./src/components/redirect.js`),
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
62804
package-lock.json
generated
62804
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
63
package.json
63
package.json
@ -4,50 +4,51 @@
|
||||
"description": "Nuclear Physics Methods laboratory",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"@types/bootstrap": "4.5.0",
|
||||
"bootstrap": "4.5.3",
|
||||
"gatsby": "2.30.3",
|
||||
"@types/bootstrap": "5.0.9",
|
||||
"bootstrap": "4.6.0",
|
||||
"gatsby": "3.1.1",
|
||||
"gatsby-awesome-pagination": "0.3.6",
|
||||
"gatsby-cli": "2.19.1",
|
||||
"gatsby-plugin-catch-links": "2.8.0",
|
||||
"gatsby-plugin-intl": "0.3.3",
|
||||
"gatsby-plugin-manifest": "2.10.0",
|
||||
"gatsby-plugin-netlify-cms": "4.8.0",
|
||||
"gatsby-plugin-react-helmet": "3.8.0",
|
||||
"gatsby-plugin-sharp": "2.12.2",
|
||||
"gatsby-remark-images": "3.9.0",
|
||||
"gatsby-remark-katex": "3.8.0",
|
||||
"gatsby-remark-relative-images": "0.2.3",
|
||||
"gatsby-source-filesystem": "2.9.1",
|
||||
"gatsby-source-graphql": "2.12.0",
|
||||
"gatsby-transformer-remark": "2.14.0",
|
||||
"gatsby-transformer-sharp": "2.10.1",
|
||||
"html-react-parser": "1.2.1",
|
||||
"imagemin-pngquant": "9.0.1",
|
||||
"jquery": "3.5.1",
|
||||
"katex": "0.12.0",
|
||||
"mini-css-extract-plugin": "1.3.4",
|
||||
"gatsby-cli": "3.1.0",
|
||||
"gatsby-plugin-catch-links": "3.1.0",
|
||||
"gatsby-plugin-manifest": "3.1.0",
|
||||
"gatsby-plugin-netlify-cms": "5.1.0",
|
||||
"gatsby-plugin-react-helmet": "4.1.0",
|
||||
"gatsby-plugin-react-intl": "3.0.0",
|
||||
"gatsby-plugin-sharp": "3.1.1",
|
||||
"gatsby-remark-images": "4.1.0",
|
||||
"gatsby-remark-katex": "4.1.0",
|
||||
"gatsby-remark-relative-images": "2.0.2",
|
||||
"gatsby-source-filesystem": "3.1.0",
|
||||
"gatsby-source-graphql": "3.1.0",
|
||||
"gatsby-transformer-remark": "3.1.0",
|
||||
"gatsby-transformer-sharp": "3.1.0",
|
||||
"html-react-parser": "1.2.4",
|
||||
"imagemin-pngquant": "9.0.2",
|
||||
"jquery": "3.6.0",
|
||||
"katex": "0.13.0",
|
||||
"mini-css-extract-plugin": "1.3.9",
|
||||
"ncp": "2.0.0",
|
||||
"netlify-cms-app": "2.14.12",
|
||||
"netlify-cms-app": "2.14.32",
|
||||
"prop-types": "15.7.2",
|
||||
"react": "17.0.1",
|
||||
"react-bootstrap": "1.4.3",
|
||||
"react": "17.0.2",
|
||||
"react-bootstrap": "1.5.2",
|
||||
"react-helmet": "6.1.0",
|
||||
"redux": "4.0.5",
|
||||
"typescript": "4.1.3",
|
||||
"typescript": "4.2.3",
|
||||
"vertical-timeline-component-for-react": "1.0.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "10.2.1",
|
||||
"autoprefixer": "10.2.5",
|
||||
"clean-webpack-plugin": "3.0.0",
|
||||
"copy-webpack-plugin": "7.0.0",
|
||||
"copy-webpack-plugin": "8.1.0",
|
||||
"file-loader": "6.2.0",
|
||||
"html-webpack-plugin": "4.5.1",
|
||||
"html-webpack-plugin": "5.3.1",
|
||||
"imagemin-webpack-plugin": "2.4.2",
|
||||
"img-loader": "3.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"uglifyjs-webpack-plugin": "2.2.0",
|
||||
"webpack": "4.44.1",
|
||||
"webpack-cli": "3.3.12",
|
||||
"webpack": "5.27.2",
|
||||
"webpack-cli": "4.5.0",
|
||||
"webpack-dev-server": "3.11.2"
|
||||
},
|
||||
"keywords": [
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from "react"
|
||||
import { IntlContextConsumer, changeLocale } from "gatsby-plugin-intl"
|
||||
import {changeLocale, IntlContextConsumer} from "gatsby-plugin-react-intl"
|
||||
|
||||
const languageName = {
|
||||
ru: "Russian",
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import PropTypes from "prop-types"
|
||||
import { injectIntl, useIntl } from "gatsby-plugin-intl"
|
||||
import {injectIntl, useIntl} from "gatsby-plugin-react-intl"
|
||||
|
||||
import Navbar from "./navBar"
|
||||
import Footer from "./footer"
|
||||
|
@ -1,17 +1,15 @@
|
||||
import React from "react"
|
||||
import { Link } from "gatsby"
|
||||
import { globalHistory as history } from '@reach/router'
|
||||
import {Link} from "gatsby"
|
||||
import {globalHistory as history} from '@reach/router'
|
||||
|
||||
import { FormattedMessage, useIntl, injectIntl } from "gatsby-plugin-intl"
|
||||
import { Container } from "react-bootstrap"
|
||||
import {FormattedMessage, injectIntl, useIntl} from "gatsby-plugin-react-intl"
|
||||
import {Container, Nav, Navbar} from "react-bootstrap"
|
||||
import Language from "./language"
|
||||
import SEO from "./seo"
|
||||
|
||||
import "../styles/navbar.css"
|
||||
import logo from "../images/index/logo_white.png"
|
||||
|
||||
import { Navbar, Nav } from "react-bootstrap"
|
||||
|
||||
const CustomNavbar = () => {
|
||||
const { location } = history;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from "react"
|
||||
import { injectIntl } from "gatsby-plugin-intl"
|
||||
import {injectIntl} from "gatsby-plugin-react-intl"
|
||||
import SEO from "./seo"
|
||||
|
||||
const Redirect = ({ intl }) => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import {graphql} from "gatsby"
|
||||
import {injectIntl, Link, useIntl} from "gatsby-plugin-intl"
|
||||
import {injectIntl, Link, useIntl} from "gatsby-plugin-react-intl"
|
||||
import Parser from "html-react-parser"
|
||||
|
||||
import SEO from "../seo"
|
||||
|
@ -1,9 +1,9 @@
|
||||
import React from 'react'
|
||||
import { graphql } from 'gatsby'
|
||||
import { Link, useIntl, injectIntl } from "gatsby-plugin-intl"
|
||||
import {graphql} from 'gatsby'
|
||||
import {injectIntl, Link, useIntl} from "gatsby-plugin-react-intl"
|
||||
import Parser from "html-react-parser"
|
||||
|
||||
import { Timeline, TimelineItem } from 'vertical-timeline-component-for-react'
|
||||
import {Timeline, TimelineItem} from 'vertical-timeline-component-for-react'
|
||||
|
||||
import Navbar from "../navBar"
|
||||
import Footer from "../footer"
|
||||
|
@ -2,57 +2,61 @@
|
||||
"title": "NPM GROUP",
|
||||
"language": "en",
|
||||
"description": "Nuclear physics methods laboratory",
|
||||
"header": {
|
||||
"news": "News",
|
||||
"group": "Laboratory",
|
||||
"projects": "Projects",
|
||||
"partners": "Partners" },
|
||||
"header": {
|
||||
"news": "News",
|
||||
"group": "Laboratory",
|
||||
"projects": "Projects",
|
||||
"partners": "Partners"
|
||||
},
|
||||
"notfound": {
|
||||
"header": "NOT FOUND",
|
||||
"description": "You just hit a route that doesn't exist." },
|
||||
|
||||
"description": "You just hit a route that doesn't exist."
|
||||
},
|
||||
"jumbotron": {
|
||||
"labintro": "Nuclear physics methods laboratory",
|
||||
"lead": "Features of our approach to solving scientific problems of today: ",
|
||||
"list": "<ul><li>The laboratory was established on the basis of MIPT, which allows involving a large number of interested students.<\/li><li>By combining scientific work with educational process, we ensure continuity of scientific experience.<\/li><li>The structure of our laboratory allows even junior students to take part in world-class experiments.<\/li><li>We use the most modern methods in our work on physical experiments.<\/li><\/ul><p \/>",
|
||||
"about": "About our laboratory" },
|
||||
|
||||
"about": "About our laboratory"
|
||||
},
|
||||
"more": {
|
||||
"nuclear_title": "Nuclear physics",
|
||||
"nuclear_body": "The laboratory participates in several international particle physics experiments, such as the GERDA neutrine-free double beta decay experiment, the Troitsk nu-mass neutrino mass search experiment and so on.",
|
||||
"nuclear_more": "More »",
|
||||
|
||||
"nuclear_more": "More »",
|
||||
"education_title": "Education",
|
||||
"education_body": "The tasks of the laboratory include the development of new educational programs in physics and methods of physical experiment, as well as improving the existing methodological and information base in MIPT and in academic institutes.",
|
||||
"education_more": "More »",
|
||||
|
||||
"software_title": "Computational methods",
|
||||
"software_body": "One of the main activities is the development of computational methods and open source software for use in education and scientific activities.",
|
||||
"software_more": "More »",
|
||||
|
||||
"news": "Latest news" },
|
||||
|
||||
"news": "Latest news"
|
||||
},
|
||||
"about": {
|
||||
"title": "Nuclear physics methods group",
|
||||
"descr": "The group was created in 2015 on the basis of the Department of General Physics, MIPT, several laboratories of the INR RAS and with the support of the Laboratory of High Energy Physics, MIPT. The purpose of the creation is the development of methods for conducting and analyzing data from experiments in the field of particle physics and nuclear physics. In addition, members of the group are engaged in the implementation of modern information technologies in experimental physics and education.",
|
||||
"title": "Nuclear physics methods laboratory",
|
||||
"descr": "The group was created in 2015 on the basis of the Department of General Physics, MIPT, several laboratories of the INR RAS and with the support of the Laboratory of High Energy Physics, MIPT. The purpose of the creation is the development of methods for conducting and analyzing data from experiments in the field of particle physics and nuclear physics. In addition, members of the laboratory are engaged in the implementation of modern information technologies in experimental physics and education.",
|
||||
"pubs": {
|
||||
"title": "Publications",
|
||||
"available1": "Group`s publications are available at ",
|
||||
"available2": "this page" },
|
||||
"available2": "this page"
|
||||
},
|
||||
"contacts": {
|
||||
"title": "Contact information",
|
||||
"mail": "Email: ",
|
||||
"telegram": "Telegram: " }
|
||||
"telegram": "Telegram: "
|
||||
}
|
||||
},
|
||||
|
||||
"partners": {
|
||||
"mipt": {
|
||||
"title_fund": "MIPT department of general physics",
|
||||
"description_fund": "The Department of General Physics is the main point of contact for scientists and teachers on the one hand and students on the other. Close cooperation with the department is the key to a constant influx of young employees, as well as continuous self-improvement of group members working with students.",
|
||||
"title_energy": "MIPT laboratory of high-energy physics",
|
||||
"description_energy": "Close cooperation with the laboratory of high-energy physics allows for direct contact between education and the scientific community, without going beyond the bounds of MIPT." },
|
||||
"jb": { "description": "Laboratory actively cooperates with JetBrains in introducing Kotlin into scientific programming, teaching Kotlin and developing libraries on it." },
|
||||
"jbr": { "description": "The software development group is a part of an international scientific association JetBrains Research." },
|
||||
"description_energy": "Close cooperation with the laboratory of high-energy physics allows for direct contact between education and the scientific community, without going beyond the bounds of MIPT."
|
||||
},
|
||||
"jb": {
|
||||
"description": "Laboratory actively cooperates with JetBrains in introducing Kotlin into scientific programming, teaching Kotlin and developing libraries on it."
|
||||
},
|
||||
"jbr": {
|
||||
"description": "The software development group is a part of an international scientific association JetBrains Research."
|
||||
},
|
||||
"ras": {
|
||||
"title_exp": "Department of experimental physics, INR RAS",
|
||||
"description_exp": "Very close cooperation is being maintained with the OEF of the INR RAS in the framework of the Troitsk nu-mass and KATRIN collaborations, as well as in terms of training qualified personnel for work on the NICA experiment and in other accelerator experiments. Within the framework of cooperation, both scientific and educational tasks are implemented.",
|
||||
@ -61,27 +65,30 @@
|
||||
"title_education": "Scientific and educational center, INR RAS",
|
||||
"description_education": "Some of the students participating in the group study at the Scientific and Educational Center of the INR RAS.",
|
||||
"title_iki": "SRI RAS",
|
||||
"description_iki": "The group is involved in the mathematical modeling of electrical discharges in the atmosphere." }
|
||||
"description_iki": "The group is involved in the mathematical modeling of electrical discharges in the atmosphere."
|
||||
}
|
||||
},
|
||||
|
||||
"physics": {
|
||||
"physics": {
|
||||
"bc_title": "Physics",
|
||||
"title": "Nuclear physics",
|
||||
"description": "Traditionally, nuclear physics includes not only research related to the structure of the atomic nucleus and nuclear reactions, but also the entire physics of elementary particles, as well as partly some sections of astrophysics and cosmology. Currently, the efforts of our group are concentrated in the field of so-called non-accelerator experiments in elementary particle physics." },
|
||||
"description": "Traditionally, nuclear physics includes not only research related to the structure of the atomic nucleus and nuclear reactions, but also the entire physics of elementary particles, as well as partly some sections of astrophysics and cosmology. Currently, the efforts of our group are concentrated in the field of so-called non-accelerator experiments in elementary particle physics."
|
||||
},
|
||||
"education": {
|
||||
"bc_title": "Education",
|
||||
"title": "Education",
|
||||
"description": "Educational projects in the field of nuclear physics and methods for conducting and analyzing the results of a physical experiment are one of the key activities of the group.",
|
||||
"description": "Educational projects in the field of nuclear physics and methods for conducting and analyzing the results of a physical experiment are one of the key activities of the group.",
|
||||
"course1": "Details available at ",
|
||||
"course2": "the course page" },
|
||||
"course2": "the course page"
|
||||
},
|
||||
"math": {
|
||||
"bc_title": "Maths",
|
||||
"title": "Mathematical methods",
|
||||
"description": "Mathematical modeling of physical processes and mathematical methods of data analysis are an integral part of modern experimental physics. There is a constant need for both improving existing methods and developing fundamentally new approaches." },
|
||||
"description": "Mathematical modeling of physical processes and mathematical methods of data analysis are an integral part of modern experimental physics. There is a constant need for both improving existing methods and developing fundamentally new approaches."
|
||||
},
|
||||
"software": {
|
||||
"bc_title": "Software",
|
||||
"title": "Scientific software",
|
||||
"description": "Modern experiments in particle physics are inconceivable without special software, which is required both at the stage of the experiment and data collection, and in processing the results. The development of scientific software is an additional, but significant area of work for the group." },
|
||||
|
||||
"description": "Modern experiments in particle physics are inconceivable without special software, which is required both at the stage of the experiment and data collection, and in processing the results. The development of scientific software is an additional, but significant area of work for the group."
|
||||
},
|
||||
"quarks": "Physics"
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
"news": "Последние новости" },
|
||||
|
||||
"about": {
|
||||
"title": "Группа методики ядерно-физического эксперимента",
|
||||
"title": "Лаборатория методики ядерно-физического эксперимента",
|
||||
"descr": "Группа была создана в 2015 году на базе кафедры общей физики МФТИ, нескольких лабораторий ИЯИ РАН и при поддержке лаборатории физики высоких энергий МФТИ. Цель создания - разработка методов для проведения и анализа данных экспериментов в области физики частиц и ядерной физики. Помимо этого участники группы занимаются внедрением современных информационных технологий в экспериментальную физику и образование.",
|
||||
"pubs": {
|
||||
"title": "Публикации",
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import Layout from "../components/layout"
|
||||
import { FormattedMessage, useIntl, injectIntl } from "gatsby-plugin-intl"
|
||||
import {FormattedMessage, injectIntl, useIntl} from "gatsby-plugin-react-intl"
|
||||
import SEO from "../components/seo"
|
||||
|
||||
const NotFoundPage = () => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import { FormattedMessage, FormattedHTMLMessage, useIntl, Link, injectIntl } from "gatsby-plugin-intl"
|
||||
import { graphql } from "gatsby"
|
||||
import {FormattedMessage, injectIntl, Link, useIntl} from "gatsby-plugin-react-intl"
|
||||
import {graphql} from "gatsby"
|
||||
import Parser from "html-react-parser"
|
||||
|
||||
import Layout from "../components/layout"
|
||||
@ -20,7 +20,7 @@ const AboutPage = ({ data }) => {
|
||||
<p style = {{marginTop: `0px`}}><FormattedMessage id="about.descr" /></p>
|
||||
|
||||
<h2 id="publications"><FormattedMessage id="about.pubs.title" /></h2>
|
||||
<p style = {{marginTop: `0px`, marginBottom: `0px`}}><FormattedHTMLMessage id="about.pubs.available1"/><Link to="/publications"><FormattedMessage id="about.pubs.available2"/></Link></p>
|
||||
<p style = {{marginTop: `0px`, marginBottom: `0px`}}><FormattedMessage id="about.pubs.available1"/><Link to="/publications"><FormattedMessage id="about.pubs.available2"/></Link></p>
|
||||
|
||||
<h2 id="contacts"><FormattedMessage id="about.contacts.title" /></h2>
|
||||
<p style = {{marginTop: `0px`, marginBottom: `0px`}}><FormattedMessage id="about.contacts.mail" /><a href='mailto:npm@m%69%70t.ru'>npm@mipt.ru</a></p>
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import { FormattedMessage, FormattedHTMLMessage, Link, useIntl, injectIntl } from "gatsby-plugin-intl"
|
||||
import { graphql } from "gatsby"
|
||||
import {FormattedMessage, injectIntl, Link, useIntl} from "gatsby-plugin-react-intl"
|
||||
import {graphql} from "gatsby"
|
||||
import Layout from "../components/layout"
|
||||
import SEO from "../components/seo"
|
||||
import Parser from "html-react-parser"
|
||||
@ -9,106 +9,116 @@ import head_ru from "../images/index/head.png"
|
||||
import head_en from "../images/index/head_en.png"
|
||||
import "../styles/main.css"
|
||||
import "../styles/bootstrap.min.css"
|
||||
import {Jumbotron, Button} from "react-bootstrap"
|
||||
import {Button, Jumbotron} from "react-bootstrap"
|
||||
|
||||
const IndexPage = ({ data }) => {
|
||||
const intl = useIntl()
|
||||
const lang = intl.locale
|
||||
var news = ""
|
||||
var head = ""
|
||||
if ( lang==="ru" ) { news = data.ru_posts.edges; head = head_ru; }
|
||||
else if ( lang==="en" ) { news = data.en_posts.edges; head = head_en; }
|
||||
console.log(head)
|
||||
const IndexPage = ({data}) => {
|
||||
const intl = useIntl()
|
||||
const lang = intl.locale
|
||||
var news = ""
|
||||
var head = ""
|
||||
if (lang === "ru") {
|
||||
news = data.ru_posts.edges;
|
||||
head = head_ru;
|
||||
} else if (lang === "en") {
|
||||
news = data.en_posts.edges;
|
||||
head = head_en;
|
||||
}
|
||||
console.log(head)
|
||||
|
||||
return(
|
||||
<Layout>
|
||||
<SEO lang={lang} title={intl.formatMessage({ id: "title" })} />
|
||||
return (
|
||||
<Layout>
|
||||
<SEO lang={lang} title={intl.formatMessage({id: "title"})}/>
|
||||
|
||||
{/* --------------------------------- */}
|
||||
<Jumbotron>
|
||||
<img src={head} width="90%" className="center-block" alt="head" />
|
||||
<hr/>
|
||||
<h3 style = {{color: `rgb(18,64,171)`}}><FormattedMessage id="jumbotron.labintro"/></h3>
|
||||
<p id="lead"><FormattedMessage id="jumbotron.lead"/></p>
|
||||
<FormattedHTMLMessage id="jumbotron.list" />
|
||||
</Jumbotron>
|
||||
<div className="aboutButton">
|
||||
<Button variant="success" id="jt"><Link to="/about"><FormattedMessage id="jumbotron.about" /></Link></Button>
|
||||
</div>
|
||||
{/* ------------------------------ */}
|
||||
<div className="row">
|
||||
<div className="col-lg-4">
|
||||
<h2><FormattedMessage id="more.nuclear_title" /></h2>
|
||||
<p> <FormattedMessage id="more.nuclear_body" /> </p>
|
||||
<Button variant="primary" id="more"><Link to="/projects/physics"><FormattedMessage id="more.nuclear_more" /></Link></Button>
|
||||
</div>
|
||||
<div className="col-lg-4">
|
||||
<h2><FormattedMessage id="more.education_title" /></h2>
|
||||
<p> <FormattedMessage id="more.education_body" /></p>
|
||||
<Button variant="primary" id="more"><Link to="/projects/education"><FormattedMessage id="more.education_more" /></Link></Button>
|
||||
</div>
|
||||
<div className="col-lg-4">
|
||||
<h2><FormattedMessage id="more.software_title" /></h2>
|
||||
<p><FormattedMessage id="more.software_body" /></p>
|
||||
<Button variant="primary" id="more"><Link to="/projects/software"><FormattedMessage id="more.software_more" /></Link></Button>
|
||||
</div>
|
||||
</div>
|
||||
<hr style={{marginBottom: `50px`}}/>
|
||||
{/* --------------------------------- */}
|
||||
<h1 style={{textAlign: `center`}}><FormattedMessage id="more.news"/></h1>
|
||||
{ news.map(({node}) => {
|
||||
const title = node.frontmatter.title;
|
||||
const date = node.frontmatter.date;
|
||||
const html = node.html;
|
||||
return (
|
||||
<div className = "card" style={{marginBottom: `15px`, borderRadius: `0px`, boxShadow: `0 2px 2px #A2A2A2`}}>
|
||||
<div className = "card-body">
|
||||
<h2 className = "title">
|
||||
{title}<span id="date">{date}</span>
|
||||
</h2>
|
||||
<div className="news">{Parser(html)}</div>
|
||||
{/* --------------------------------- */}
|
||||
<Jumbotron>
|
||||
<img src={head} width="90%" className="center-block" alt="head"/>
|
||||
<hr/>
|
||||
<h3 style={{color: `rgb(18, 64, 171)`}}><FormattedMessage id="jumbotron.labintro"/></h3>
|
||||
<p id="lead"><FormattedMessage id="jumbotron.lead"/></p>
|
||||
{Parser(intl.formatMessage({id: "jumbotron.list"}))}
|
||||
</Jumbotron>
|
||||
<div className="aboutButton">
|
||||
<Button variant="success" id="jt"><Link to="/about"><FormattedMessage
|
||||
id="jumbotron.about"/></Link></Button>
|
||||
</div>
|
||||
{/* ------------------------------ */}
|
||||
<div className="row">
|
||||
<div className="col-lg-4">
|
||||
<h2><FormattedMessage id="more.nuclear_title"/></h2>
|
||||
<p><FormattedMessage id="more.nuclear_body"/></p>
|
||||
<Button variant="primary" id="more"><Link to="/projects/physics"><FormattedMessage
|
||||
id="more.nuclear_more"/></Link></Button>
|
||||
</div>
|
||||
<div className="col-lg-4">
|
||||
<h2><FormattedMessage id="more.education_title"/></h2>
|
||||
<p><FormattedMessage id="more.education_body"/></p>
|
||||
<Button variant="primary" id="more"><Link to="/projects/education"><FormattedMessage
|
||||
id="more.education_more"/></Link></Button>
|
||||
</div>
|
||||
<div className="col-lg-4">
|
||||
<h2><FormattedMessage id="more.software_title"/></h2>
|
||||
<p><FormattedMessage id="more.software_body"/></p>
|
||||
<Button variant="primary" id="more"><Link to="/projects/software"><FormattedMessage
|
||||
id="more.software_more"/></Link></Button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</Layout>
|
||||
)
|
||||
<hr style={{marginBottom: `50px`}}/>
|
||||
{/* --------------------------------- */}
|
||||
<h1 style={{textAlign: `center`}}><FormattedMessage id="more.news"/></h1>
|
||||
{news.map(({node}) => {
|
||||
const title = node.frontmatter.title;
|
||||
const date = node.frontmatter.date;
|
||||
const html = node.html;
|
||||
return (
|
||||
<div className="card"
|
||||
style={{marginBottom: `15px`, borderRadius: `0px`, boxShadow: `0 2px 2px #A2A2A2`}}>
|
||||
<div className="card-body">
|
||||
<h2 className="title">
|
||||
{title}<span id="date">{date}</span>
|
||||
</h2>
|
||||
<div className="news">{Parser(html)}</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</Layout>
|
||||
)
|
||||
}
|
||||
|
||||
export default injectIntl(IndexPage)
|
||||
|
||||
export const query = graphql`
|
||||
query {
|
||||
ru_posts: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "post"}, published: {eq: true}, language: {eq: "ru"}}},
|
||||
sort: {fields: [frontmatter___date], order: DESC}, limit: 3 )
|
||||
{
|
||||
edges{
|
||||
node{
|
||||
html
|
||||
frontmatter {
|
||||
date(formatString: "DD.MM.YYYY")
|
||||
title
|
||||
language
|
||||
query {
|
||||
ru_posts: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "post"}, published: {eq: true}, language: {eq: "ru"}}},
|
||||
sort: {fields: [frontmatter___date], order: DESC}, limit: 3 )
|
||||
{
|
||||
edges{
|
||||
node{
|
||||
html
|
||||
frontmatter {
|
||||
date(formatString: "DD.MM.YYYY")
|
||||
title
|
||||
language
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
en_posts: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "post"}, published: {eq: true}, language: {eq: "en"}}},
|
||||
sort: {fields: [frontmatter___date], order: DESC}, limit: 3 )
|
||||
{
|
||||
edges{
|
||||
node{
|
||||
html
|
||||
frontmatter {
|
||||
date(formatString: "DD.MM.YYYY")
|
||||
title
|
||||
language
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
en_posts: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "post"}, published: {eq: true}, language: {eq: "en"}}},
|
||||
sort: {fields: [frontmatter___date], order: DESC}, limit: 3 )
|
||||
{
|
||||
edges{
|
||||
node{
|
||||
html
|
||||
frontmatter {
|
||||
date(formatString: "DD.MM.YYYY")
|
||||
title
|
||||
language
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}`
|
||||
}`
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import Layout from "../components/layout"
|
||||
import { FormattedMessage, useIntl, injectIntl } from "gatsby-plugin-intl"
|
||||
import {FormattedMessage, injectIntl, useIntl} from "gatsby-plugin-react-intl"
|
||||
import "../styles/main.css"
|
||||
///------------------------------------------------------
|
||||
import mipt_logo from "../images/partners/mipt_logo.jpg"
|
||||
@ -19,10 +19,10 @@ const PartnersPage = () => {
|
||||
|
||||
<div className="media" style={{marginTop: `30px`}}>
|
||||
<div className="media-body">
|
||||
<h1><a id="partner" href="https://mipt.ru/education/chair/physics/"><FormattedMessage id="partners.mipt.title_fund"/></a></h1>
|
||||
<h1><a aria-label="MIPT general physics" href="https://mipt.ru/education/chair/physics/"><FormattedMessage id="partners.mipt.title_fund"/></a></h1>
|
||||
<p><FormattedMessage id="partners.mipt.description_fund"/></p>
|
||||
<hr/>
|
||||
<h1><a id="partner" href="https://mipt.ru/science/labs/high_energy_physics_lab.php"><FormattedMessage id="partners.mipt.title_energy"/></a></h1>
|
||||
<h1><a aria-label="MIPT HEP" href="https://mipt.ru/science/labs/high_energy_physics_lab.php"><FormattedMessage id="partners.mipt.title_energy"/></a></h1>
|
||||
<p><FormattedMessage id="partners.mipt.description_energy"/></p>
|
||||
</div>
|
||||
<div className="media-right media-middle">
|
||||
@ -70,7 +70,7 @@ const PartnersPage = () => {
|
||||
<a href="http://www.inr.ru"><img className="media-object" src={inr_linac} alt="inr logo" width="100px"/></a>
|
||||
</div>
|
||||
<div className="media-body" style={{marginLeft: `25px`}}>
|
||||
<h1><a id="partner" href="http://www.inr.ru/"><FormattedMessage id="partners.ras.title_beam"/></a></h1>
|
||||
<h1><a aria-label="INR" href="http://www.inr.ru/"><FormattedMessage id="partners.ras.title_beam"/></a></h1>
|
||||
<p><FormattedMessage id="partners.ras.description_beam"/></p>
|
||||
</div>
|
||||
</div>
|
||||
@ -79,7 +79,7 @@ const PartnersPage = () => {
|
||||
|
||||
<div className="media">
|
||||
<div className="media-body">
|
||||
<h1><a id="partner" href="http://www.inr.ru/"><FormattedMessage id="partners.ras.title_education"/></a></h1>
|
||||
<h1><a aria-label="INR education" href="http://www.inr.ru/"><FormattedMessage id="partners.ras.title_education"/></a></h1>
|
||||
<p><FormattedMessage id="partners.ras.description_education"/></p>
|
||||
</div>
|
||||
<div className="media-right media-middle">
|
||||
@ -101,7 +101,7 @@ const PartnersPage = () => {
|
||||
|
||||
<div className="media" style={{marginBottom: `30px`}}>
|
||||
<div className="media-body">
|
||||
<h1><a id="partner" href="http://www.iki.rssi.ru/"><FormattedMessage id="partners.ras.title_iki"/></a></h1>
|
||||
<h1><a aria-label="SRI RAS" href="http://www.iki.rssi.ru/"><FormattedMessage id="partners.ras.title_iki"/></a></h1>
|
||||
<p><FormattedMessage id="partners.ras.description_iki"/></p>
|
||||
</div>
|
||||
<div className="media-right media-middle">
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import { graphql } from "gatsby"
|
||||
import { FormattedMessage, Link, useIntl, injectIntl } from "gatsby-plugin-intl"
|
||||
import {graphql} from "gatsby"
|
||||
import {FormattedMessage, injectIntl, Link, useIntl} from "gatsby-plugin-react-intl"
|
||||
import Parser from "html-react-parser"
|
||||
|
||||
import Layout from "../../components/layout"
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import {graphql} from "gatsby"
|
||||
import {FormattedMessage, injectIntl, Link, useIntl} from "gatsby-plugin-intl"
|
||||
import {FormattedMessage, injectIntl, Link, useIntl} from "gatsby-plugin-react-intl"
|
||||
import Parser from "html-react-parser"
|
||||
|
||||
import Layout from "../../components/layout"
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import { graphql } from "gatsby"
|
||||
import { FormattedMessage, Link, useIntl, injectIntl } from "gatsby-plugin-intl"
|
||||
import {graphql} from "gatsby"
|
||||
import {FormattedMessage, injectIntl, Link, useIntl} from "gatsby-plugin-react-intl"
|
||||
import Parser from "html-react-parser"
|
||||
|
||||
import Layout from "../../components/layout"
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import {graphql} from "gatsby"
|
||||
import {FormattedMessage, injectIntl, Link, useIntl} from "gatsby-plugin-intl"
|
||||
import {FormattedMessage, injectIntl, Link, useIntl} from "gatsby-plugin-react-intl"
|
||||
import Parser from "html-react-parser"
|
||||
|
||||
import Layout from "../../components/layout"
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import {graphql} from "gatsby"
|
||||
import {injectIntl, Link, useIntl} from "gatsby-plugin-intl"
|
||||
import {injectIntl, Link, useIntl} from "gatsby-plugin-react-intl"
|
||||
import Parser from "html-react-parser"
|
||||
|
||||
import Layout from "../components/layout"
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from "react"
|
||||
import { graphql } from "gatsby"
|
||||
import { FormattedMessage, Link, useIntl, injectIntl } from "gatsby-plugin-intl"
|
||||
import {graphql} from "gatsby"
|
||||
import {FormattedMessage, injectIntl, Link, useIntl} from "gatsby-plugin-react-intl"
|
||||
import Parser from "html-react-parser"
|
||||
|
||||
import Layout from "../components/layout"
|
||||
|
Loading…
Reference in New Issue
Block a user