Skip to content

Commit

Permalink
Merge pull request #15 from joshhoegen/optimizations
Browse files Browse the repository at this point in the history
Setting up get param options.
  • Loading branch information
joshhoegen authored Jun 12, 2017
2 parents 371e59a + f2bb0fe commit c2bd8db
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 26 deletions.
11 changes: 2 additions & 9 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Simple users app built with redux-minimal</title>
<title>Js + Video = Art by Josh Hoegen </title>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico"/>

<link rel="stylesheet" href="../css/chroma-demo.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css"
integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

<link rel="shortcut icon" type="image/x-icon" href="media/favicon.ico?v=1.0"/>
<link rel="stylesheet" href="/css/main.css">
</head>
<body>
Expand Down
Binary file added public/media/favicon.ico
Binary file not shown.
Binary file added public/media/jh-logo-80.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 0 additions & 14 deletions public/media/logo.svg

This file was deleted.

Binary file removed public/media/pattern.jpg
Binary file not shown.
6 changes: 5 additions & 1 deletion src/components/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ export default class Home extends React.Component {
const query = this.query;
return (
<div className="page-home">
<GreenScreen hex={query.hex || '2ab050'} />
<GreenScreen
hex={query.hex || '2ab050'}
size={query.size || '4'}
pixelate={query.pixelate || 'false'}
/>
</div>
);
}
Expand Down
8 changes: 6 additions & 2 deletions src/components/trails/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,18 @@ export default class GreenScreen extends React.Component {
}

this.state = {
size: 4,
pixelate: false,
size: this.props.size,
pixelate: this.props.pixelate,
color: hex,
};
}

componentDidMount() {
this.trails = new Trails(this.hexToRgbA(this.state.color));
this.trails.size = this.state.size;
this.trails.mode = this.state.pixelate === 'true' ? 'pixelate' : 'blur';
this.trails.draw();
console.log(this.trails.mode);
}

hexToRgbA(hex) {
Expand Down Expand Up @@ -131,6 +134,7 @@ export default class GreenScreen extends React.Component {
</canvas>
</div>
</div>
<img className="logo" src="media/jh-logo-80.png" alt="Art by Josh Hoegen" />
</div>
);
}
Expand Down
6 changes: 6 additions & 0 deletions src/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ video {
direction: rtl;
}
}
.logo {
position: absolute;
right: 20px;
bottom: 20px;
z-index: 5;
}
.color-picker {
float: left;
margin-right: 20px;
Expand Down

0 comments on commit c2bd8db

Please sign in to comment.