Skip to content

Commit 8a1d34d

Browse files
committed
add stack-grid
1 parent abb0428 commit 8a1d34d

File tree

5 files changed

+139
-17
lines changed

5 files changed

+139
-17
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"react-feather": "^2.0.3",
1313
"react-router-dom": "^5.0.1",
1414
"react-scripts": "^3.0.1",
15+
"react-stack-grid": "^0.7.1",
1516
"three": "^0.106.2"
1617
},
1718
"scripts": {

src/About.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import React from "react";
2+
import StackGrid from "react-stack-grid";
23
import { about } from "./data/data";
34

45
const Officer = ({ item }) => {
56
return (
6-
<div className="card col m-3">
7+
<div className="card m-3">
78
<div className="card-body">
89
<h4 className="card-title">{item.name}</h4>
910
<h5 className="card-text">{item.position}</h5>
@@ -19,18 +20,19 @@ const Officer = ({ item }) => {
1920
);
2021
};
2122

22-
const About = () => {
23+
const About = ({ size }) => {
24+
const { width } = size;
2325
return (
2426
<>
2527
<h2>About Us</h2>
2628
{about.about}
2729
<p className="h5 mt-3">Meet us on Mondays 7pm @ Siebel 3401!</p>
2830
<h3 className="mt-1">Exec</h3>
29-
<div className="row mr-3 ml-3">
31+
<StackGrid columnWidth={width <= 768 ? "100%" : "33.33%"}>
3032
{about.exec.map(item => (
3133
<Officer item={item} key={item.name} />
3234
))}
33-
</div>
35+
</StackGrid>
3436
</>
3537
);
3638
};

src/Navigation.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,12 @@ class Navigation extends Component {
3434
return (
3535
<Router basename={process.env.PUBLIC_URL}>
3636
<DefaultLayout exact path="/" component={App} size={this.state} />
37-
<DefaultLayout path="/projects" component={Projects} />
38-
<DefaultLayout path="/about" component={About} />
37+
<DefaultLayout
38+
path="/projects"
39+
component={Projects}
40+
size={this.state}
41+
/>
42+
<DefaultLayout path="/about" component={About} size={this.state} />
3943
<DefaultLayout path="/gallery" component={Gallery} size={this.state} />
4044
</Router>
4145
);

src/Projects.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import React, { Fragment } from "react";
1+
import React from "react";
2+
import StackGrid from "react-stack-grid";
23
import { projects } from "./data/data";
34

45
const Project = ({ item }) => {
56
return (
6-
<div className="card col m-3">
7+
<div className="card m-3">
78
<div className="card-body">
89
<h3 className="card-title">{item.name}</h3>
910
<p className="card-text">{item.description}</p>
@@ -12,22 +13,23 @@ const Project = ({ item }) => {
1213
);
1314
};
1415

15-
const Projects = () => {
16+
const Projects = ({ size }) => {
17+
const { width } = size;
1618
return (
17-
<Fragment>
19+
<>
1820
<h2>Current</h2>
19-
<div className="row mr-3 ml-3">
21+
<StackGrid columnWidth={width <= 768 ? "100%" : "33.33%"}>
2022
{projects.current.map(item => (
2123
<Project item={item} key={item.name} />
2224
))}
23-
</div>
25+
</StackGrid>
2426
<h2>Past</h2>
25-
<div className="row mr-3 ml-3">
27+
<StackGrid columnWidth={width <= 768 ? "100%" : "33.33%"}>
2628
{projects.past.map(item => (
2729
<Project item={item} key={item.name} />
2830
))}
29-
</div>
30-
</Fragment>
31+
</StackGrid>
32+
</>
3133
);
3234
};
3335

yarn.lock

Lines changed: 115 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2084,6 +2084,11 @@ base@^0.11.1:
20842084
mixin-deep "^1.2.0"
20852085
pascalcase "^0.1.1"
20862086

2087+
batch-processor@^1.0.0:
2088+
version "1.0.0"
2089+
resolved "https://registry.yarnpkg.com/batch-processor/-/batch-processor-1.0.0.tgz#75c95c32b748e0850d10c2b168f6bdbe9891ace8"
2090+
integrity sha1-dclcMrdI4IUNEMKxaPa9vpiRrOg=
2091+
20872092
20882093
version "0.6.1"
20892094
resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16"
@@ -2161,6 +2166,11 @@ bootstrap@^4.3.1:
21612166
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.3.1.tgz#280ca8f610504d99d7b6b4bfc4b68cec601704ac"
21622167
integrity sha512-rXqOmH1VilAt2DyPzluTi2blhk17bO7ef+zLLPlWvG494pDxcM234pJ8wTc/6R40UWizAIIMgxjvxZg5kmsbag==
21632168

2169+
bowser@^1.7.3:
2170+
version "1.9.4"
2171+
resolved "https://registry.yarnpkg.com/bowser/-/bowser-1.9.4.tgz#890c58a2813a9d3243704334fa81b96a5c150c9a"
2172+
integrity sha512-9IdMmj2KjigRq6oWhmwv1W36pDuA4STQZ8q6YO9um+x07xgYNCD3Oou+WP/3L1HNz7iqythGet3/p4wvc8AAwQ==
2173+
21642174
brace-expansion@^1.1.7:
21652175
version "1.1.11"
21662176
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
@@ -2462,6 +2472,11 @@ ccount@^1.0.3:
24622472
resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.0.4.tgz#9cf2de494ca84060a2a8d2854edd6dfb0445f386"
24632473
integrity sha512-fpZ81yYfzentuieinmGnphk0pLkOTMm6MZdVqwd77ROvhko6iujLNGrHH5E7utq3ygWklwfmwuG+A7P+NpqT6w==
24642474

2475+
chain-function@^1.0.0:
2476+
version "1.0.1"
2477+
resolved "https://registry.yarnpkg.com/chain-function/-/chain-function-1.0.1.tgz#c63045e5b4b663fb86f1c6e186adaf1de402a1cc"
2478+
integrity sha512-SxltgMwL9uCko5/ZCLiyG2B7R9fY4pDZUw7hJ4MhirdjBLosoDqkWABi3XMucddHdLiFJMb7PD2MZifZriuMTg==
2479+
24652480
[email protected], chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2:
24662481
version "2.4.2"
24672482
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
@@ -2974,6 +2989,14 @@ css-has-pseudo@^0.10.0:
29742989
postcss "^7.0.6"
29752990
postcss-selector-parser "^5.0.0-rc.4"
29762991

2992+
css-in-js-utils@^2.0.0:
2993+
version "2.0.1"
2994+
resolved "https://registry.yarnpkg.com/css-in-js-utils/-/css-in-js-utils-2.0.1.tgz#3b472b398787291b47cfe3e44fecfdd9e914ba99"
2995+
integrity sha512-PJF0SpJT+WdbVVt0AOYp9C8GnuruRlL/UFW7932nLWmFLQTaWEzTBQEx7/hn4BuV+WON75iAViSUJLiU3PKbpA==
2996+
dependencies:
2997+
hyphenate-style-name "^1.0.2"
2998+
isobject "^3.0.1"
2999+
29773000
29783001
version "2.1.1"
29793002
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-2.1.1.tgz#d8254f72e412bb2238bb44dd674ffbef497333ea"
@@ -3418,7 +3441,7 @@ dom-converter@^0.2:
34183441
dependencies:
34193442
utila "~0.4"
34203443

3421-
dom-helpers@^3.4.0:
3444+
dom-helpers@^3.2.0, dom-helpers@^3.4.0:
34223445
version "3.4.0"
34233446
resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.4.0.tgz#e9b369700f959f62ecde5a6babde4bccd9169af8"
34243447
integrity sha512-LnuPJ+dwqKDIyotW1VzmOZ5TONUN7CwkCR5hrgawTUbkBGYdeoNLZo6nNfGkCrjtE1nXXaj7iMMpDa8/d9WoIA==
@@ -3505,6 +3528,13 @@ duplexify@^3.4.2, duplexify@^3.6.0:
35053528
readable-stream "^2.0.0"
35063529
stream-shift "^1.0.0"
35073530

3531+
easy-css-transform-builder@^0.0.2:
3532+
version "0.0.2"
3533+
resolved "https://registry.yarnpkg.com/easy-css-transform-builder/-/easy-css-transform-builder-0.0.2.tgz#a541667a7919e17f67d82b11d3cb55fdd5433022"
3534+
integrity sha1-pUFmenkZ4X9n2CsR08tV/dVDMCI=
3535+
dependencies:
3536+
invariant "^2.2.2"
3537+
35083538
ecc-jsbn@~0.1.1:
35093539
version "0.1.2"
35103540
resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"
@@ -3523,6 +3553,13 @@ electron-to-chromium@^1.3.122, electron-to-chromium@^1.3.188:
35233553
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.188.tgz#e28e1afe4bb229989e280bfd3b395c7ec03c8b7a"
35243554
integrity sha512-tEQcughYIMj8WDMc59EGEtNxdGgwal/oLLTDw+NEqJRJwGflQvH3aiyiexrWeZOETP4/ko78PVr6gwNhdozvuQ==
35253555

3556+
element-resize-detector@^1.1.15:
3557+
version "1.1.15"
3558+
resolved "https://registry.yarnpkg.com/element-resize-detector/-/element-resize-detector-1.1.15.tgz#48eba1a2eaa26969a4c998d972171128c971d8d2"
3559+
integrity sha512-16/5avDegXlUxytGgaumhjyQoM6hpp5j3+L79sYq5hlXfTNRy5WMMuTVWkZU3egp/CokCmTmvf18P3KeB57Iog==
3560+
dependencies:
3561+
batch-processor "^1.0.0"
3562+
35263563
elliptic@^6.0.0:
35273564
version "6.5.0"
35283565
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.0.tgz#2b8ed4c891b7de3200e14412a5b8248c7af505ca"
@@ -3846,6 +3883,11 @@ etag@~1.8.1:
38463883
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
38473884
integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
38483885

3886+
ev-emitter@^1.0.0:
3887+
version "1.1.1"
3888+
resolved "https://registry.yarnpkg.com/ev-emitter/-/ev-emitter-1.1.1.tgz#8f18b0ce5c76a5d18017f71c0a795c65b9138f2a"
3889+
integrity sha512-ipiDYhdQSCZ4hSbX4rMW+XzNKMD1prg/sTvoVmSLkuQ1MVlwjJQQA+sW8tMYR3BLUr9KjodFV4pvzunvRhd33Q==
3890+
38493891
eventemitter3@^3.0.0:
38503892
version "3.1.2"
38513893
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7"
@@ -3889,6 +3931,11 @@ execa@^1.0.0:
38893931
signal-exit "^3.0.0"
38903932
strip-eof "^1.0.0"
38913933

3934+
exenv@^1.2.1:
3935+
version "1.2.2"
3936+
resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d"
3937+
integrity sha1-KueOhdmJQVhnCwPUe+wfA72Ru50=
3938+
38923939
exit@^0.1.2:
38933940
version "0.1.2"
38943941
resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
@@ -4877,6 +4924,11 @@ humanize-url@^1.0.0:
48774924
normalize-url "^1.0.0"
48784925
strip-url-auth "^1.0.0"
48794926

4927+
hyphenate-style-name@^1.0.2:
4928+
version "1.0.3"
4929+
resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.3.tgz#097bb7fa0b8f1a9cf0bd5c734cf95899981a9b48"
4930+
integrity sha512-EcuixamT82oplpoJ2XU4pDtKGWQ7b00CD9f1ug9IaQ3p1bkHMiKCZ9ut9QDI6qsa6cpUuB+A/I+zLtdNK4n2DQ==
4931+
48804932
[email protected], iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13:
48814933
version "0.4.24"
48824934
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
@@ -4930,6 +4982,13 @@ ignore@^4.0.6:
49304982
resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
49314983
integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==
49324984

4985+
imagesloaded@^4.1.1:
4986+
version "4.1.4"
4987+
resolved "https://registry.yarnpkg.com/imagesloaded/-/imagesloaded-4.1.4.tgz#1376efcd162bb768c34c3727ac89cc04051f3cc7"
4988+
integrity sha512-ltiBVcYpc/TYTF5nolkMNsnREHW+ICvfQ3Yla2Sgr71YFwQ86bDwV9hgpFhFtrGPuwEx5+LqOHIrdXBdoWwwsA==
4989+
dependencies:
4990+
ev-emitter "^1.0.0"
4991+
49334992
49344993
version "1.10.0"
49354994
resolved "https://registry.yarnpkg.com/immer/-/immer-1.10.0.tgz#bad67605ba9c810275d91e1c2a47d4582e98286d"
@@ -5023,6 +5082,14 @@ ini@^1.3.5, ini@~1.3.0:
50235082
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
50245083
integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
50255084

5085+
inline-style-prefixer@^3.0.6:
5086+
version "3.0.8"
5087+
resolved "https://registry.yarnpkg.com/inline-style-prefixer/-/inline-style-prefixer-3.0.8.tgz#8551b8e5b4d573244e66a34b04f7d32076a2b534"
5088+
integrity sha1-hVG45bTVcyROZqNLBPfTIHaitTQ=
5089+
dependencies:
5090+
bowser "^1.7.3"
5091+
css-in-js-utils "^2.0.0"
5092+
50265093
50275094
version "6.2.2"
50285095
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.2.tgz#46941176f65c9eb20804627149b743a218f25406"
@@ -8193,7 +8260,7 @@ prop-types-extra@^1.1.0:
81938260
react-is "^16.3.2"
81948261
warning "^3.0.0"
81958262

8196-
prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:
8263+
prop-types@^15.5.10, prop-types@^15.5.6, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:
81978264
version "15.7.2"
81988265
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
81998266
integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==
@@ -8580,6 +8647,42 @@ react-scripts@^3.0.1:
85808647
optionalDependencies:
85818648
fsevents "2.0.6"
85828649

8650+
react-sizeme@^2.2.0:
8651+
version "2.6.7"
8652+
resolved "https://registry.yarnpkg.com/react-sizeme/-/react-sizeme-2.6.7.tgz#231339ce8821ac2c26424c791e0027f89dae3e90"
8653+
integrity sha512-xCjPoBP5jmeW58TxIkcviMZqabZis7tTvDFWf0/Wa5XCgVWQTIe74NQBes2N1Kmp64GRLkpm60BaP0kk+v8aCQ==
8654+
dependencies:
8655+
element-resize-detector "^1.1.15"
8656+
invariant "^2.2.4"
8657+
shallowequal "^1.1.0"
8658+
throttle-debounce "^2.1.0"
8659+
8660+
react-stack-grid@^0.7.1:
8661+
version "0.7.1"
8662+
resolved "https://registry.yarnpkg.com/react-stack-grid/-/react-stack-grid-0.7.1.tgz#cbf7353ce6c2acf712b827c36b0be234af84bee9"
8663+
integrity sha512-Fw7qMt5Rd9wQpNCnvK4Gi+ry/nL5rKfzP2hGsw5/DZxArEMk60VoDLy68Uskq09l6wk7qb2w7P2+lNzSd9mYEw==
8664+
dependencies:
8665+
easy-css-transform-builder "^0.0.2"
8666+
exenv "^1.2.1"
8667+
imagesloaded "^4.1.1"
8668+
inline-style-prefixer "^3.0.6"
8669+
invariant "^2.2.2"
8670+
prop-types "^15.5.10"
8671+
react-sizeme "^2.2.0"
8672+
react-transition-group "^1.2.0"
8673+
shallowequal "^1.0.1"
8674+
8675+
react-transition-group@^1.2.0:
8676+
version "1.2.1"
8677+
resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-1.2.1.tgz#e11f72b257f921b213229a774df46612346c7ca6"
8678+
integrity sha512-CWaL3laCmgAFdxdKbhhps+c0HRGF4c+hdM4H23+FI1QBNUyx/AMeIJGWorehPNSaKnQNOAxL7PQmqMu78CDj3Q==
8679+
dependencies:
8680+
chain-function "^1.0.0"
8681+
dom-helpers "^3.2.0"
8682+
loose-envify "^1.3.1"
8683+
prop-types "^15.5.6"
8684+
warning "^3.0.0"
8685+
85838686
react-transition-group@^4.0.0:
85848687
version "4.2.1"
85858688
resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.2.1.tgz#61fc9e36568bff9a1fe4e60fae323c8a6dbc0680"
@@ -9241,6 +9344,11 @@ shallow-clone@^1.0.0:
92419344
kind-of "^5.0.0"
92429345
mixin-object "^2.0.1"
92439346

9347+
shallowequal@^1.0.1, shallowequal@^1.1.0:
9348+
version "1.1.0"
9349+
resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8"
9350+
integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==
9351+
92449352
shebang-command@^1.2.0:
92459353
version "1.2.0"
92469354
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
@@ -9865,6 +9973,11 @@ throat@^4.0.0:
98659973
resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a"
98669974
integrity sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=
98679975

9976+
throttle-debounce@^2.1.0:
9977+
version "2.1.0"
9978+
resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-2.1.0.tgz#257e648f0a56bd9e54fe0f132c4ab8611df4e1d5"
9979+
integrity sha512-AOvyNahXQuU7NN+VVvOOX+uW6FPaWdAOdRP5HfwYxAfCzXTFKRMoIMk+n+po318+ktcChx+F1Dd91G3YHeMKyg==
9980+
98689981
through2@^2.0.0:
98699982
version "2.0.5"
98709983
resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd"

0 commit comments

Comments
 (0)