Skip to content

Commit

Permalink
Added lipsum data support
Browse files Browse the repository at this point in the history
  • Loading branch information
j5bot committed Nov 9, 2018
1 parent 5f50a45 commit 883ed7d
Show file tree
Hide file tree
Showing 27 changed files with 693 additions and 109 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"react-dom": "^16.5.2",
"react-faux-dom": "^4.2.0",
"react-fontawesome": "^1.6.1",
"react-load-script": "^0.0.6",
"react-redux": "^5.0.7",
"react-router": "^4.3.1",
"react-router-redux": "^4.0.8",
Expand Down
3 changes: 3 additions & 0 deletions public/scripts/ipsum-salt/shakespeare-data.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {
Shakespeare
} from '//cdn.jsdelivr.net/npm/shakespeare-data@3.0.0/lib/shakespeare.js';
29 changes: 26 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ import './App.css';
import './checkbox.css';

import { library } from '@fortawesome/fontawesome-svg-core';
import { faHandPointer, faFile } from '@fortawesome/free-solid-svg-icons';
import {
faExclamationTriangle,
faFile,
faFont,
faHandPointer,
faSpinner,
faThumbsUp,
} from '@fortawesome/free-solid-svg-icons';

import {
Navbar,
Expand All @@ -19,12 +26,24 @@ import {

import {
AcidTrailChartsContainer,
ClearButtonContainer,
EnterStringContainer,
FileChooserContainer,
HashButtonContainer
} from './containers';

library.add(faHandPointer, faFile);
import {
IpsumSaltContainer
} from './containers';

library.add(
faExclamationTriangle,
faFile,
faFont,
faHandPointer,
faSpinner,
faThumbsUp
);

class App extends Component {
constructor (props) {
Expand Down Expand Up @@ -64,12 +83,16 @@ class App extends Component {
<p>An ACID trail is an Associated Color ID for a file or other
arbitrary data.</p>
<AcidTrailChartsContainer>
<HashButtonContainer/>
<div className="buttons-container">
<HashButtonContainer/>
<ClearButtonContainer/>
</div>
</AcidTrailChartsContainer>
<div className="data-container">
<EnterStringContainer/>
<FileChooserContainer/>
</div>
<IpsumSaltContainer />
</Col>
</Row>
</Container>
Expand Down
16 changes: 14 additions & 2 deletions src/actions/acid-trail.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
const CHANGE_SHOWBARS = Symbol('CHANGE_SHOWBARS');
const CHANGE_SHOWSHAPE = Symbol('CHANGE_SHOWSHAPE');

export const types = {
CHANGE_SHOWBARS
CHANGE_SHOWBARS,
CHANGE_SHOWSHAPE
};

export const createChangeShowBarsAction = (bar, checked) => {
Expand All @@ -13,8 +15,18 @@ export const createChangeShowBarsAction = (bar, checked) => {
};
};

export const createChangeShowShapeAction = (shape) => {
return {
type: CHANGE_SHOWSHAPE,
payload: {
shape
}
};
};

export const actions = {
createChangeShowBarsAction
createChangeShowBarsAction,
createChangeShowShapeAction
};

export default {
Expand Down
12 changes: 12 additions & 0 deletions src/actions/hasher.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
const CHOOSE_FILES = Symbol('CHOOSE_FILES');
const ENTER_STRING = Symbol('ENTER_STRING');
const CLEAR = Symbol('CLEAR');
const START_HASH = Symbol('START_HASH');
const FINISH_HASH = Symbol('FINISH_HASH');

export const types = {
CHOOSE_FILES,
ENTER_STRING,
CLEAR,
START_HASH,
FINISH_HASH
};
Expand All @@ -28,6 +30,15 @@ export const createEnterStringAction = (string) => {
};
};

export const createClearAction = () => {
return {
type: CLEAR,
payload: {
clear: true
}
};
};

export const createStartHashAction = () => {
return {
type: START_HASH,
Expand All @@ -47,6 +58,7 @@ export const createFinishHashAction = (payload) => {
export const actions = {
createChooseFilesAction,
createEnterStringAction,
createClearAction,
createStartHashAction,
createFinishHashAction,
};
Expand Down
2 changes: 1 addition & 1 deletion src/checkbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
width: 30px;
height: 10px;
background: #555;
margin: 20px 20px;
margin: 10px 15px;
position: relative;
border-radius: 3px;
}
Expand Down
10 changes: 10 additions & 0 deletions src/components/AcidTrailChart/AcidTrailChart.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.color-text {
fill: white;
stroke: #000;
stroke-width: 1;
stroke-linejoin: round;
paint-order: stroke;
font-weight: bold;
font-size: 65%;
stroke-opacity: 0.3;
}
Loading

0 comments on commit 883ed7d

Please sign in to comment.