Fix blinks and separate project tag and project type.

This commit is contained in:
Alexander Nozik 2021-03-26 21:04:29 +03:00
parent 10ffaf2a21
commit bb3bc967d8
63 changed files with 285 additions and 283 deletions

View File

@ -3,7 +3,6 @@ module.exports = {
title: `MIPT-NPM laboratory`,
description: `Nuclear Physics Methods Laboratory`,
},
plugins: [
{
resolve: 'gatsby-source-filesystem',

View File

@ -26,7 +26,7 @@ exports.createPages = async ({actions, graphql}) => {
const result = await graphql(`
{
courses: allMarkdownRemark(
filter: {frontmatter: {content_type: {eq: "page_education"}, published: {eq: true}}}
filter: {frontmatter: {content_type: {eq: "page_education"}, published: {ne: false}}}
){
edges{
node{
@ -40,7 +40,7 @@ exports.createPages = async ({actions, graphql}) => {
}
news: allMarkdownRemark(
filter: {frontmatter: {content_type: {eq: "post"}, published: {eq: true}}},
filter: {frontmatter: {content_type: {eq: "post"}, published: {ne: false}}},
sort: {fields: [frontmatter___date], order: DESC}
) {
edges{

View File

@ -2,9 +2,8 @@
"name": "npm-site",
"private": true,
"description": "Nuclear Physics Methods laboratory",
"version": "0.1.0",
"version": "0.2.0",
"dependencies": {
"@types/bootstrap": "5.0.9",
"bootstrap": "4.6.0",
"gatsby": "3.1.1",
"gatsby-awesome-pagination": "0.3.6",

View File

@ -1,6 +1,6 @@
import React from "react"
import PropTypes from "prop-types"
import {injectIntl, useIntl} from "gatsby-plugin-react-intl"
import {injectIntl, useIntl} from "react-intl"
import Navbar from "./navBar"
import Footer from "./footer"
@ -15,8 +15,8 @@ const Layout = ({children}) => {
const lang = intl.locale;
return (
<>
<Navbar/>
<SEO lang={lang} title={intl.formatMessage({id: "title"})}/>
<Navbar/>
<div className="container">
<main>{children}</main>
</div>

View File

@ -2,54 +2,62 @@ import React from "react"
import {Link} from "gatsby"
import {globalHistory as history} from '@reach/router'
import {FormattedMessage, injectIntl, useIntl} from "gatsby-plugin-react-intl"
import {FormattedMessage, injectIntl, useIntl} from "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"
const CustomNavbar = () => {
const {location} = history;
const intl = useIntl();
let active = ["", "", "", ""]
active[0] = location.pathname.includes('/news/') ? 'active' : "link-no-style";
active[1] = location.pathname.includes('/about/') ? 'active' : "link-no-style";
active[2] = location.pathname.includes('/projects/') ? 'active' : "link-no-style";
active[3] = location.pathname.includes('/partners/') ? 'active' : "link-no-style";
const {location} = history;
//let active = ["", "", "", ""]
// active[0] = location.pathname.includes('/news/') ? 'active' : "link-no-style";
// active[1] = location.pathname.includes('/about/') ? 'active' : "link-no-style";
// active[2] = location.pathname.includes('/projects/') ? 'active' : "link-no-style";
// active[3] = location.pathname.includes('/partners/') ? 'active' : "link-no-style";
let activeBrand = location.pathname === "/ru/" || location.pathname === "/en/" ? 'activeBrand' : "link-no-style";
const intl = useIntl();
const lang = intl.locale;
return (
<>
<SEO lang={lang} title={intl.formatMessage({id: "title"})}/>
<Navbar bg="dark" expand="lg" id="site-navbar" fixed="top">
<Navbar bg="dark" expand="lg" id="site-navbar" fixed="top" variant="dark">
<Container>
<Link to="/" className={activeBrand}>
<Link to={"/" + intl.locale + "/"} className={activeBrand}>
<Navbar.Brand as="span"><img src={logo} height="50px" alt="npm logo" id="logo"/></Navbar.Brand>
</Link>
<Navbar.Toggle aria-controls="basic-navbar-nav"/>
<Navbar.Collapse id="basic-navbar-nav">
<Nav className="mr-auto" activeKey={location.pathname}>
<Link to="/news" className={active[0]}> {/* news */}
<Link to={`/${intl.locale}/news`} className="nav-item" activeClassName="active"
partiallyActive={true}>
{/* news */}
<Nav.Link as="span" eventKey="news"><FormattedMessage id="header.news"/></Nav.Link>
</Link>
<Link to="/about" className={active[1]}> {/* about */}
<Nav.Link as="span" eventKey="about"><FormattedMessage id="header.group"/></Nav.Link>
<Link to={`/${intl.locale}/about`} className="nav-item" activeClassName="active"
partiallyActive={true}>
{/* about */}
<Nav.Link as="span" eventKey="about"><FormattedMessage
id="header.group"/></Nav.Link>
</Link>
<Link to="/projects/physics" className={active[2]}>
<Nav.Link as="span" eventKey="projects"><FormattedMessage
id="header.projects"/></Nav.Link>
<Link to={`/${intl.locale}/projects/physics`} className="nav-item" activeClassName="active"
partiallyActive={true}>
{/* projects */}
<Nav.Link as="span" eventKey="projects">
<FormattedMessage id="header.projects"/>
</Nav.Link>
</Link>
<Link to="/partners" className={active[3]}> {/* partners */}
<Link to={`/${intl.locale}/partners`} className="nav-item" activeClassName="active"
partiallyActive={true}>
{/* partners */}
<Nav.Link as="span" eventKey="partners"><FormattedMessage
id="header.partners"/></Nav.Link>
</Link>
<Link>
<Nav.Link eventKey="language" className="language"><Language/></Nav.Link>
</Link>
<Nav.Link eventKey="language" className="language">
<Language/>
</Nav.Link>
</Nav>
</Navbar.Collapse>
</Container>

View File

@ -0,0 +1,41 @@
import {Link} from "gatsby-plugin-react-intl";
import {FormattedMessage} from "react-intl";
import React from "react";
export default function ProjectsNavbar({project_type}) {
function navClasses(nav) {
if (project_type === nav) {
return "nav-link active"
} else {
return "nav-link"
}
}
return (
<>
<ul className="nav nav-tabs">
<li className="nav-item">
<Link id="project_physics" className={navClasses("physics")} to="/projects/physics">
<FormattedMessage id="physics.bc_title"/>
</Link>
</li>
<li className="nav-item">
<Link id="project_education" className={navClasses("education")} to="/projects/education">
<FormattedMessage id="education.bc_title"/>
</Link>
</li>
<li className="nav-item">
<Link id="project_math" className={navClasses("math")} to="/projects/math">
<FormattedMessage id="math.bc_title"/>
</Link>
</li>
<li className="nav-item">
<Link id="project_software" className={navClasses("software")} to="/projects/software">
<FormattedMessage id="software.bc_title"/>
</Link>
</li>
</ul>
</>
)
}

View File

@ -1,5 +1,5 @@
import React from "react"
import {injectIntl} from "gatsby-plugin-react-intl"
import {injectIntl} from "react-intl"
import SEO from "./seo"
const Redirect = ({intl}) => {

View File

@ -55,7 +55,7 @@ export default injectIntl(NewsTemplate)
export const query = graphql`
query NewsQuery($limit: Int!, $skip: Int!) {
ru_news: allMarkdownRemark(
filter: {frontmatter: {content_type: {eq: "post"}, published: {eq: true}, language: {eq: "ru"}}},
filter: {frontmatter: {content_type: {eq: "post"}, published: {ne: false}, language: {eq: "ru"}}},
sort: {fields: [frontmatter___date], order: DESC},
limit: $limit
skip: $skip
@ -73,7 +73,7 @@ export const query = graphql`
}
en_news: allMarkdownRemark(
filter: {frontmatter: {content_type: {eq: "post"}, published: {eq: true}, language: {eq: "en"}}},
filter: {frontmatter: {content_type: {eq: "post"}, published: {ne: false}, language: {eq: "en"}}},
sort: {fields: [frontmatter___date], order: DESC},
limit: $limit
skip: $skip

View File

@ -0,0 +1,62 @@
import React from "react"
import {FormattedMessage} from "react-intl"
import {Link} from "gatsby-plugin-react-intl"
import Parser from "html-react-parser"
import ProjectsNavbar from "../projectsNavbar";
export default function Projects({projects, project_type}) {
return (
<>
<ProjectsNavbar project_type={project_type}/>
<h1 style={{marginTop: `20px`}}><FormattedMessage id={project_type + ".title"}/></h1>
<p style={{marginBottom: `5px`}}><FormattedMessage id={project_type + ".description"}/></p>
<ul>
{projects.map(({node}) => {
const link = node.frontmatter.shortTitle;
const id = node.frontmatter.id;
return (
<li><Link to={`/projects/${project_type}#${id}`}>{link}</Link></li>
)
})}
</ul>
{projects.map(({node}) => {
const title = node.frontmatter.title;
const id = node.frontmatter.id;
return (
<div className="row" id={id}>
<div className="col-lg-12">
<hr/>
<h2 id={id}>{title}</h2>
<div>{Parser(node.html)}</div>
</div>
</div>
)
})}
{/* {posts.map(({node}) => {
const title = node.frontmatter.title;
const id = node.frontmatter.id;
const courseName = node.frontmatter.courseName;
return (
<div className="row" id={id}>
<div className="col-lg-12">
<hr/>
<h2 id={id}>{title}</h2>
<div>{Parser(node.html)}</div>
<div className="card" style={{backgroundColor: `#F5F5F5`}}>
<div className="card-body" style={{padding: `10px`}}>
<p style={{textAlign: `center`, margin: `5px`}}>
<FormattedMessage id={`${project_type}.course1`}/><Link
to={`/pages/${courseName}`}><FormattedMessage id="education.course2"/></Link>
</p>
</div>
</div>
</div>
</div>
)
})}*/}
</>
)
}

View File

@ -1,5 +1,6 @@
---
content_type: project_education
content_type: project
project_type: education
id: analysis
shortTitle: Data analysis course
title: Statistical methods in experimental physics

View File

@ -1,5 +1,6 @@
---
content_type: project_education
content_type: project
project_type: education
id: atom
shortTitle: Lecture series on the history of the atomic project
title: History of atomic project

View File

@ -1,5 +1,6 @@
---
content_type: project_education
content_type: project
project_type: education
id: kotlin
shortTitle: Scientific programming
title: Introduction to Kotlin scientific programming

View File

@ -1,5 +1,6 @@
---
content_type: project_education
content_type: project
project_type: education
id: labs
shortTitle: Laboratory works
title: Laboratory work at the department of general physics

View File

@ -1,5 +1,6 @@
---
content_type: project_education
content_type: project
project_type: education
id: lowbackground
shortTitle: Low background experiment course
title: Low background subterranean laboratory experiments course

View File

@ -1,5 +1,6 @@
---
content_type: project_math
content_type: project
project_type: math
id: deconvolution
shortTitle: Inverse problems
title: Statistical regularization of incorrect inverse problems

View File

@ -1,5 +1,6 @@
---
content_type: project_math
content_type: project
project_type: math
id: significance
shortTitle: Significance functions
title: Optimal experiment planning with parameter significance functions

View File

@ -1,5 +1,6 @@
---
content_type: project_physics
content_type: project
project_type: physics
id: gerda
shortTitle: GERDA
title: International experiment GERDA

View File

@ -1,5 +1,6 @@
---
content_type: project_physics
content_type: project
project_type: physics
id: iaxo
shortTitle: IAXO
title: International collaboration IAXO

View File

@ -1,5 +1,6 @@
---
content_type: project_physics
content_type: project
project_type: physics
id: mounMonitor
shortTitle: Muon monitor
title: Muon monitor for subterranean low-background experiments

View File

@ -1,5 +1,6 @@
---
content_type: project_physics
content_type: project
project_type: physics
id: numass
shortTitle: Troitsk nu-mass
title: Neutrino mass search facility Troitsk nu-mass

View File

@ -1,5 +1,6 @@
---
content_type: project_physics
content_type: project
project_type: physics
id: satelite
shortTitle: Satellite detector
title: Satellite detector of solar radiation

View File

@ -1,5 +1,6 @@
---
content_type: project_physics
content_type: project
project_type: physics
id: spectMatter
shortTitle: Spectator matter
title: Spectator matter

View File

@ -1,5 +1,6 @@
---
content_type: project_physics
content_type: project
project_type: physics
id: atmosphere
shortTitle: TGE/TGF
title: Studying TGE and TGF

View File

@ -1,5 +1,6 @@
---
content_type: project_software
content_type: project
project_type: software
id: biref
shortTitle: Birefringence
title: Data analysis in laboratory work on birefringence

View File

@ -1,5 +1,6 @@
---
content_type: project_software
content_type: project
project_type: software
id: dataforge
shortTitle: DataForge
title: DataForge, an automated data processing system

View File

@ -1,5 +1,6 @@
---
content_type: project_software
content_type: project
project_type: software
id: dataforge
shortTitle: Kmath
title: Experimental Kotlin math library

View File

@ -1,5 +1,6 @@
---
content_type: project_software
content_type: project
project_type: software
id: muon-sim
shortTitle: Modeling Muon Monitor
title: Muon Monitor experiment data analysis model

View File

@ -1,5 +1,6 @@
---
content_type: project_software
content_type: project
project_type: software
id: plotly
shortTitle: Plotly.kt
title: Plotly.kt wrapper library for kotlin-multiplatform

View File

@ -1,5 +1,6 @@
---
content_type: project_software
content_type: project
project_type: software
id: prog-seminar
shortTitle: Programming workshop
title: Programming in experimental physics

View File

@ -1,5 +1,6 @@
---
content_type: project_software
content_type: project
project_type: software
id: reactor
shortTitle: RL-TGE modeling
title: Macro modeling for a reactor model in atmospheric physics

View File

@ -1,5 +1,6 @@
---
content_type: project_education
content_type: project
project_type: education
id: analysis
shortTitle: Курс по анализу данных
title: Статистические методы в экспериментальной физике

View File

@ -1,5 +1,6 @@
---
content_type: project_education
content_type: project
project_type: education
id: atom
shortTitle: Цикл лекций по истории атомного проекта
title: История атомного проекта

View File

@ -1,5 +1,6 @@
---
content_type: project_education
content_type: project
project_type: education
id: kotlin
shortTitle: Научное программирование
title: Введение в научное программирование на языке Kotlin

View File

@ -1,5 +1,6 @@
---
content_type: project_education
content_type: project
project_type: education
id: labs
shortTitle: Лабораторные работы
title: Лабораторные работы на кафедре общей физики

View File

@ -1,5 +1,6 @@
---
content_type: project_education
content_type: project
project_type: education
id: lowbackground
shortTitle: Курс по низкофоновым экспериментам
title: Курс по экспериментам, проводимым в низкофоновых подземных лабораториях

View File

@ -1,5 +1,6 @@
---
content_type: project_math
content_type: project
project_type: math
id: deconvolution
shortTitle: Обратные задачи
title: Статистическая регуляризация некорректных обратных задач

View File

@ -1,5 +1,6 @@
---
content_type: project_math
content_type: project
project_type: math
id: significance
shortTitle: Функции значимости
title: Оптимальное планирование эксперимента при помощи функций значимости параметров

View File

@ -1,5 +1,6 @@
---
content_type: project_physics
content_type: project
project_type: physics
id: gerda
shortTitle: GERDA
title: Международный эксперимент GERDA

View File

@ -1,5 +1,6 @@
---
content_type: project_physics
content_type: project
project_type: physics
id: iaxo
shortTitle: IAXO
title: Международная коллаборация IAXO

View File

@ -1,5 +1,6 @@
---
content_type: project_physics
content_type: project
project_type: physics
id: mounMonitor
shortTitle: Мюонный монитор
title: Мюонный монитор для подземных низкофоновых экспериментов

View File

@ -1,5 +1,6 @@
---
content_type: project_physics
content_type: project
project_type: physics
id: numass
shortTitle: Троицк ню-масс
title: Установка по поиску массы нейтрино Троицк ню-масс

View File

@ -1,5 +1,6 @@
---
content_type: project_physics
content_type: project
project_type: physics
id: satelite
shortTitle: Спутниковый детектор
title: Спутниковый детектор солнечного излучения

View File

@ -1,5 +1,6 @@
---
content_type: project_physics
content_type: project
project_type: physics
id: spectMatter
shortTitle: Спектаторная материя
title: Спектаторная материя

View File

@ -1,5 +1,6 @@
---
content_type: project_physics
content_type: project
project_type: physics
id: atmosphere
shortTitle: TGE/TGF
title: Изучение TGE и TGF

View File

@ -1,5 +1,6 @@
---
content_type: project_software
content_type: project
project_type: software
id: biref
shortTitle: Двулучепреломление
title: Анализ данных в лабораторной работе по двулучепреломлению

View File

@ -1,5 +1,6 @@
---
content_type: project_software
content_type: project
project_type: software
id: dataforge
shortTitle: DataForge
title: Система автоматизированной обработки данных DataForge

View File

@ -1,5 +1,6 @@
---
content_type: project_software
content_type: project
project_type: software
id: dataforge
shortTitle: Kmath
title: "Экспериментальная математическая библиотека на kotlin"

View File

@ -1,5 +1,6 @@
---
content_type: project_software
content_type: project
project_type: software
id: muon-sim
shortTitle: Моделирование Muon Monitor
title: Модель для анализа данных эксперимента Muon Monitor

View File

@ -1,5 +1,6 @@
---
content_type: project_software
content_type: project
project_type: software
id: plotly
shortTitle: Plotly.kt
title: Plotly.kt для Kotlin-multiplatform

View File

@ -1,5 +1,6 @@
---
content_type: project_software
content_type: project
project_type: software
id: prog-seminar
shortTitle: Семинар по программированию
title: Программирование в экспериментальной физике

View File

@ -1,5 +1,6 @@
---
content_type: project_software
content_type: project
project_type: software
id: reactor
shortTitle: Моделирование RL-TGE
title: Макро-моделирование для реакторной модели в физике атмосферы

View File

@ -4,7 +4,6 @@ import {graphql} from "gatsby"
import Parser from "html-react-parser"
import Layout from "../components/layout"
import SEO from "../components/seo"
import "../styles/main.css"
const AboutPage = ({data}) => {
@ -18,9 +17,8 @@ const AboutPage = ({data}) => {
}
return (
<Layout>
<SEO lang={lang} title={intl.formatMessage({id: "title"})}/>
<h1 style={{marginTop: `20px`}}><FormattedMessage id="about.title"/></h1>
<p style={{marginTop: `0px`}}><FormattedMessage id="about.descr"/></p>
<h1><FormattedMessage id="about.title"/></h1>
<p><FormattedMessage id="about.descr"/></p>
<h2 id="publications"><FormattedMessage id="about.pubs.title"/></h2>
<p style={{marginTop: `0px`, marginBottom: `0px`}}><FormattedMessage id="about.pubs.available1"/><Link
@ -75,7 +73,7 @@ export default injectIntl(AboutPage)
export const query = graphql`
query {
ru_members: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "member"}, published: {eq: true}, language: {eq: "ru"}}},
ru_members: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "member"}, published: {ne: false}, language: {eq: "ru"}}},
sort: {fields: frontmatter___order, order: ASC}) {
edges{
node {
@ -89,7 +87,7 @@ export const query = graphql`
}
}
en_members: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "member"}, published: {eq: true}, language: {eq: "en"}}},
en_members: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "member"}, published: {ne: false}, language: {eq: "en"}}},
sort: {fields: frontmatter___order, order: ASC}) {
edges{
node {

View File

@ -2,7 +2,6 @@ import React from "react"
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"
import head_ru from "../images/index/head.png"
@ -27,8 +26,6 @@ const IndexPage = ({data}) => {
return (
<Layout>
<SEO lang={lang} title={intl.formatMessage({id: "title"})}/>
{/* --------------------------------- */}
<Jumbotron>
<img src={head} width="90%" className="center-block" alt="head"/>
@ -89,7 +86,7 @@ export default injectIntl(IndexPage)
export const query = graphql`
query {
ru_posts: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "post"}, published: {eq: true}, language: {eq: "ru"}}},
ru_posts: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "post"}, published: {ne: false}, language: {eq: "ru"}}},
sort: {fields: [frontmatter___date], order: DESC}, limit: 3 )
{
edges{
@ -104,7 +101,7 @@ export const query = graphql`
}
}
en_posts: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "post"}, published: {eq: true}, language: {eq: "en"}}},
en_posts: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "post"}, published: {ne: false}, language: {eq: "en"}}},
sort: {fields: [frontmatter___date], order: DESC}, limit: 3 )
{
edges{

View File

@ -23,7 +23,7 @@ export default injectIntl(MagProg)
export const query = graphql`
query{
page: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "magprog"}, published: {eq: true}, language: {eq: "ru"}}}){
page: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "magprog"}, published: {ne: false}, language: {eq: "ru"}}}){
edges{
node{
html

View File

@ -1,6 +1,6 @@
import React from "react"
import Layout from "../components/layout"
import {FormattedMessage, injectIntl, useIntl} from "gatsby-plugin-react-intl"
import {FormattedMessage, injectIntl} from "gatsby-plugin-react-intl"
import "../styles/main.css"
///------------------------------------------------------
import mipt_logo from "../images/partners/mipt_logo.jpg"
@ -8,15 +8,10 @@ import inr_linac from "../images/partners/Linac-OUK_big.gif"
import inr_logo from "../images/partners/inr_logo.png"
import jetbrains_logo from "../images/partners/jetbrains.svg"
import jbr from "../images/partners/JBR.svg"
import SEO from "../components/seo"
const PartnersPage = () => {
const intl = useIntl()
const lang = intl.locale
return (
<Layout>
<SEO lang={lang} title={intl.formatMessage({id: "title"})}/>
<div className="media" style={{marginTop: `30px`}}>
<div className="media-body">
<h1><a aria-label="MIPT general physics"

View File

@ -4,7 +4,7 @@ import {FormattedMessage, injectIntl, Link, useIntl} from "gatsby-plugin-react-i
import Parser from "html-react-parser"
import Layout from "../../components/layout"
import SEO from "../../components/seo"
import ProjectsNavbar from "../../components/projectsNavbar";
const SoftwarePage = ({data}) => {
const intl = useIntl()
@ -17,21 +17,7 @@ const SoftwarePage = ({data}) => {
}
return (
<Layout>
<SEO lang={lang} title={intl.formatMessage({id: "title"})}/>
<ul className="nav nav-tabs">
<li className="nav-item"><Link id="project" className="nav-link "
to="/projects/physics"><FormattedMessage id="physics.bc_title"/></Link>
</li>
<li className="nav-item"><Link id="project" className="nav-link active"
to="/projects/education"><FormattedMessage
id="education.bc_title"/></Link></li>
<li className="nav-item"><Link id="project" className="nav-link " to="/projects/math"><FormattedMessage
id="math.bc_title"/></Link></li>
<li className="nav-item"><Link id="project" className="nav-link "
to="/projects/software"><FormattedMessage id="software.bc_title"/></Link>
</li>
</ul>
<ProjectsNavbar project_type="education"/>
<h1 style={{marginTop: `20px`}}><FormattedMessage id="education.title"/></h1>
<p style={{marginBottom: `5px`}}><FormattedMessage id="education.description"/></p>
@ -76,7 +62,7 @@ export default injectIntl(SoftwarePage)
export const query = graphql`
query{
ru_projects: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "project_education"}, published: {eq: true}, language: {eq: "ru"}}},
ru_projects: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "project"}, project_type: {eq: "education"}, published: {ne: false}, language: {eq: "ru"}}},
sort: {fields: [frontmatter___order], order: ASC}){
edges{
node{
@ -90,7 +76,7 @@ export const query = graphql`
}
}}
en_projects: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "project_education"}, published: {eq: true}, language: {eq: "en"}}},
en_projects: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "project"}, project_type: {eq: "education"}, published: {ne: false}, language: {eq: "en"}}},
sort: {fields: [frontmatter___order], order: ASC}){
edges{
node{

View File

@ -1,64 +1,23 @@
import React from "react"
import {graphql} from "gatsby"
import {FormattedMessage, injectIntl, Link, useIntl} from "gatsby-plugin-react-intl"
import Parser from "html-react-parser"
import {injectIntl, useIntl} from "gatsby-plugin-react-intl"
import Layout from "../../components/layout"
import SEO from "../../components/seo"
import Projects from "../../components/templates/projectsTemplate";
const SoftwarePage = ({data}) => {
const intl = useIntl()
const lang = intl.locale
var posts = ""
let mathProjects = [];
if (lang === "ru") {
posts = data.ru_projects.edges;
mathProjects = data.ru_projects.edges;
} else if (lang === "en") {
posts = data.en_projects.edges;
mathProjects = data.en_projects.edges;
}
return (
<Layout>
<SEO lang={lang} title={intl.formatMessage({id: "title"})}/>
<ul className="nav nav-tabs">
<li className="nav-item"><Link id="project" className="nav-link "
to="/projects/physics"><FormattedMessage id="physics.bc_title"/></Link>
</li>
<li className="nav-item"><Link id="project" className="nav-link "
to="/projects/education"><FormattedMessage
id="education.bc_title"/></Link></li>
<li className="nav-item"><Link id="project" className="nav-link active"
to="/projects/math"><FormattedMessage id="math.bc_title"/></Link></li>
<li className="nav-item"><Link id="project" className="nav-link "
to="/projects/software"><FormattedMessage id="software.bc_title"/></Link>
</li>
</ul>
<h1 style={{marginTop: `20px`}}><FormattedMessage id="math.title"/></h1>
<p style={{marginBottom: `5px`}}><FormattedMessage id="math.description"/></p>
<ul>
{posts.map(({node}) => {
const link = node.frontmatter.shortTitle;
const id = node.frontmatter.id;
return (
<li><Link to={`/projects/math#${id}`}>{link}</Link></li>
)
})}
</ul>
{posts.map(({node}) => {
const title = node.frontmatter.title;
const id = node.frontmatter.id;
return (
<div className="row" id={id}>
<div className="col-lg-12">
<hr/>
<h2 name={id}>{title}</h2>
<div>{Parser(node.html)}</div>
</div>
</div>
)
})}
<Projects projects={mathProjects} project_type="math"/>
</Layout>
)
}
@ -67,7 +26,7 @@ export default injectIntl(SoftwarePage)
export const query = graphql`
query{
ru_projects: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "project_math"}, published: {eq: true}, language: {eq: "ru"}}},
ru_projects: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "project"}, project_type: {eq: "math"}, published: {ne: false}, language: {eq: "ru"}}},
sort: {fields: [frontmatter___order], order: ASC}){
edges{
node{
@ -80,7 +39,7 @@ export const query = graphql`
}
}}
en_projects: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "project_math"}, published: {eq: true}, language: {eq: "en"}}},
en_projects: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "project"}, project_type: {eq: "math"}, published: {ne: false}, language: {eq: "en"}}},
sort: {fields: [frontmatter___order], order: ASC}){
edges{
node{

View File

@ -1,63 +1,22 @@
import React from "react"
import {graphql} from "gatsby"
import {FormattedMessage, injectIntl, Link, useIntl} from "gatsby-plugin-react-intl"
import Parser from "html-react-parser"
import {injectIntl, useIntl} from "gatsby-plugin-react-intl"
import Layout from "../../components/layout"
import SEO from "../../components/seo"
import Projects from "../../components/templates/projectsTemplate";
const PhysicsPage = ({data}) => {
const intl = useIntl()
const lang = intl.locale
var posts = ""
let physicsProjects = "";
if (lang === "ru") {
posts = data.ru_projects.edges;
physicsProjects = data.ru_projects.edges;
} else if (lang === "en") {
posts = data.en_projects.edges;
physicsProjects = data.en_projects.edges;
}
return (
<Layout>
<SEO lang={lang} title={intl.formatMessage({id: "title"})}/>
<ul className="nav nav-tabs">
<li className="nav-item"><Link id="project" className="nav-link active"
to="/projects/physics"><FormattedMessage id="physics.bc_title"/></Link>
</li>
<li className="nav-item"><Link id="project" className="nav-link "
to="/projects/education"><FormattedMessage
id="education.bc_title"/></Link></li>
<li className="nav-item"><Link id="project" className="nav-link " to="/projects/math"><FormattedMessage
id="math.bc_title"/></Link></li>
<li className="nav-item"><Link id="project" className="nav-link "
to="/projects/software"><FormattedMessage id="software.bc_title"/></Link>
</li>
</ul>
<h1 style={{marginTop: `20px`}}><FormattedMessage id="physics.title"/></h1>
<p style={{marginBottom: `5px`}}><FormattedMessage id="physics.description"/></p>
<ul>
{posts.map(({node}) => {
const link = node.frontmatter.shortTitle;
const id = node.frontmatter.id;
return (
<li><Link to={`/projects/physics#${id}`}>{link}</Link></li>
)
})}
</ul>
{posts.map(({node}) => {
const title = node.frontmatter.title;
const id = node.frontmatter.id;
return (
<div className="row" id={id}>
<div className="col-lg-12">
<hr/>
<h2 name={id}>{title}</h2>
<div>{Parser(node.html)}</div>
</div>
</div>
)
})}
<Projects projects={physicsProjects} project_type="physics"/>
</Layout>
)
}
@ -66,7 +25,7 @@ export default injectIntl(PhysicsPage)
export const query = graphql`
query{
ru_projects: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "project_physics"}, published: {eq: true}, language: {eq: "ru"}}},
ru_projects: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "project"}, project_type: {eq: "physics"} published: {ne: false}, language: {eq: "ru"}}},
sort: {fields: [frontmatter___order], order: ASC}){
edges{
node{
@ -79,7 +38,7 @@ export const query = graphql`
}
}}
en_projects: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "project_physics"}, published: {eq: true}, language: {eq: "en"}}},
en_projects: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "project"}, project_type: {eq: "physics"} published: {ne: false}, language: {eq: "en"}}},
sort: {fields: [frontmatter___order], order: ASC}){
edges{
node{

View File

@ -1,73 +1,22 @@
import React from "react"
import {graphql} from "gatsby"
import {FormattedMessage, injectIntl, Link, useIntl} from "gatsby-plugin-react-intl"
import Parser from "html-react-parser"
import {injectIntl, useIntl} from "react-intl"
import Layout from "../../components/layout"
import SEO from "../../components/seo"
import Projects from "../../components/templates/projectsTemplate";
const SoftwarePage = ({data}) => {
const intl = useIntl()
const lang = intl.locale
var posts = ""
let softwareProjects = "";
if (lang === "ru") {
posts = data.ru_projects.edges;
softwareProjects = data.ru_projects.edges;
} else if (lang === "en") {
posts = data.en_projects.edges;
softwareProjects = data.en_projects.edges;
}
return (
<Layout>
<SEO lang={lang} title={intl.formatMessage({id: "title"})}/>
<ul className="nav nav-tabs">
<li className="nav-item">
<Link id="project" className="nav-link " to="/projects/physics">
<FormattedMessage id="physics.bc_title"/>
</Link>
</li>
<li className="nav-item">
<Link id="project" className="nav-link " to="/projects/education">
<FormattedMessage id="education.bc_title"/>
</Link>
</li>
<li className="nav-item">
<Link id="project" className="nav-link " to="/projects/math">
<FormattedMessage id="math.bc_title"/>
</Link>
</li>
<li className="nav-item">
<Link id="project" className="nav-link active" to="/projects/software">
<FormattedMessage id="software.bc_title"/>
</Link>
</li>
</ul>
<h1 style={{marginTop: `20px`}}><FormattedMessage id="software.title"/></h1>
<p style={{marginBottom: `5px`}}><FormattedMessage id="software.description"/></p>
<ul>
{posts.map(({node}) => {
const link = node.frontmatter.shortTitle;
const id = node.frontmatter.id;
return (
<li><Link to={`/projects/software#${id}`}>{link}</Link></li>
)
})}
</ul>
{posts.map(({node}) => {
const title = node.frontmatter.title;
const id = node.frontmatter.id;
return (
<div className="row" id={id}>
<div className="col-lg-12">
<hr/>
<h2 name={id}>{title}</h2>
<div>{Parser(node.html)}</div>
</div>
</div>
)
})}
<Projects projects={softwareProjects} project_type="software"/>
</Layout>
)
}
@ -76,7 +25,7 @@ export default injectIntl(SoftwarePage)
export const query = graphql`
query{
ru_projects: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "project_software"}, published: {eq: true}, language: {eq: "ru"}}},
ru_projects: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "project"}, project_type: {eq: "software"}, published: {ne: false}, language: {eq: "ru"}}},
sort: {fields: [frontmatter___order], order: ASC}){
edges{
node{
@ -89,7 +38,7 @@ export const query = graphql`
}
}}
en_projects: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "project_software"}, published: {eq: true}, language: {eq: "en"}}},
en_projects: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "project"}, project_type: {eq: "software"}, published: {ne: false}, language: {eq: "en"}}},
sort: {fields: [frontmatter___order], order: ASC}){
edges{
node{

View File

@ -4,7 +4,6 @@ import {injectIntl, Link, useIntl} from "gatsby-plugin-react-intl"
import Parser from "html-react-parser"
import Layout from "../components/layout"
import SEO from "../components/seo"
const PublicationsPage = ({data}) => {
const intl = useIntl()
@ -17,8 +16,6 @@ const PublicationsPage = ({data}) => {
}
return (
<Layout>
<SEO lang={lang} title={intl.formatMessage({id: "title"})}/>
{publications.map(({node}) => {
const title = node.frontmatter.title
return (
@ -44,7 +41,7 @@ export default injectIntl(PublicationsPage)
export const query = graphql`
query{
ru_publications: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "publications"}, published: {eq: true}, language: {eq: "ru"}}}){
ru_publications: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "publications"}, published: {ne: false}, language: {eq: "ru"}}}){
edges{
node{
html
@ -55,7 +52,7 @@ export const query = graphql`
}
}}
en_publications: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "publications"}, published: {eq: true}, language: {eq: "en"}}}){
en_publications: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "publications"}, published: {ne: false}, language: {eq: "en"}}}){
edges{
node{
html

View File

@ -4,7 +4,6 @@ import {FormattedMessage, injectIntl, Link, useIntl} from "gatsby-plugin-react-i
import Parser from "html-react-parser"
import Layout from "../components/layout"
import SEO from "../components/seo"
const QuarksPage = ({data}) => {
const intl = useIntl()
@ -17,8 +16,6 @@ const QuarksPage = ({data}) => {
}
return (
<Layout>
<SEO lang={lang} title={intl.formatMessage({id: "title"})}/>
<nav aria-label="breadcrumb">
<ol className="breadcrumb" style={{margin: 0}}>
<li className="breadcrumb-item">
@ -41,7 +38,7 @@ export default injectIntl(QuarksPage)
export const query = graphql`
query{
ru_publications: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "quarks"}, published: {eq: true}, language: {eq: "ru"}}}){
ru_publications: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "quarks"}, published: {ne: false}, language: {eq: "ru"}}}){
edges{
node{
html
@ -51,7 +48,7 @@ export const query = graphql`
}
}}
en_publications: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "quarks"}, published: {eq: true}, language: {eq: "en"}}}){
en_publications: allMarkdownRemark(filter: {frontmatter: {content_type: {eq: "quarks"}, published: {ne: false}, language: {eq: "en"}}}){
edges{
node{
html

View File

@ -1,4 +1,4 @@
nav#site-navbar.navbar.navbar-expand-lg.navbar-light.bg-dark.fixed-top {
nav#site-navbar.navbar.navbar-expand-lg.bg-dark.fixed-top {
height: 75px;
}
@ -10,6 +10,11 @@ img#logo {
margin-bottom: 0;
}
/*
a.nav-item span{
color: white;
}
a[href="/"] {
padding-top: 1.5%;
opacity: 0.75
@ -29,6 +34,11 @@ a.link-no-style[href="/"] {
margin-top: 0
}
a.link-no-style[href="/"] {
padding: 0;
margin-top: 0
}
a.link-no-style span[data-rb-event-key="news"].nav-link,
a.link-no-style span[data-rb-event-key="about"].nav-link,
a.link-no-style span[data-rb-event-key="projects"].nav-link,
@ -38,6 +48,7 @@ a.link-no-style span[data-rb-event-key="partners"].nav-link {
margin-right: 10px;
}
a.link-no-style {
margin-top: 10px;
}
@ -62,10 +73,13 @@ a.active {
margin-bottom: 8px;
}
.navbar-light .navbar-nav a.active > .nav-link {
color: white;
}
*/
a.language.nav-link {
margin-left: 50px;
}
@ -104,7 +118,7 @@ div p a:hover {
/* ----- collapse show ---------------------- */
@media (max-width: 769px) {
a.activeBrand {
margin: 0 0px 0 20px;
margin: 0 0 0 20px;
padding-top: 0
}
@ -118,13 +132,13 @@ div p a:hover {
/* button.navbar-toggler.collapsed { margin-top: 0px; margin-left: 15px; } */
button.navbar-toggler {
margin-top: 0px;
margin-top: 0;
margin-right: 17px;
}
div#basic-navbar-nav.navbar-collapse.collapse.show {
width: 100px;
padding-bottom: 0px;
padding-bottom: 0;
text-align: center;
background-color: rgb(52, 58, 64);
margin-top: -0px;