head image
This commit is contained in:
parent
569c4f60c5
commit
b98e05c8a7
@ -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 = 'Образование';
|
||||
|
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 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" })} />
|
||||
|
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