From a647f838a0904b950304c28747eae64945432bb0 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sun, 28 Mar 2021 21:32:20 +0300 Subject: [PATCH] New style for magprog --- gatsby-config.js | 2 +- gatsby-node.js | 35 +- package.json | 6 +- src/components/footer.js | 10 +- src/components/layout.js | 14 +- .../magprog/common/MagProgSection.js | 11 + src/components/navBar.js | 4 +- src/components/templates/courseTemplate.js | 16 +- src/components/templates/news.js | 4 +- src/components/templates/projectsTemplate.js | 22 - src/content/en/pages/atom.md | 2 +- src/content/en/pages/kotlin.md | 2 +- src/content/en/pages/stat-methods.md | 2 +- src/content/en/pages/subterranean.md | 2 +- src/content/ru/magprog/contacts.md | 11 + src/content/ru/magprog/enroll.md | 10 + src/content/ru/magprog/intro.md | 85 - src/content/ru/magprog/partners.md | 16 + src/content/ru/magprog/program.md | 17 + src/content/ru/magprog/team.md | 12 + src/content/ru/magprog/what.md | 10 + src/content/ru/magprog/why.md | 26 + src/content/ru/pages/atom.md | 2 +- src/content/ru/pages/kotlin.md | 2 +- src/content/ru/pages/stat-methods.md | 2 +- src/content/ru/pages/subterranean.md | 2 +- src/pages/index.js | 7 +- src/pages/magprog.js | 30 - src/pages/magprog/elements.js | 585 +++ src/pages/magprog/generic.js | 39 + src/pages/magprog/index.js | 111 + src/pages/partners.js | 4 +- src/styles/layout.css | 23 +- src/styles/main.css | 1 - src/styles/navbar.css | 88 +- static/magprog/css/fontawesome-all.min.css | 5 + static/magprog/css/main.css | 3915 ++++++++++++++ static/magprog/css/noscript.css | 43 + static/magprog/fonts/FontAwesome.otf | Bin 0 -> 134808 bytes static/magprog/fonts/fontawesome-webfont.eot | Bin 0 -> 165742 bytes static/magprog/fonts/fontawesome-webfont.svg | 2671 ++++++++++ static/magprog/fonts/fontawesome-webfont.ttf | Bin 0 -> 165548 bytes static/magprog/fonts/fontawesome-webfont.woff | Bin 0 -> 98024 bytes .../magprog/fonts/fontawesome-webfont.woff2 | Bin 0 -> 77160 bytes static/magprog/js/breakpoints.min.js | 2 + static/magprog/js/browser.min.js | 2 + static/magprog/js/jquery.min.js | 2 + static/magprog/js/jquery.scrollex.min.js | 2 + static/magprog/js/jquery.scrolly.min.js | 2 + static/magprog/js/main.js | 190 + static/magprog/js/util.js | 587 +++ static/magprog/webfonts/fa-brands-400.eot | Bin 0 -> 129352 bytes static/magprog/webfonts/fa-brands-400.svg | 3442 ++++++++++++ static/magprog/webfonts/fa-brands-400.ttf | Bin 0 -> 129048 bytes static/magprog/webfonts/fa-brands-400.woff | Bin 0 -> 87352 bytes static/magprog/webfonts/fa-brands-400.woff2 | Bin 0 -> 74508 bytes static/magprog/webfonts/fa-regular-400.eot | Bin 0 -> 34388 bytes static/magprog/webfonts/fa-regular-400.svg | 803 +++ static/magprog/webfonts/fa-regular-400.ttf | Bin 0 -> 34092 bytes static/magprog/webfonts/fa-regular-400.woff | Bin 0 -> 16804 bytes static/magprog/webfonts/fa-regular-400.woff2 | Bin 0 -> 13580 bytes static/magprog/webfonts/fa-solid-900.eot | Bin 0 -> 192116 bytes static/magprog/webfonts/fa-solid-900.svg | 4649 +++++++++++++++++ static/magprog/webfonts/fa-solid-900.ttf | Bin 0 -> 191832 bytes static/magprog/webfonts/fa-solid-900.woff | Bin 0 -> 98020 bytes static/magprog/webfonts/fa-solid-900.woff2 | Bin 0 -> 75440 bytes yarn.lock | 538 +- 67 files changed, 17723 insertions(+), 345 deletions(-) create mode 100644 src/components/magprog/common/MagProgSection.js create mode 100644 src/content/ru/magprog/contacts.md create mode 100644 src/content/ru/magprog/enroll.md delete mode 100644 src/content/ru/magprog/intro.md create mode 100644 src/content/ru/magprog/partners.md create mode 100644 src/content/ru/magprog/program.md create mode 100644 src/content/ru/magprog/team.md create mode 100644 src/content/ru/magprog/what.md create mode 100644 src/content/ru/magprog/why.md delete mode 100644 src/pages/magprog.js create mode 100644 src/pages/magprog/elements.js create mode 100644 src/pages/magprog/generic.js create mode 100644 src/pages/magprog/index.js create mode 100644 static/magprog/css/fontawesome-all.min.css create mode 100644 static/magprog/css/main.css create mode 100644 static/magprog/css/noscript.css create mode 100644 static/magprog/fonts/FontAwesome.otf create mode 100644 static/magprog/fonts/fontawesome-webfont.eot create mode 100644 static/magprog/fonts/fontawesome-webfont.svg create mode 100644 static/magprog/fonts/fontawesome-webfont.ttf create mode 100644 static/magprog/fonts/fontawesome-webfont.woff create mode 100644 static/magprog/fonts/fontawesome-webfont.woff2 create mode 100644 static/magprog/js/breakpoints.min.js create mode 100644 static/magprog/js/browser.min.js create mode 100644 static/magprog/js/jquery.min.js create mode 100644 static/magprog/js/jquery.scrollex.min.js create mode 100644 static/magprog/js/jquery.scrolly.min.js create mode 100644 static/magprog/js/main.js create mode 100644 static/magprog/js/util.js create mode 100644 static/magprog/webfonts/fa-brands-400.eot create mode 100644 static/magprog/webfonts/fa-brands-400.svg create mode 100644 static/magprog/webfonts/fa-brands-400.ttf create mode 100644 static/magprog/webfonts/fa-brands-400.woff create mode 100644 static/magprog/webfonts/fa-brands-400.woff2 create mode 100644 static/magprog/webfonts/fa-regular-400.eot create mode 100644 static/magprog/webfonts/fa-regular-400.svg create mode 100644 static/magprog/webfonts/fa-regular-400.ttf create mode 100644 static/magprog/webfonts/fa-regular-400.woff create mode 100644 static/magprog/webfonts/fa-regular-400.woff2 create mode 100644 static/magprog/webfonts/fa-solid-900.eot create mode 100644 static/magprog/webfonts/fa-solid-900.svg create mode 100644 static/magprog/webfonts/fa-solid-900.ttf create mode 100644 static/magprog/webfonts/fa-solid-900.woff create mode 100644 static/magprog/webfonts/fa-solid-900.woff2 diff --git a/gatsby-config.js b/gatsby-config.js index 243731f..8178534 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -58,6 +58,6 @@ module.exports = { redirect: true, redirectComponent: require.resolve(`./src/components/redirect.js`), }, - } + }, ], } \ No newline at end of file diff --git a/gatsby-node.js b/gatsby-node.js index 8ea7d98..e9fc3c0 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -25,19 +25,6 @@ exports.createPages = async ({actions, graphql}) => { // language=GraphQL const result = await graphql(` { - courses: allMarkdownRemark( - filter: {frontmatter: {content_type: {eq: "page_education"}, published: {ne: false}}} - ){ - edges{ - node{ - html - frontmatter{ - title - path - } - } - } - } news: allMarkdownRemark( filter: {frontmatter: {content_type: {eq: "post"}, published: {ne: false}}}, @@ -54,14 +41,30 @@ exports.createPages = async ({actions, graphql}) => { } } } - }`) + + coursePages: allMarkdownRemark( + filter: {frontmatter: {content_type: {eq: "course"}, published: {ne: false}}} + ){ + edges{ + node{ + html + frontmatter{ + path + slug + } + } + } + } + } + `) if (result.errors) { throw result.errors; } + // Render courses const courseTemplate = path.resolve(`./src/components/templates/courseTemplate.js`); - const courses = result.data.courses.edges; + const courses = result.data.coursePages.edges; courses.forEach(({node}) => { createPage({ @@ -70,7 +73,7 @@ exports.createPages = async ({actions, graphql}) => { }) }); - /////////////////////////////////////////////////////////////////// + // Render news page const newsTemplate = path.resolve(`./src/components/templates/news.js`); const posts = result.data.news.edges; diff --git a/package.json b/package.json index d7b0203..d93177e 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,8 @@ "gatsby-source-graphql": "3.1.0", "gatsby-transformer-remark": "3.1.0", "gatsby-transformer-sharp": "3.1.0", + "node-sass": "^5.0.0", + "gatsby-plugin-sass": "4.1.0", "html-react-parser": "1.2.4", "imagemin-pngquant": "9.0.2", "jquery": "3.6.0", @@ -36,7 +38,9 @@ "react-intl": "^5.13.5", "redux": "4.0.5", "typescript": "^4.2.3", - "vertical-timeline-component-for-react": "1.0.7" + "vertical-timeline-component-for-react": "1.0.7", + "react-scrollspy": "^3.4.3", + "smoothscroll-polyfill": "^0.4.4" }, "devDependencies": { "autoprefixer": "10.2.5", diff --git a/src/components/footer.js b/src/components/footer.js index f8bc199..eba6a7e 100644 --- a/src/components/footer.js +++ b/src/components/footer.js @@ -1,11 +1,11 @@ import React from "react" import "../styles/footer.css" -const Footer = () => ( -