head image

This commit is contained in:
Elinorre 2020-03-03 22:59:20 +03:00
parent 569c4f60c5
commit b98e05c8a7
4 changed files with 9 additions and 5 deletions

View File

@ -1,6 +1,6 @@
import React from "react"
import { graphql } from "gatsby"
import { FormattedMessage, Link, useIntl, injectIntl } from "gatsby-plugin-intl"
import { Link, useIntl, injectIntl } from "gatsby-plugin-intl"
import SEO from "../seo"
import Layout from "../layout"
@ -11,7 +11,7 @@ const Template = (props) => {
console.log(course)
let par = 'Физика'
if (lang == "ru"){
if (lang === "ru"){
switch (course.frontmatter.parent) {
case 'education':
par = 'Образование';

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -4,7 +4,8 @@ import { graphql } from "gatsby"
import Layout from "../components/layout"
import SEO from "../components/seo"
import head from "../images/index/head.png"
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"
@ -13,8 +14,11 @@ const IndexPage = ({ data }) => {
const intl = useIntl()
const lang = intl.locale
var news = ""
if ( lang==="ru" ) { news = data.ru_posts.edges; }
else if ( lang==="en" ) { news = data.en_posts.edges; }
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; }
return(
<Layout>
<SEO lang={lang} title={intl.formatMessage({ id: "title" })} />

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB