head image
This commit is contained in:
parent
569c4f60c5
commit
b98e05c8a7
@ -1,6 +1,6 @@
|
|||||||
import React from "react"
|
import React from "react"
|
||||||
import { graphql } from "gatsby"
|
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 SEO from "../seo"
|
||||||
import Layout from "../layout"
|
import Layout from "../layout"
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ const Template = (props) => {
|
|||||||
console.log(course)
|
console.log(course)
|
||||||
|
|
||||||
let par = 'Физика'
|
let par = 'Физика'
|
||||||
if (lang == "ru"){
|
if (lang === "ru"){
|
||||||
switch (course.frontmatter.parent) {
|
switch (course.frontmatter.parent) {
|
||||||
case 'education':
|
case 'education':
|
||||||
par = 'Образование';
|
par = 'Образование';
|
||||||
|
BIN
src/images/index/head_en.png
Normal file
BIN
src/images/index/head_en.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
@ -4,7 +4,8 @@ import { graphql } from "gatsby"
|
|||||||
import Layout from "../components/layout"
|
import Layout from "../components/layout"
|
||||||
import SEO from "../components/seo"
|
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/main.css"
|
||||||
import "../styles/bootstrap.min.css"
|
import "../styles/bootstrap.min.css"
|
||||||
import {Jumbotron, Button} from "react-bootstrap"
|
import {Jumbotron, Button} from "react-bootstrap"
|
||||||
@ -13,8 +14,11 @@ const IndexPage = ({ data }) => {
|
|||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
const lang = intl.locale
|
const lang = intl.locale
|
||||||
var news = ""
|
var news = ""
|
||||||
if ( lang==="ru" ) { news = data.ru_posts.edges; }
|
var head = ""
|
||||||
else if ( lang==="en" ) { news = data.en_posts.edges; }
|
if ( lang==="ru" ) { news = data.ru_posts.edges; head = head_ru; }
|
||||||
|
else if ( lang==="en" ) { news = data.en_posts.edges; head = head_en; }
|
||||||
|
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<Layout>
|
<Layout>
|
||||||
<SEO lang={lang} title={intl.formatMessage({ id: "title" })} />
|
<SEO lang={lang} title={intl.formatMessage({ id: "title" })} />
|
||||||
|
BIN
static/images/index/head_en.png
Normal file
BIN
static/images/index/head_en.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Loading…
Reference in New Issue
Block a user