Skip to content

Commit

Permalink
complete app theme changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Shumai committed Mar 22, 2019
1 parent d76de78 commit 6a5325d
Show file tree
Hide file tree
Showing 15 changed files with 154 additions and 136 deletions.
1 change: 1 addition & 0 deletions dump.rdb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REDIS0006�ܳC�Z��V
Binary file removed public/assets/nef2.jpg
Binary file not shown.
Binary file added public/assets/shumai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/shumx.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
rel="stylesheet">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-134513684-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-134513684-1');
</script>
<title>Shumai</title>
</head>
<body>
Expand Down
25 changes: 10 additions & 15 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,20 @@ import Contact from './components/contact.jsx';
import Nav from './components/nav.jsx';
import Footer from './components/footer.jsx';
import Option from './components/option.jsx';
// import Canvas from './components/canvas.jsx';
import json from './data/data.json';
import './style/App.css';
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import anime from 'animejs/lib/anime.es.js';

const googleAna_TrackingId = `${process.env.GOOGLE_ANALITICS_ID}`;

class App extends Component {
constructor(props) {
super(props);
this.state = {
currentWidth: window.innerWidth,
menuIsOpen: false
};
this.handleDevice = () => {
this.handleDeviceWidth = () => {
this.setState({ currentWidth: window.innerWidth });
};
this.toggleOptionsMenu = () => {
Expand Down Expand Up @@ -63,28 +62,25 @@ class App extends Component {
}
};
componentDidMount() {
window.addEventListener('resize', this.handleDevice);
window.dataLayer = window.dataLayer || [];
function gtag() {
window.dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', googleAna_TrackingId);
window.addEventListener('resize', this.handleDeviceWidth);
}
componentDidCatch(error) {
console.log('logged error', error.message);
}
//animation experment

render() {
return (
<MuiThemeProvider>
<Router>
<div className="App">
<header className="App-header">
<header id="landing" className="App-header">
{/* <Canvas/> */}
<h1 className="App-title">
Hey, I'm <br /> Shumai
Hey, I'm Shumai, <br />
Full-Stack Software Developer.
</h1>
<img className="shm" src="/assets/shumai.png" alt="" />
{/* <button type="submit"> CTA </button> */}
{this.state.currentWidth >= 960 ? (
<Nav />
) : (
Expand Down Expand Up @@ -130,10 +126,9 @@ class App extends Component {
alt=""
onClick={this.badgeHandler}
/>
<Route exact path="/" render={null} />
<Route
exact
path="/home"
path="/"
render={props => (
<Home {...props} data={json.home} onScroll={this.setTitle} />
)}
Expand Down
88 changes: 88 additions & 0 deletions src/components/canvas.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
// import React, { Component } from 'react';

// class Canvas extends Component {
// style = {
// width: 100+ '%',
// height: 100+'vh'
// }
// componentDidMount() {
// const canvas = this.refs.canvas;
// const ctx = canvas.getContext('2d');
// var particles = {},
// particleIndex = 0,
// particlesNum = 5;

// function Particle (){
// this.x = canvas.width / 2;
// this.y = canvas.height / 2;
// this.radius = 4; // Arc radius
// this.startAngle = 1; // Starting point on circle
// this.endAngle = Math.PI + (Math.PI * particleIndex) / 2; // End point on circle
// this.anticlockwise = true; // clockwise or anticlockwise

// this.vx = Math.random()*10 -3;
// this.vy = Math.random()*10 +5;
// particleIndex++;
// particles[particleIndex] = this;
// this.id = particleIndex;
// this.life = 0;
// this.maxLife = Math.random()*100+ 150;
// this.gravity = 0.3;
// this.color = "hsla(" + parseInt(Math.random()*360, 10) + ",100%, 50%, 0.9)";
// }
// Particle.prototype.draw = function(){
// this.x += this.vx;
// this.y += this.vy;
// this.vy += this.gravity;
// this.life++;

// if (Math.random() < 0.1){
// this.vy += Math.random()*10 -5;
// this.vx += Math.random()*10 -5;
// }

// if(this.life >= this.maxLife){
// delete particles[this.id]
// };

// if (this.y > 500 ){
// this.vy *= -0.3;
// this.vx*= 0.3;
// this.y = 200;
// }

// // ctx.fillRect(this.x, this.y, 2, 2);
// ctx.fillStyle = this.color;
// ctx.strokeStyle = this.color;
// ctx.beginPath();
// ctx.arc(this.x, this.y, this.radius,this.startAngle, this.endAngle,this.anticlockwise);
// ctx.fill();
// ctx.beginPath();

// }
// setInterval(function(){
// //to create an overlap of colors effect
// ctx.globalCompositeOperation = "source-over";
// ctx.fillStyle = "rgba(5,5,5,0.7)";
// ctx.fillRect(0,0, canvas.width, canvas.height);

// for( var i=0; i < particlesNum; i++){
// new Particle();
// }

// ctx.globalCompositeOperation = "lighter";
// for( var k in particles) {
// particles[k].draw();
// }
// }, 60);
// }

// render(){
// return(
// <section className="canvas">
// <canvas ref="canvas" style={this.style} />
// </section>
// );
// }
// }
// export default Canvas;
4 changes: 2 additions & 2 deletions src/components/nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ class Nav extends React.Component {
}`}
>
<div className="list" onClick={this.srollToView}>
<NavLink exact to="/">
<NavLink exact to="#landing">
<img src="/assets/logo.svg" className="App-logo" alt="logo" />
</NavLink>
<NavLink exact to={'/home'}>
<NavLink exact to={'/'}>
HOME
</NavLink>
<NavLink exact to={'/about'}>
Expand Down
3 changes: 0 additions & 3 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
line-height: 150%;
}

div.LI-profile-badge {
/*z-index: -1;*/
}
div.LI-profile-badge .LI-badge-container.vertical.light {
position: sticky;
-webkit-box-shadow: var(--app-shadow);
Expand Down
6 changes: 0 additions & 6 deletions src/oauth-var.js

This file was deleted.

67 changes: 0 additions & 67 deletions src/oauth.js

This file was deleted.

Loading

0 comments on commit 6a5325d

Please sign in to comment.