From bf58cd9d41d6a35e9f4bbd9138b5f528d5a9704d Mon Sep 17 00:00:00 2001 From: Elinorre Date: Wed, 15 Jan 2020 17:45:50 +0300 Subject: [PATCH] initial commit --- .gitignore | 69 + .prettierignore | 4 + .prettierrc | 7 + README.md | 60 + assets.bat | 2 + gatsby-config.js | 58 + gatsby-node.js | 37 + gatsby-ssr.js | 75 + package-lock.json | 22052 ++++++++++++++++ package.json | 79 + src/components/courseTemplate.js | 50 + src/components/dataforge/footer.js | 23 + src/components/dataforge/header.js | 7 + src/components/dataforge/layout.js | 23 + src/components/footer.js | 20 + src/components/header.js | 47 + src/components/layout.js | 27 + src/files/biref.pdf | Bin 0 -> 767851 bytes src/files/conference_2017_invitation.pdf | 4499 ++++ src/files/npm-2018.pdf | Bin 0 -> 121152 bytes src/files/report_06_10_16.pdf | Bin 0 -> 4234704 bytes src/files/stat-methods-2017.pdf | Bin 0 -> 656918 bytes src/images/dataforge/df_logo.png | Bin 0 -> 12640 bytes src/images/icon.png | Bin 0 -> 14296 bytes src/images/index/conference_2017_header.png | Bin 0 -> 108144 bytes src/images/index/head.png | Bin 0 -> 13094 bytes src/images/index/npm-logo-no-text.svg | 119 + src/images/members/Inzhechik.jpg | Bin 0 -> 129352 bytes src/images/members/abramova.jpg | Bin 0 -> 810870 bytes src/images/members/almaz.jpg | Bin 0 -> 25460 bytes src/images/members/chernov.png | Bin 0 -> 1187716 bytes src/images/members/hamitov.jpg | Bin 0 -> 42176 bytes src/images/members/khudyakov.jpg | Bin 0 -> 78534 bytes src/images/members/klimai.jpg | Bin 0 -> 28585 bytes src/images/members/koroteev.png | Bin 0 -> 1101332 bytes src/images/members/maria.png | Bin 0 -> 590680 bytes src/images/members/nozik.png | Bin 0 -> 568129 bytes src/images/members/olga.png | Bin 0 -> 774078 bytes src/images/members/polina.png | Bin 0 -> 635246 bytes src/images/members/stadnichuk.jpg | Bin 0 -> 159023 bytes src/images/members/svetlichnii.jpeg | Bin 0 -> 14357 bytes src/images/members/timofey.png | Bin 0 -> 361283 bytes src/images/members/vyborov.png | Bin 0 -> 1118993 bytes src/images/members/zelenyy.jpg | Bin 0 -> 954675 bytes src/images/members/zhabin.jpg | Bin 0 -> 8247 bytes src/images/pages/Poster_QUARKS_2020.jpeg | Bin 0 -> 917811 bytes src/images/pages/Site_thumbnail8.png | Bin 0 -> 292169 bytes src/images/partners/Linac-OUK_big.gif | Bin 0 -> 227642 bytes src/images/partners/inr_logo.png | Bin 0 -> 12445 bytes src/images/partners/mipt_logo.jpg | Bin 0 -> 69743 bytes src/images/partners/mtl_logo.svg | 78 + src/images/partners/sms_logo.png | Bin 0 -> 20051 bytes src/images/projects/math/deconvolution.png | Bin 0 -> 33296 bytes src/images/projects/math/gears_animated.gif | Bin 0 -> 11477 bytes src/images/projects/physics/GERDA.jpg | Bin 0 -> 164637 bytes src/images/projects/physics/iaxo.png | Bin 0 -> 440796 bytes src/images/projects/physics/map.png | Bin 0 -> 185066 bytes src/images/projects/physics/setup.png | Bin 0 -> 87571 bytes .../projects/physics/spectrometer900.jpg | Bin 0 -> 137762 bytes src/pages/404.js | 11 + src/pages/about.js | 82 + src/pages/content/members/abramova.md | 11 + src/pages/content/members/almaz.md | 12 + src/pages/content/members/anna_zelenaya.md | 8 + src/pages/content/members/chernov.md | 12 + src/pages/content/members/hamitov.md | 11 + src/pages/content/members/inzhechik.md | 32 + src/pages/content/members/khudiakov.md | 13 + src/pages/content/members/klimai.md | 11 + src/pages/content/members/koroteev.md | 9 + src/pages/content/members/nozik.md | 21 + src/pages/content/members/santitov.md | 8 + src/pages/content/members/stadnichuk.md | 9 + src/pages/content/members/svetlichnii.md | 9 + src/pages/content/members/vyborov.md | 12 + src/pages/content/members/zelenyy.md | 11 + src/pages/content/members/zhabin.md | 9 + .../content/news/2018_09_21_lab-intro.md | 11 + src/pages/content/news/2019_01_18.md | 9 + .../content/news/2019_02_27_conference.md | 22 + src/pages/content/news/2019_05_15.md | 26 + .../content/news/2019_06_10_prog_seminar.md | 12 + src/pages/content/news/2019_11_13.md | 27 + .../content/news/2019_12_24_results_2019.md | 20 + .../content/news/Site update 20_01_2017.md | 7 + src/pages/content/news/autumn_2018.md | 48 + src/pages/content/news/conference_2017.md | 14 + src/pages/content/news/new_partners.md | 13 + src/pages/content/news/seminar_05_11_2016.md | 18 + src/pages/content/news/seminar_19_10_2016.md | 19 + src/pages/content/news/site_start.md | 8 + src/pages/content/news/subterranean_2017.md | 14 + src/pages/content/news/update_06_02_2018.md | 10 + src/pages/content/news/update_11_10_2016.md | 12 + src/pages/content/news/update_29_08_2017.md | 9 + src/pages/content/pages/atom.md | 25 + src/pages/content/pages/biref.md | 85 + src/pages/content/pages/kotlin.md | 95 + src/pages/content/pages/publications.md | 225 + src/pages/content/pages/quarks2020.md | 31 + src/pages/content/pages/stat-methods.md | 144 + src/pages/content/pages/subterranean.md | 61 + .../content/projects/education/analysis.md | 10 + src/pages/content/projects/education/atom.md | 11 + .../content/projects/education/kotlin.md | 10 + src/pages/content/projects/education/labs.md | 26 + .../projects/education/lowbackground.md | 11 + .../content/projects/math/deconvolution.md | 91 + .../content/projects/math/significance.md | 18 + src/pages/content/projects/physics/gerda.md | 14 + src/pages/content/projects/physics/iaxo.md | 18 + src/pages/content/projects/physics/mm.md | 61 + src/pages/content/projects/physics/numass.md | 12 + .../content/projects/physics/spectMatter.md | 9 + src/pages/content/projects/physics/tgf.md | 16 + src/pages/content/projects/software/biref.md | 12 + .../content/projects/software/dataforge.md | 10 + src/pages/content/projects/software/kmath.md | 13 + .../content/projects/software/muon-sim.md | 12 + .../content/projects/software/prog-seminar.md | 33 + .../content/projects/software/reactor.md | 12 + src/pages/dataforge/apps.js | 15 + src/pages/dataforge/content/index.md | 107 + .../dataforge/content/news/02_16_update.md | 0 .../dataforge/content/news/08_07_update.md | 0 .../dataforge/content/news/lomonosov_2015.md | 0 .../dataforge/content/news/site-start.md | 8 + src/pages/dataforge/docs.js | 31 + src/pages/dataforge/index.js | 30 + src/pages/dataforge/misc.js | 0 src/pages/dataforge/modules.js | 73 + src/pages/dataforge/news.js | 8 + src/pages/dataforge/releases.js | 0 src/pages/index.js | 100 + src/pages/partners.js | 90 + src/pages/projects/education.js | 77 + src/pages/projects/math.js | 70 + src/pages/projects/physics.js | 70 + src/pages/projects/software.js | 70 + src/pages/publications.js | 38 + src/pages/quarks.js | 37 + src/styles/bootstrap.min.css | 7 + src/styles/dataforge/footer.css | 11 + src/styles/dataforge/header.css | 0 src/styles/dataforge/layout.css | 5 + src/styles/footer.css | 28 + src/styles/header.css | 34 + src/styles/layout.css | 645 + src/styles/main.css | 22 + static/admin/config.yml | 108 + static/files/biref.pdf | Bin 0 -> 767851 bytes static/files/conference_2017_invitation.pdf | 4499 ++++ static/files/main.pdf | 7509 ++++++ static/files/npm-2018.pdf | Bin 0 -> 121152 bytes static/files/report_06_10_16.pdf | Bin 0 -> 4234704 bytes static/files/stat-methods-2017.pdf | Bin 0 -> 656918 bytes static/images/dataforge/df_logo.png | Bin 0 -> 12640 bytes static/images/icon.png | Bin 0 -> 14296 bytes .../images/index/conference_2017_header.png | Bin 0 -> 108144 bytes static/images/index/head.png | Bin 0 -> 13094 bytes static/images/index/npm-logo-no-text.svg | 119 + static/images/members/Inzhechik.jpg | Bin 0 -> 129352 bytes static/images/members/abramova.jpg | Bin 0 -> 810870 bytes static/images/members/almaz.jpg | Bin 0 -> 25460 bytes static/images/members/chernov.png | Bin 0 -> 1187716 bytes static/images/members/hamitov.jpg | Bin 0 -> 42176 bytes static/images/members/khudyakov.jpg | Bin 0 -> 78534 bytes static/images/members/klimai.jpg | Bin 0 -> 28585 bytes static/images/members/koroteev.png | Bin 0 -> 1101332 bytes static/images/members/maria.png | Bin 0 -> 590680 bytes static/images/members/nozik.png | Bin 0 -> 568129 bytes static/images/members/olga.png | Bin 0 -> 774078 bytes static/images/members/polina.png | Bin 0 -> 635246 bytes static/images/members/stadnichuk.jpg | Bin 0 -> 159023 bytes static/images/members/svetlichnii.jpeg | Bin 0 -> 14357 bytes static/images/members/timofey.png | Bin 0 -> 361283 bytes static/images/members/vyborov.png | Bin 0 -> 1118993 bytes static/images/members/zelenyy.jpg | Bin 0 -> 954675 bytes static/images/members/zhabin.jpg | Bin 0 -> 8247 bytes static/images/pages/Poster_QUARKS_2020.jpeg | Bin 0 -> 917811 bytes static/images/pages/Site_thumbnail8.png | Bin 0 -> 292169 bytes static/images/partners/Linac-OUK_big.gif | Bin 0 -> 227642 bytes static/images/partners/inr_logo.png | Bin 0 -> 12445 bytes static/images/partners/mipt_logo.jpg | Bin 0 -> 69743 bytes static/images/partners/mtl_logo.svg | 78 + static/images/partners/sms_logo.png | Bin 0 -> 20051 bytes static/images/projects/math/deconvolution.png | Bin 0 -> 33296 bytes .../images/projects/math/gears_animated.gif | Bin 0 -> 11477 bytes static/images/projects/physics/GERDA.jpg | Bin 0 -> 164637 bytes static/images/projects/physics/iaxo.png | Bin 0 -> 440796 bytes static/images/projects/physics/katrin.jpg | Bin 0 -> 39924 bytes static/images/projects/physics/map.png | Bin 0 -> 185066 bytes static/images/projects/physics/setup.png | Bin 0 -> 87571 bytes .../projects/physics/spectrometer900.jpg | Bin 0 -> 137762 bytes 194 files changed, 42880 insertions(+) create mode 100644 .gitignore create mode 100644 .prettierignore create mode 100644 .prettierrc create mode 100644 README.md create mode 100644 assets.bat create mode 100644 gatsby-config.js create mode 100644 gatsby-node.js create mode 100644 gatsby-ssr.js create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 src/components/courseTemplate.js create mode 100644 src/components/dataforge/footer.js create mode 100644 src/components/dataforge/header.js create mode 100644 src/components/dataforge/layout.js create mode 100644 src/components/footer.js create mode 100644 src/components/header.js create mode 100644 src/components/layout.js create mode 100644 src/files/biref.pdf create mode 100644 src/files/conference_2017_invitation.pdf create mode 100644 src/files/npm-2018.pdf create mode 100644 src/files/report_06_10_16.pdf create mode 100644 src/files/stat-methods-2017.pdf create mode 100644 src/images/dataforge/df_logo.png create mode 100644 src/images/icon.png create mode 100644 src/images/index/conference_2017_header.png create mode 100644 src/images/index/head.png create mode 100644 src/images/index/npm-logo-no-text.svg create mode 100644 src/images/members/Inzhechik.jpg create mode 100644 src/images/members/abramova.jpg create mode 100644 src/images/members/almaz.jpg create mode 100644 src/images/members/chernov.png create mode 100644 src/images/members/hamitov.jpg create mode 100644 src/images/members/khudyakov.jpg create mode 100644 src/images/members/klimai.jpg create mode 100644 src/images/members/koroteev.png create mode 100644 src/images/members/maria.png create mode 100644 src/images/members/nozik.png create mode 100644 src/images/members/olga.png create mode 100644 src/images/members/polina.png create mode 100644 src/images/members/stadnichuk.jpg create mode 100644 src/images/members/svetlichnii.jpeg create mode 100644 src/images/members/timofey.png create mode 100644 src/images/members/vyborov.png create mode 100644 src/images/members/zelenyy.jpg create mode 100644 src/images/members/zhabin.jpg create mode 100644 src/images/pages/Poster_QUARKS_2020.jpeg create mode 100644 src/images/pages/Site_thumbnail8.png create mode 100644 src/images/partners/Linac-OUK_big.gif create mode 100644 src/images/partners/inr_logo.png create mode 100644 src/images/partners/mipt_logo.jpg create mode 100644 src/images/partners/mtl_logo.svg create mode 100644 src/images/partners/sms_logo.png create mode 100644 src/images/projects/math/deconvolution.png create mode 100644 src/images/projects/math/gears_animated.gif create mode 100644 src/images/projects/physics/GERDA.jpg create mode 100644 src/images/projects/physics/iaxo.png create mode 100644 src/images/projects/physics/map.png create mode 100644 src/images/projects/physics/setup.png create mode 100644 src/images/projects/physics/spectrometer900.jpg create mode 100644 src/pages/404.js create mode 100644 src/pages/about.js create mode 100644 src/pages/content/members/abramova.md create mode 100644 src/pages/content/members/almaz.md create mode 100644 src/pages/content/members/anna_zelenaya.md create mode 100644 src/pages/content/members/chernov.md create mode 100644 src/pages/content/members/hamitov.md create mode 100644 src/pages/content/members/inzhechik.md create mode 100644 src/pages/content/members/khudiakov.md create mode 100644 src/pages/content/members/klimai.md create mode 100644 src/pages/content/members/koroteev.md create mode 100644 src/pages/content/members/nozik.md create mode 100644 src/pages/content/members/santitov.md create mode 100644 src/pages/content/members/stadnichuk.md create mode 100644 src/pages/content/members/svetlichnii.md create mode 100644 src/pages/content/members/vyborov.md create mode 100644 src/pages/content/members/zelenyy.md create mode 100644 src/pages/content/members/zhabin.md create mode 100644 src/pages/content/news/2018_09_21_lab-intro.md create mode 100644 src/pages/content/news/2019_01_18.md create mode 100644 src/pages/content/news/2019_02_27_conference.md create mode 100644 src/pages/content/news/2019_05_15.md create mode 100644 src/pages/content/news/2019_06_10_prog_seminar.md create mode 100644 src/pages/content/news/2019_11_13.md create mode 100644 src/pages/content/news/2019_12_24_results_2019.md create mode 100644 src/pages/content/news/Site update 20_01_2017.md create mode 100644 src/pages/content/news/autumn_2018.md create mode 100644 src/pages/content/news/conference_2017.md create mode 100644 src/pages/content/news/new_partners.md create mode 100644 src/pages/content/news/seminar_05_11_2016.md create mode 100644 src/pages/content/news/seminar_19_10_2016.md create mode 100644 src/pages/content/news/site_start.md create mode 100644 src/pages/content/news/subterranean_2017.md create mode 100644 src/pages/content/news/update_06_02_2018.md create mode 100644 src/pages/content/news/update_11_10_2016.md create mode 100644 src/pages/content/news/update_29_08_2017.md create mode 100644 src/pages/content/pages/atom.md create mode 100644 src/pages/content/pages/biref.md create mode 100644 src/pages/content/pages/kotlin.md create mode 100644 src/pages/content/pages/publications.md create mode 100644 src/pages/content/pages/quarks2020.md create mode 100644 src/pages/content/pages/stat-methods.md create mode 100644 src/pages/content/pages/subterranean.md create mode 100644 src/pages/content/projects/education/analysis.md create mode 100644 src/pages/content/projects/education/atom.md create mode 100644 src/pages/content/projects/education/kotlin.md create mode 100644 src/pages/content/projects/education/labs.md create mode 100644 src/pages/content/projects/education/lowbackground.md create mode 100644 src/pages/content/projects/math/deconvolution.md create mode 100644 src/pages/content/projects/math/significance.md create mode 100644 src/pages/content/projects/physics/gerda.md create mode 100644 src/pages/content/projects/physics/iaxo.md create mode 100644 src/pages/content/projects/physics/mm.md create mode 100644 src/pages/content/projects/physics/numass.md create mode 100644 src/pages/content/projects/physics/spectMatter.md create mode 100644 src/pages/content/projects/physics/tgf.md create mode 100644 src/pages/content/projects/software/biref.md create mode 100644 src/pages/content/projects/software/dataforge.md create mode 100644 src/pages/content/projects/software/kmath.md create mode 100644 src/pages/content/projects/software/muon-sim.md create mode 100644 src/pages/content/projects/software/prog-seminar.md create mode 100644 src/pages/content/projects/software/reactor.md create mode 100644 src/pages/dataforge/apps.js create mode 100644 src/pages/dataforge/content/index.md create mode 100644 src/pages/dataforge/content/news/02_16_update.md create mode 100644 src/pages/dataforge/content/news/08_07_update.md create mode 100644 src/pages/dataforge/content/news/lomonosov_2015.md create mode 100644 src/pages/dataforge/content/news/site-start.md create mode 100644 src/pages/dataforge/docs.js create mode 100644 src/pages/dataforge/index.js create mode 100644 src/pages/dataforge/misc.js create mode 100644 src/pages/dataforge/modules.js create mode 100644 src/pages/dataforge/news.js create mode 100644 src/pages/dataforge/releases.js create mode 100644 src/pages/index.js create mode 100644 src/pages/partners.js create mode 100644 src/pages/projects/education.js create mode 100644 src/pages/projects/math.js create mode 100644 src/pages/projects/physics.js create mode 100644 src/pages/projects/software.js create mode 100644 src/pages/publications.js create mode 100644 src/pages/quarks.js create mode 100644 src/styles/bootstrap.min.css create mode 100644 src/styles/dataforge/footer.css create mode 100644 src/styles/dataforge/header.css create mode 100644 src/styles/dataforge/layout.css create mode 100644 src/styles/footer.css create mode 100644 src/styles/header.css create mode 100644 src/styles/layout.css create mode 100644 src/styles/main.css create mode 100644 static/admin/config.yml create mode 100644 static/files/biref.pdf create mode 100644 static/files/conference_2017_invitation.pdf create mode 100644 static/files/main.pdf create mode 100644 static/files/npm-2018.pdf create mode 100644 static/files/report_06_10_16.pdf create mode 100644 static/files/stat-methods-2017.pdf create mode 100644 static/images/dataforge/df_logo.png create mode 100644 static/images/icon.png create mode 100644 static/images/index/conference_2017_header.png create mode 100644 static/images/index/head.png create mode 100644 static/images/index/npm-logo-no-text.svg create mode 100644 static/images/members/Inzhechik.jpg create mode 100644 static/images/members/abramova.jpg create mode 100644 static/images/members/almaz.jpg create mode 100644 static/images/members/chernov.png create mode 100644 static/images/members/hamitov.jpg create mode 100644 static/images/members/khudyakov.jpg create mode 100644 static/images/members/klimai.jpg create mode 100644 static/images/members/koroteev.png create mode 100644 static/images/members/maria.png create mode 100644 static/images/members/nozik.png create mode 100644 static/images/members/olga.png create mode 100644 static/images/members/polina.png create mode 100644 static/images/members/stadnichuk.jpg create mode 100644 static/images/members/svetlichnii.jpeg create mode 100644 static/images/members/timofey.png create mode 100644 static/images/members/vyborov.png create mode 100644 static/images/members/zelenyy.jpg create mode 100644 static/images/members/zhabin.jpg create mode 100644 static/images/pages/Poster_QUARKS_2020.jpeg create mode 100644 static/images/pages/Site_thumbnail8.png create mode 100644 static/images/partners/Linac-OUK_big.gif create mode 100644 static/images/partners/inr_logo.png create mode 100644 static/images/partners/mipt_logo.jpg create mode 100644 static/images/partners/mtl_logo.svg create mode 100644 static/images/partners/sms_logo.png create mode 100644 static/images/projects/math/deconvolution.png create mode 100644 static/images/projects/math/gears_animated.gif create mode 100644 static/images/projects/physics/GERDA.jpg create mode 100644 static/images/projects/physics/iaxo.png create mode 100644 static/images/projects/physics/katrin.jpg create mode 100644 static/images/projects/physics/map.png create mode 100644 static/images/projects/physics/setup.png create mode 100644 static/images/projects/physics/spectrometer900.jpg diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f813275 --- /dev/null +++ b/.gitignore @@ -0,0 +1,69 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Typescript v1 declaration files +typings/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# dotenv environment variable files +.env* + +# gatsby files +.cache/ +public + +# Mac files +.DS_Store + +# Yarn +yarn-error.log +.pnp/ +.pnp.js +# Yarn Integrity file +.yarn-integrity diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..58d06c3 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,4 @@ +.cache +package.json +package-lock.json +public diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..48e90e8 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + "endOfLine": "lf", + "semi": false, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "es5" +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..01d6a2e --- /dev/null +++ b/README.md @@ -0,0 +1,60 @@ +

+ Сайт группы +

+ +## Требования +- Node.js версии не ниже 8 и менеджер пакетов npm +- Gatsby CLI +- Git + +## Запуск локально +Клонируем репозиторий, переходим в директорию сайта. Добавляем переменную окружения, в неё прописываем путь до npm. Открываем командную строку, в ней пишем: +```shell +gatsby develop +``` +При успешном запуске будет виден порт, на котором нужно запускать сайт (обычно это `htpp://localhost:8000`). + +## Содержимое папки + + ├── src + ├── components + ├── pages + ├── images + ├── styles + ├── static + ├── admin + ├── .gitignore + ├── .prettierrc + ├── gatsby-config.js + ├── gatsby-node.js + ├── gatsby-ssr.js + ├── assets.bat + ├── package-lock.json + ├── package.json + └── README.md + +Все исходники лежат в `src`. +- **/components** - элементы страницы, такие как _навигационная панель, подвал, основные стили._ +- **/images** - изображения, которые используются на сайте. +- **/pages** - основной контент, * *.js-файлы трогать не нужно.* Все markdown-файлы находятся в папке `content` +- **/styles** - стили сайта. + +В `static` находятся настройки административной панели и статические файлы. Её трогать не нужно. + +- Файл `gatsby-config.js` предназначен для внесения плагинов. +- В `gatsby-node.js` хранится код для преобразования .md-файлов в страницы. +- `gatsby-ssr.js` содержит внешние скрипты. + +## Редактирование +Для редактирования сайта существуют два способа: локально и с помощью Netlify CMS. + +### **Локально** +1. В папке `/content` вносим изменения в существующие markdown-файлы, добавляем новые, удаляем ненужные. +2. Добавляем при необходимости изображения в папку `/images`. +3. Запускаем `assets.bat` для предотвращения проблем с файлами. +4. В командной строке переходим в директорию сайта, запускаем `gatsby develop`, локально проверяем, как выглядит. +5. Делаем коммит изменений, пушим в репозиторий на Github. + +### **С помощью Netlify CMS** +1. К пути сайта добавляем `/admin`, оказываемся в панели администратора. +2. Вносим нужные изменения и сохраняем. \ No newline at end of file diff --git a/assets.bat b/assets.bat new file mode 100644 index 0000000..e5b4b53 --- /dev/null +++ b/assets.bat @@ -0,0 +1,2 @@ +xcopy "src/images" "static/images" /f /y /i /s +xcopy "src/files" "static/files" /f /y /i /s \ No newline at end of file diff --git a/gatsby-config.js b/gatsby-config.js new file mode 100644 index 0000000..a6df9c1 --- /dev/null +++ b/gatsby-config.js @@ -0,0 +1,58 @@ +module.exports = { + siteMetadata: { + title: `MIPT-NPM group`, + description: `Nuclear Physics Methods Laboratory`, + }, + + plugins: [ + `gatsby-plugin-sharp`, + `gatsby-transformer-sharp`, + { + resolve: `gatsby-transformer-remark`, + options: { + plugins: [ + 'gatsby-remark-katex', + 'gatsby-remark-relative-images', + { + resolve: 'gatsby-remark-images', + options: { + maxWidth: 100 + } + }, + ], + }, + }, + // { + // resolve: "gatsby-remark-normalize-paths", + // options: { + // pathFields: ["image", "cover"] + // }, + // }, + `gatsby-plugin-react-helmet`, + { + resolve: 'gatsby-source-filesystem', + options: { + path: `${__dirname}/src/images`, + name: 'images', + }, + }, + { + resolve: `gatsby-source-filesystem`, + options: { + name: `content`, + path: `${__dirname}/src/pages/content`, + }, + }, + { + resolve: `gatsby-plugin-manifest`, + options: { + name: `gatsby-starter-default`, + short_name: `npm`, + start_url: `/`, + display: `minimal-ui`, + icon: `src/images/icon.png`, // This path is relative to the root of the site. + }, + }, + `gatsby-plugin-netlify-cms`, + ], +} \ No newline at end of file diff --git a/gatsby-node.js b/gatsby-node.js new file mode 100644 index 0000000..be64ebf --- /dev/null +++ b/gatsby-node.js @@ -0,0 +1,37 @@ +const path = require('path') +const { createFilePath } = require(`gatsby-source-filesystem`) + + +exports.createPages = async ({ actions, graphql }) => { + const {createPage} = actions; + + const courseTemplate = path.resolve(`./src/components/courseTemplate.js`); + const result = await graphql(`{ + allMarkdownRemark( + filter: {frontmatter: { + content_type: {eq: "page_education"}, + published: {eq: true}}} + ){ + edges{ + node{ + html + frontmatter{ + title + path + } + } + } + } + }`) + + if(result.errors){throw result.errors;} + + const courses = result.data.allMarkdownRemark.edges; + + courses.forEach(({node}) => { + createPage({ + path: node.frontmatter.path, + component: courseTemplate + }) + }) +} \ No newline at end of file diff --git a/gatsby-ssr.js b/gatsby-ssr.js new file mode 100644 index 0000000..ae84e01 --- /dev/null +++ b/gatsby-ssr.js @@ -0,0 +1,75 @@ +import React from "react"; +export function onRenderBody( + { setHeadComponents, setPostBodyComponents } +) { + setHeadComponents([ +