├── app
├── theme
│ ├── grid.scss
│ ├── app.scss
│ ├── colors.scss
│ ├── shared.scss
│ ├── node.scss
│ ├── corner.scss
│ ├── cell.scss
│ ├── patch.scss
│ ├── face.scss
│ ├── link.scss
│ ├── inputs.scss
│ └── legend.scss
├── assets
│ ├── favicon.ico
│ └── index.html
├── app.scss
├── initialize.jsx
├── components
│ ├── inputs.jsx
│ ├── legend.jsx
│ ├── app.jsx
│ └── grid.jsx
├── landlab_raster_grid_example.json
└── landlab_hex_grid_example.json
├── .babelrc
├── README.md
├── .eslintrc.yaml
├── .gitignore
├── brunch-config.js
├── package.json
└── generate_test_grid_data_for_sketchbook.py
/app/theme/grid.scss:
--------------------------------------------------------------------------------
1 | .chart {
2 | text-align: center;
3 | margin: 0 auto;
4 | }
5 |
--------------------------------------------------------------------------------
/app/assets/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/landlab/grid-sketchbook/master/app/assets/favicon.ico
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "@babel/preset-env",
4 | "@babel/preset-react"
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/app/app.scss:
--------------------------------------------------------------------------------
1 | :root {
2 | font-family: sans-serif;
3 | font-weight: lighter;
4 | color: #403F25;
5 | }
6 |
7 | html {
8 | background-color: #fafafa;
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/app/theme/app.scss:
--------------------------------------------------------------------------------
1 | *, *::before, *::after {
2 | box-sizing: border-box;
3 | }
4 |
5 | body {
6 | margin: 0;
7 | background-color: #fafafa;
8 | }
9 |
10 | .chart {
11 | text-align: center;
12 | }
13 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # an app for designing landlab grids
2 |
3 | To run locally, install brunch `npm install -g brunch` (you will need node to npm install).
4 |
5 | Use `brunch watch --server` to develop or `brunch build` to build.
6 |
7 | To deploy to gh-pages, run `npm run deploy`.
8 |
--------------------------------------------------------------------------------
/app/theme/colors.scss:
--------------------------------------------------------------------------------
1 | $color-cell: #707335;
2 | $color-patch: #A89855;
3 | $color-link: lemonchiffon;
4 | $color-face: lightcyan;
5 | $color-corner: #5992C7;
6 | $color-node: #A9D1F2;
7 |
8 | $text-area: white;
9 | $text-vector: #403F25;
10 | $text-point: #33351F;
11 |
12 | $color-text: #403F25;
13 |
--------------------------------------------------------------------------------
/app/initialize.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import App from './components/app';
4 |
5 | document.addEventListener('DOMContentLoaded', () => {
6 | const root = (
7 |
8 | );
9 | ReactDOM.render(root, document.getElementById('app'));
10 | });
11 |
--------------------------------------------------------------------------------
/app/theme/shared.scss:
--------------------------------------------------------------------------------
1 | @import 'colors';
2 |
3 | %button {
4 | padding: 10px;
5 | border: none;
6 | font-size: 16px;
7 | background-color: transparent;
8 | &:focus {
9 | outline: none;
10 | }
11 | &:hover {
12 | cursor: pointer;
13 | border: 0.5px solid lightgray;
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/.eslintrc.yaml:
--------------------------------------------------------------------------------
1 | parser: "babel-eslint"
2 |
3 | env:
4 | browser: true
5 | commonjs: true
6 |
7 | extends:
8 | - airbnb
9 |
10 | rules:
11 | brace-style: [2, "1tbs", { "allowSingleLine": true }]
12 | no-nested-ternary: 0
13 | newline-per-chained-call: ["error", { "ignoreChainWithDepth": 4 }]
14 | global-require: 0
15 |
--------------------------------------------------------------------------------
/app/theme/node.scss:
--------------------------------------------------------------------------------
1 | @import 'colors';
2 |
3 | .node {
4 | fill: rgba($color-node, 0.6);
5 | &:hover {
6 | fill: rgba($color-node, 1);
7 | }
8 | }
9 |
10 | .none {
11 | display: none;
12 | }
13 |
14 | .highlight {
15 | fill: rgba($color-node, 1);
16 | }
17 |
18 | .activeLabel {
19 | display: static;
20 | font-size: 1px;
21 | fill: $text-point;
22 | }
23 |
--------------------------------------------------------------------------------
/app/theme/corner.scss:
--------------------------------------------------------------------------------
1 | @import 'colors';
2 |
3 | .corner {
4 | fill: rgba($color-corner, 0.6);
5 | &:hover {
6 | fill: rgba($color-corner, 1);
7 | }
8 | }
9 |
10 | .none {
11 | display: none;
12 | }
13 |
14 | .highlight {
15 | fill: rgba($color-corner, 1);
16 | }
17 |
18 | .activeLabel {
19 | display: static;
20 | font-size: 1px;
21 | fill: $text-point;
22 | }
23 |
--------------------------------------------------------------------------------
/app/theme/cell.scss:
--------------------------------------------------------------------------------
1 | @import 'colors';
2 | .cell {
3 | fill: rgba($color-cell, 0.7);
4 | &:hover {
5 | fill: rgba($color-cell, 1);
6 | }
7 | }
8 |
9 | .none{
10 | display: none;
11 | }
12 |
13 | .highlight {
14 | fill: rgba($color-cell, 1);
15 | stroke: white;
16 | stroke-width: 0.025px;
17 | }
18 |
19 | .activeLabel {
20 | display: static;
21 | fill: $text-area;
22 | font-size: 1px;
23 | }
24 |
--------------------------------------------------------------------------------
/app/theme/patch.scss:
--------------------------------------------------------------------------------
1 | @import 'colors';
2 |
3 | .patch {
4 | fill: rgba($color-patch, 0.7);
5 | &:hover {
6 | fill: rgba($color-patch, 1);
7 | }
8 | }
9 |
10 | .none {
11 | display: none;
12 | }
13 |
14 | .highlight {
15 | fill: rgba($color-patch, 1);
16 | stroke: white;
17 | stroke-width: 0.025px;
18 | }
19 |
20 | .activeLabel {
21 | display: static;
22 | fill: $text-area;
23 | font-size: 1px;
24 | }
25 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Numerous always-ignore extensions
2 | *.diff
3 | *.err
4 | *.orig
5 | *.log
6 | *.rej
7 | *.swo
8 | *.swp
9 | *.vi
10 | *~
11 | *.sass-cache
12 |
13 | # OS or Editor folders
14 | .DS_Store
15 | .cache
16 | .project
17 | .settings
18 | .tmproj
19 | nbproject
20 | Thumbs.db
21 |
22 | # NPM packages folder.
23 | node_modules/
24 |
25 | # Brunch folder for temporary files.
26 | tmp/
27 |
28 | # Brunch output folder.
29 | public/
30 |
--------------------------------------------------------------------------------
/app/theme/face.scss:
--------------------------------------------------------------------------------
1 | @import 'colors';
2 |
3 | .face {
4 | stroke: rgba($color-face, 0.6);
5 | fill: none;
6 | &:hover {
7 | stroke: rgba($color-face, 1);
8 | }
9 | }
10 |
11 | .none {
12 | display: none;
13 | }
14 |
15 | .highlight {
16 | stroke: rgba($color-face, 1);
17 | }
18 |
19 | .activeLabel {
20 | display: static;
21 | font-size: 1px;
22 | fill: $text-vector;
23 | }
24 |
25 | .arrow {
26 | stroke: darken($color-face, 5%);
27 | fill: none;
28 | }
29 |
30 | .vertical {
31 | writing-mode: tb;
32 | glyph-orientation-vertical: 0;
33 | }
34 |
--------------------------------------------------------------------------------
/app/assets/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Landlab Sketchbook
7 |
8 |
9 |
10 | coming soon…
11 |
12 |
13 |
14 |