1 line
3.7 KiB
Plaintext
1 line
3.7 KiB
Plaintext
{"version":3,"sources":["webpack:///./src/components/templates/courseTemplate.js"],"names":["injectIntl","props","intl","useIntl","lang","locale","course","data","console","log","par","frontmatter","parent","title","formatMessage","id","aria-label","className","style","margin","to","aria-current","shortTitle","marginTop","textAlign","dangerouslySetInnerHTML","__html","html","CourseQuery"],"mappings":"6FAAA,gHA4DeA,gCAtDE,SAACC,GACd,IAAMC,EAAOC,oBACPC,EAAOF,EAAKG,OACZC,EAASL,EAAMM,KAAKD,OAC1BE,QAAQC,IAAIH,GAEZ,IAAII,EAAM,SACV,GAAa,OAATN,EACA,OAAQE,EAAOK,YAAYC,QACvB,IAAK,YACDF,EAAM,cACN,MACJ,IAAK,OACDA,EAAM,aACN,MACJ,IAAK,WACDA,EAAM,0BACN,MACJ,QACIA,EAAM,cAGd,OAAQJ,EAAOK,YAAYC,QACvB,IAAK,YACDF,EAAM,YACN,MACJ,IAAK,OACDA,EAAM,QACN,MACJ,IAAK,WACDA,EAAM,WACN,MACJ,QACIA,EAAM,UAGlB,OACE,kBAAC,IAAD,KACA,kBAAC,IAAD,CAAKN,KAAMA,EAAMS,MAAOX,EAAKY,cAAc,CAAEC,GAAI,YAC3C,yBAAKC,aAAW,cAChB,wBAAIC,UAAU,aAAaC,MAAO,CAACC,OAAQ,IACvC,wBAAIF,UAAU,mBACV,kBAAC,OAAD,CAAMG,GAAE,aAAed,EAAOK,YAAYC,QAAWF,IAEzD,wBAAIO,UAAU,yBAAyBI,eAAa,QAAQf,EAAOK,YAAYW,cAInF,wBAAIJ,MAAO,CAACK,UAAU,OAASC,UAAU,WAAalB,EAAOK,YAAYE,OACzE,yBAAKY,wBAAyB,CAACC,OAAQpB,EAAOqB,YAOnD,IAAMC,EAAW","file":"component---src-components-templates-course-template-js-3c9a701a382d0aae6105.js","sourcesContent":["import React from \"react\"\r\nimport { graphql } from \"gatsby\"\r\nimport { Link, useIntl, injectIntl } from \"gatsby-plugin-intl\"\r\nimport SEO from \"../seo\"\r\nimport Layout from \"../layout\"\r\n\r\nconst Template = (props) => {\r\n const intl = useIntl()\r\n const lang = intl.locale\r\n const course = props.data.course\r\n console.log(course)\r\n\r\n let par = 'Физика'\r\n if (lang === \"ru\"){\r\n switch (course.frontmatter.parent) {\r\n case 'education':\r\n par = 'Образование';\r\n break;\r\n case 'math':\r\n par = 'Математика';\r\n break;\r\n case 'software':\r\n par = 'Программное обеспечение';\r\n break;\r\n default:\r\n par = 'Физика';\r\n }}\r\n else {\r\n switch (course.frontmatter.parent) {\r\n case 'education':\r\n par = 'Education';\r\n break;\r\n case 'math':\r\n par = 'Maths';\r\n break;\r\n case 'software':\r\n par = 'Software';\r\n break;\r\n default:\r\n par = 'Physics';\r\n } \r\n }\r\n return(\r\n <Layout>\r\n <SEO lang={lang} title={intl.formatMessage({ id: \"title\" })} />\r\n <nav aria-label=\"breadcrumb\">\r\n <ol className=\"breadcrumb\" style={{margin: 0}}>\r\n <li className=\"breadcrumb-item\">\r\n <Link to={`/projects/${course.frontmatter.parent}`}>{par}</Link>\r\n </li>\r\n <li className=\"breadcrumb-item active\" aria-current=\"page\">{course.frontmatter.shortTitle}</li>\r\n </ol>\r\n </nav>\r\n\r\n <h1 style={{marginTop: `15px`, textAlign: `center`}}>{course.frontmatter.title}</h1>\r\n <div dangerouslySetInnerHTML={{__html: course.html}}/>\r\n </Layout>\r\n )\r\n}\r\n\r\nexport default injectIntl(Template)\r\n\r\nexport const CourseQuery = graphql`\r\n query CourseByPath($path: String){\r\n course: markdownRemark(frontmatter: {slug: {eq: $path}}){\r\n html\r\n frontmatter{\r\n title\r\n shortTitle\r\n path\r\n parent\r\n slug\r\n }}\r\n }`"],"sourceRoot":""} |