diff --git a/gatsby-config.js b/gatsby-config.js index 559588eb79e5bd0a43dc7a750a995e497a03ec50..e13f161251580b8a3aad85b9f116c7e0164a14f1 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -8,7 +8,7 @@ module.exports = { siteAuthor: `@rocketseat`, siteImage: `/banner.png`, siteLanguage: `en`, - themeColor: `#7159c1`, + themeColor: `#e1a809`, basePath: `/`, footer: `Theme by Rocketseat`, }, diff --git a/src/@rocketseat/gatsby-theme-docs/.../theme.js b/src/@rocketseat/gatsby-theme-docs/.../theme.js new file mode 100644 index 0000000000000000000000000000000000000000..4353bdeef00ceeed69deab3abe5b5be9b8754766 --- /dev/null +++ b/src/@rocketseat/gatsby-theme-docs/.../theme.js @@ -0,0 +1,14 @@ +export default { + colors: { + primary: '#E1A809', + background: '#fff', + sidebar: { + background: '#ffffff', + link: '#999', + heading: '#aaa', + linkActive: '#13131A', + itemActive: '#F5F5FA', + footer: '#A8A8B3', + }, + }, +}; diff --git a/src/@rocketseat/gatsby-theme-docs/components/Logo.js b/src/@rocketseat/gatsby-theme-docs/components/Logo.js new file mode 100644 index 0000000000000000000000000000000000000000..a366254034c29efe90b1e2ed86f80df4bcf700fd --- /dev/null +++ b/src/@rocketseat/gatsby-theme-docs/components/Logo.js @@ -0,0 +1,10 @@ +import styled from '@emotion/styled'; + +import logo from '../../../docs/anl_eic_logo_3.png'; + +export default styled.div` + width: 260px; + height: 90px; + background-size: contain; + background: url(${logo}) center no-repeat; +`; diff --git a/src/@rocketseat/gatsby-theme-docs/styles/global.js b/src/@rocketseat/gatsby-theme-docs/styles/global.js new file mode 100644 index 0000000000000000000000000000000000000000..1b43e4e8be1d5a048aac84b89298b815867c66c1 --- /dev/null +++ b/src/@rocketseat/gatsby-theme-docs/styles/global.js @@ -0,0 +1,270 @@ +import React from 'react'; +import { Global, css } from '@emotion/core'; +import { useTheme } from 'emotion-theming'; +import { lighten } from 'polished'; + +export default function GlobalStyle() { + const theme = useTheme(); + + return ( + <Global + styles={css` + @import url('https://fonts.googleapis.com/css?family=Roboto&display=swap'); + @import url('https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap'); + @import url('https://fonts.googleapis.com/css?family=Poppins:300,400,500,600&display=swap'); + *, + *::after, + *::before { + margin: 0; + padding: 0; + box-sizing: border-box; + } + + *::selection { + background: ${lighten('0.35', '#737380')}!important; + } + + body { + font-size: 16px; + font-family: 'Roboto', sans-serif; + background-color: ${theme.colors.background}; + text-rendering: optimizelegibility; + } + + h1 { + font-size: 32px; + color: #333; + font-weight: normal; + margin-bottom: 24px; + } + + h2 { + font-size: 24px; + padding-bottom: 8px; + border-bottom: 1px solid #eee; + } + + h3 { + font-size: 18px; + } + + h4 { + font-size: 16px; + } + + h2, + h3, + h4, + h5, + h6 { + color: #737380; + margin: 24px 0 16px 0; + font-weight: normal; + } + + p { + color: #737380; + font-size: 16px; + line-height: 28px; + margin-bottom: 16px; + font-weight: 400; + } + + code.inline-code { + display: inline-block; + vertical-align: middle; + line-height: 1; + padding: 0.2em 0.2em 0.3em 0.2em; + background-color: #44475a; + color: rgba(248, 248, 242); + font-size: 14px; + border-radius: 3px; + font-feature-settings: 'clig' 0, 'calt' 0; + font-variant: no-common-ligatures no-discretionary-ligatures + no-historical-ligatures no-contextual; + } + + a { + color: #737380; + font-weight: bold; + + &:hover { + color: ${theme.colors.primary}!important; + transition: all 100ms cubic-bezier(0.4, 0, 0.2, 1) 0s; + opacity: 1 !important; + } + } + + blockquote { + border-left: 4px solid #e7e7e7; + padding: 0 2rem; + + p { + font-style: italic !important; + font-size: 0.88em !important; + line-height: 28px; + } + } + + table { + border-collapse: collapse; + border-spacing: 0; + width: 100%; + margin-bottom: 16px; + color: #444; + } + + th, + td { + text-align: left; + padding: 12px; + } + + tr:nth-of-type(2n) td { + background-color: ${theme.colors.sidebar.itemActive}; + } + + tr { + background-color: #ffffff; + } + + iframe { + margin-bottom: 16px; + } + + ul, + ol { + color: #737380; + padding-left: 15px; + margin-bottom: 16px; + + li { + line-height: 28px; + } + } + + .gatsby-highlight { + position: relative; + + .token { + font-style: normal !important; + } + } + + pre[class*='language-']::before { + background: #d9d7e0; + border-radius: 0 0 4px 4px; + color: #232129; + font-size: 12px; + font-family: SFMono-Regular, Menlo, Monaco, Consolas, + 'Liberation Mono', 'Courier New', monospace; + letter-spacing: 0.075em; + line-height: 1; + padding: 0.25rem 0.5rem; + position: absolute; + left: 1rem; + text-align: right; + text-transform: uppercase; + top: 0; + } + + pre[class*='language-'] code { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, + 'Liberation Mono', 'Courier New', monospace; + font-variant: no-common-ligatures no-discretionary-ligatures + no-historical-ligatures no-contextual; + } + + pre[class~='language-js']::before, + pre[class~='language-javascript']::before { + content: 'js'; + background: #f7df1e; + } + + pre[class~='language-jsx']::before { + content: 'jsx'; + background: #61dafb; + } + + pre[class~='language-typescript']::before, + pre[class~='language-ts']::before { + content: 'ts'; + background: #294e80; + color: #fff; + } + + pre[class~='language-tsx']::before { + content: 'tsx'; + background: #294e80; + color: #fff; + } + + pre[class~='language-graphql']::before { + content: 'GraphQL'; + background: #e10098; + color: #fff; + } + + pre[class~='language-html']::before { + content: 'html'; + background: #005a9c; + color: #fff; + } + + pre[class~='language-css']::before { + content: 'css'; + background: #ff9800; + color: #fff; + } + + pre[class~='language-mdx']::before { + content: 'mdx'; + background: #f9ac00; + color: #fff; + } + + pre[class~='language-shell']::before { + content: 'shell'; + } + + pre[class~='language-sh']::before { + content: 'sh'; + } + + pre[class~='language-bash']::before { + content: 'bash'; + } + + pre[class~='language-yaml']::before { + content: 'yaml'; + background: #ffa8df; + } + + pre[class~='language-markdown']::before { + content: 'md'; + } + + pre[class~='language-json']::before, + pre[class~='language-json5']::before { + content: 'json'; + background: linen; + } + + pre[class~='language-diff']::before { + content: 'diff'; + background: #e6ffed; + } + + pre[class~='language-text']::before { + content: 'text'; + background: #fff; + } + + pre[class~='language-flow']::before { + content: 'flow'; + background: #e8bd36; + } + `} + /> + ); +} diff --git a/src/@rocketseat/gatsby-theme-docs/styles/theme.js b/src/@rocketseat/gatsby-theme-docs/styles/theme.js new file mode 100644 index 0000000000000000000000000000000000000000..4353bdeef00ceeed69deab3abe5b5be9b8754766 --- /dev/null +++ b/src/@rocketseat/gatsby-theme-docs/styles/theme.js @@ -0,0 +1,14 @@ +export default { + colors: { + primary: '#E1A809', + background: '#fff', + sidebar: { + background: '#ffffff', + link: '#999', + heading: '#aaa', + linkActive: '#13131A', + itemActive: '#F5F5FA', + footer: '#A8A8B3', + }, + }, +}; diff --git a/src/config/sidebar.yml b/src/config/sidebar.yml index efd0731fcf93bc23f306e3a6864131822c370b88..b17762d5dc087fa52946ca82d992cf7ff76e0f67 100644 --- a/src/config/sidebar.yml +++ b/src/config/sidebar.yml @@ -1,11 +1,27 @@ # Sidebar navigation -- label: 'Introduction' +- label: 'Home' link: '/' -- label: 'Getting started' - link: '/getting-started' +- label: 'Introduction' + link: '/introduction' +- label: 'Getting really started' + items: + - label: 'Quick-start ' + link: '/getting-started/quickstart' + - label: 'Modulefiles ' + link: '/getting-started/modulefiles' + - label: 'Singularity' + link: '/getting-started/singularity' + - label: 'EIC container' + link: '/getting-started/eic_container' + - label: 'Environment' + link: '/getting-started/environment' +- label: 'Part 1' + items: - label: Usage items: + - label: 'doc Getting started' + link: '/gettingstartedold' - label: 'Creating docs' link: '/usage/creating-docs' - label: 'Navigation' diff --git a/src/docs/anl_eic_logo_3.png b/src/docs/anl_eic_logo_3.png new file mode 100644 index 0000000000000000000000000000000000000000..1fc97dfce8a13e174d96d05e04f26a1cc679c7dd Binary files /dev/null and b/src/docs/anl_eic_logo_3.png differ diff --git a/src/docs/codeblock.md b/src/docs/codeblock.md new file mode 100644 index 0000000000000000000000000000000000000000..2c918e9137ca0298a3c97baad3c7d312437bfe3e --- /dev/null +++ b/src/docs/codeblock.md @@ -0,0 +1,26 @@ +--- +title: "Syntax Highlighting" +metaTitle: "Syntax Highlighting is the meta title tag for this page" +metaDescription: "This is the meta description for this page" +--- + +The following is a code block with JavaScript language syntax highlighting. + +```javascript +import React from 'react'; +``` + +Supports multiple languages. + +The following is a code block with diff. Lines with `+` highlighted in green shade indicating an addition. Lines with `-` highlighted in red shade indicating a deletion. + +```javascript +- const data = ['1','2']; ++ const data = [1,2]; +``` + +## Live Editing example + +```javascript react-live=true +<button className={'btn btn-default'}>Change my text</button> +``` diff --git a/src/docs/codeblock/1-index.md b/src/docs/codeblock/1-index.md new file mode 100644 index 0000000000000000000000000000000000000000..3b6927226fb7a5c49bd6f68eee9f139f528971a9 --- /dev/null +++ b/src/docs/codeblock/1-index.md @@ -0,0 +1,26 @@ +--- +title: "Sub Page" +metaTitle: "Syntax Highlighting is the meta title tag for this page" +metaDescription: "This is the meta description for this page" +--- + +The following is a code block with JavaScript language syntax highlighting. + +```cpp +int x = 5; +``` + +Supports multiple languages. + +The following is a code block with diff. Lines with `+` highlighted in green shade indicating an addition. Lines with `-` highlighted in red shade indicating a deletion. + +```javascript +- const data = ['1','2']; ++ const data = [1,2]; +``` + +## Live Editing example + +```javascript react-live=true +<button className={'btn btn-default'}>Change my text</button> +``` diff --git a/src/docs/codeblock/1-index/1-index.md b/src/docs/codeblock/1-index/1-index.md new file mode 100644 index 0000000000000000000000000000000000000000..73d22ca45173271e61a3b5e3926fd1f71be282e7 --- /dev/null +++ b/src/docs/codeblock/1-index/1-index.md @@ -0,0 +1,33 @@ +--- +title: "derp" +metaTitle: "meta derp title" +metaDescription: "This is the meta description" +--- + +DERPDERP +Some introduction text. Lists out all the headings from h1 to h6. Easy to customise. + +# Heading H1 +Heading 1 text + +## Heading H2 +Heading 2 text + +### Heading H3 +Heading 3 text + +#### Heading H4 +Heading 4 text + +##### Heading H5 +Heading 5 text + +###### Heading H6 +Heading 6 text + +## Lists +- Item 1 +- Item 2 +- Item 3 +- Item 4 +- Item 5 diff --git a/src/docs/getting-started/eic_container.md b/src/docs/getting-started/eic_container.md new file mode 100644 index 0000000000000000000000000000000000000000..c9b32812d6c3bf0104398d8dc5f9b6fe4d8f2dbf --- /dev/null +++ b/src/docs/getting-started/eic_container.md @@ -0,0 +1,18 @@ +--- +title: "EIC Container" +--- + + +## Downloading the container. +```shell +git clone ... +``` + +## Installing the container + +```shell +mkdir build +cmake ../. -DCMAKE_INSTALL_PREFIX=$HOME/stow/eic_container_1.0.0 +make -j4 install +``` + diff --git a/src/docs/getting-started/environment.md b/src/docs/getting-started/environment.md new file mode 100644 index 0000000000000000000000000000000000000000..68a768dd55a0f152c01e10347efcbaaa0321d24a --- /dev/null +++ b/src/docs/getting-started/environment.md @@ -0,0 +1,24 @@ +--- +title: "Development Environment" +--- + +## Development within singularity + +The following helper runs bash inside `eic_container` +```bash +module load eic_container +container_dev +``` + +For projects that you want to build but which are also inside of the container, you must make sure to set `$PATH` and `$LD_LIBRARY_PATH` to point to the development build's installation prefix first. Here we assume your development builds are being installed into `$HOME/stow/development` + +A simple setup script will make sure +```bash +export $PATH=$HOME/stow/development/bin:$PATH +export $LD_LIBRARY_PATH=$HOME/stow/development/lib:$HOME/stow/development/lib64:$LD_LIBRARY_PATH +export $ROOT_INCLUDE_PATH=$HOME/stow/development/include:$ROOT_INCLUDE_PATH +``` + + + + diff --git a/src/docs/getting-started/modulefiles.md b/src/docs/getting-started/modulefiles.md new file mode 100644 index 0000000000000000000000000000000000000000..ecc8e0e904a8fa6c5c2951607a08fd9004104bea --- /dev/null +++ b/src/docs/getting-started/modulefiles.md @@ -0,0 +1,24 @@ +--- +title: "Modulefiles" +--- + +## What are modulefiles? + +Modulefiles (or Lmod) is installed on almost every HPC system these days. It is a set of tcl/tk or lua scripts to swap software in and out of your current environment. It does this (mostly) by managing your environment variables, namely, `PATH` and `LD_LIBRARY_PATH`. + +```bash +module avail +module list +module load eic_container +module list +module purge +module list +``` + + +https://modules.readthedocs.io/en/latest/ + + + + + diff --git a/src/docs/getting-started/quickstart.md b/src/docs/getting-started/quickstart.md new file mode 100644 index 0000000000000000000000000000000000000000..2437e91a0cb36493ce62a02e1b7f77495a8152a4 --- /dev/null +++ b/src/docs/getting-started/quickstart.md @@ -0,0 +1,25 @@ +--- +title: "Quick start" +metaTitle: "Quickstart" +metaDescription: "Getting up and running quickly" +--- + + +# Prerequisites + +The programmer should already be familiar with +- working in the terminal over ssh +- git and gitlab +- using `cmake` +- C++, python, and shell scripting + +[modulefiles](quickstart/1-modulefiles) +[singularity](quickstart/2-singularity) +[eic_container](quickstart/3-eic_container) + +# Clone Tutorial Repository + +# Environment + + + diff --git a/src/docs/getting-started/singularity.md b/src/docs/getting-started/singularity.md new file mode 100644 index 0000000000000000000000000000000000000000..b06ab615021b967bcab9f1e0c2e24347ac020656 --- /dev/null +++ b/src/docs/getting-started/singularity.md @@ -0,0 +1,31 @@ +--- +title: "Singularity" +--- + +Singularity is installed on `eic0.phy.anl.gov`, `bebop.lcrc.anl.gov`, and most HPC systems. +Singularity ships the entire container image in a single file. See the extensive singularity documentation to learn more. +```bash +git clone git@eicweb.phy.anl.gov/containers/eic_container.git +cd container +``` + +## Installing the singularity container + +## Using the container + +## Tip + +In your `.bashrc` add +```bash +if [ ! -e /environment ] ; then + running_singularity= +else + running_singularity="\#singularity" +fi +# ... +PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]${running_singularity}\$ ' +``` +If you are running inside a singularity container your commandline prompt will inform you: + +<pre><font color="#8AE234"><b>whit@wpad</b></font>:<font color="#729FCF"><b>~/stow/eic_container_0.9.13/lib</b></font>\#singularity$</pre> + diff --git a/src/docs/getting-started.mdx b/src/docs/gettingstartedold.mdx similarity index 100% rename from src/docs/getting-started.mdx rename to src/docs/gettingstartedold.mdx diff --git a/src/docs/hackathon.md b/src/docs/hackathon.md new file mode 100644 index 0000000000000000000000000000000000000000..34744f087fdd55b0c15e22bd3b96a3552bae0049 --- /dev/null +++ b/src/docs/hackathon.md @@ -0,0 +1,7 @@ +--- +title: "Simulation Hackathon " +--- + +# Goals + + diff --git a/src/docs/hackathon/1-tasks.md b/src/docs/hackathon/1-tasks.md new file mode 100644 index 0000000000000000000000000000000000000000..6b3ca06266be58ffafafb39078235fd8f5425da8 --- /dev/null +++ b/src/docs/hackathon/1-tasks.md @@ -0,0 +1,7 @@ +--- +title: "Hackathon tasks " +metaTitle: "hackathon" +metaDescription: "EIC software hackathon" +--- + +# Goals diff --git a/src/docs/index.mdx b/src/docs/index.mdx new file mode 100644 index 0000000000000000000000000000000000000000..48e2c19f746bf2793648d95639f5d32354625a46 --- /dev/null +++ b/src/docs/index.mdx @@ -0,0 +1,45 @@ +--- +title: "EIC Software" +--- + +## Tutorials + +- [Quick start](quickstart.md) - Start here to download software and configure your development environment. + +- [Part 1](part1.md) - An introduction to the detector description starting with a simple detector. +This tutorial shows how to add new parameterized detectors to a library of generic detectors (NPdet). + +- [Part 2](part2.md) - + +This tutorial is broken in to multiple parts. + +* Preface for the new programmer +* Part 0a: Configuring your running environment +* Part 0b: Configuring your development environment +* Part 1: Simple Detector Example +* Part 2: Extending Detector Geometry +* Part 3: Adding a new detector +* Part 4: Detector digitization, volumes, and segmentation +* Part 5: Event reconstruction + + +Some introduction text. Lists out all the headings from h1 to h6. Easy to customise. Some more text. Additional text. + +# Heading H1 +Heading 1 text + +## Heading H2 +Heading 2 text + +### Heading H3 +Heading 3 text + +#### Heading H4 +Heading 4 text + +##### Heading H5 +Heading 5 text + +###### Heading H6 +Heading 6 text + diff --git a/src/docs/introduction.mdx b/src/docs/introduction.mdx new file mode 100644 index 0000000000000000000000000000000000000000..0a36db1f6865603d3a23ebcb7e78675a9efe98f7 --- /dev/null +++ b/src/docs/introduction.mdx @@ -0,0 +1,60 @@ +--- +title: "Introduction" +metaTitle: "This is the title tag of this page" +metaDescription: "This is the meta description" +--- + +# Tutorial + +- [Quick start](quickstart.md) +Start here to setup download software and configure your development environment. +- [Part 1](part1.md) +An introduction to detecto description starting with a simple detector. This tutorial shows how to add new parameterized detectors to a library of generic detectors (NPdet). +- [Part 2](part2.md) + +This tutorial is broken in to multiple parts. + +* Preface for the new programmer +* Part 0a: Configuring your running environment +* Part 0b: Configuring your development environment +* Part 1: Simple Detector Example +* Part 2: Extending Detector Geometry +* Part 3: Adding a new detector +* Part 4: Detector digitization, volumes, and segmentation +* Part 5: Event reconstruction + + +Some introduction text. Lists out all the headings from h1 to h6. Easy to customise. Some more text. Additional text. + +# Heading H1 +Heading 1 text + +## Heading H2 +Heading 2 text + +### Heading H3 +Heading 3 text + +#### Heading H4 +Heading 4 text + +##### Heading H5 +Heading 5 text + +###### Heading H6 +Heading 6 text + + + +# Welcome +This tutorial is meant to prepare you to contribute to the simuliation toolkit for the EIC. +The tutorial is not meant to be a representation of the final software workflow, but to put enough pieces +together to do the work required. + + +## Lists +- Item 1 +- Item 2 +- Item 3 +- Item 4 +- Item 5 diff --git a/src/docs/part1.md b/src/docs/part1.md new file mode 100644 index 0000000000000000000000000000000000000000..65a7b65bb82fa3ed23834b8d77739b607d5dcd9d --- /dev/null +++ b/src/docs/part1.md @@ -0,0 +1,9 @@ +--- +title: "Part 1: Simple Detector Example" +--- + +The following is a code block with JavaScript language syntax highlighting. + +```javascript +import React from 'react'; +``` diff --git a/src/docs/part1/simple_detector.md b/src/docs/part1/simple_detector.md new file mode 100644 index 0000000000000000000000000000000000000000..5e8ee65c8af625971c5712c83eb0eb79d7b5b883 --- /dev/null +++ b/src/docs/part1/simple_detector.md @@ -0,0 +1,24 @@ +--- +title: "Simple Detector" +--- + +The following is a code block with JavaScript language syntax highlighting. + +```javascript +import React from 'react'; +``` + +Supports multiple languages. + +The following is a code block with diff. Lines with `+` highlighted in green shade indicating an addition. Lines with `-` highlighted in red shade indicating a deletion. + +```javascript +- const data = ['1','2']; ++ const data = [1,2]; +``` + +## Live Editing example + +```javascript react-live=true +<button className={'btn btn-default'}>Change my text</button> +``` diff --git a/src/docs/part2.md b/src/docs/part2.md new file mode 100644 index 0000000000000000000000000000000000000000..1f3a6d2d32bb04c25c4e5b1f5a6c2e3f971376c6 --- /dev/null +++ b/src/docs/part2.md @@ -0,0 +1,8 @@ +--- +title: "Extending Detector Geometry" +--- + +The following is a code block with JavaScript language syntax highlighting. + +```javascript +import React from 'react';